add auto-build files for github
[miniglut] / .github / workflows / build_win_msvc6.yml
diff --git a/.github/workflows/build_win_msvc6.yml b/.github/workflows/build_win_msvc6.yml
new file mode 100644 (file)
index 0000000..e6d1c05
--- /dev/null
@@ -0,0 +1,51 @@
+name: Windows MSVC 6.0 build
+
+on:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+jobs:
+  build:
+    runs-on: windows-latest
+
+    steps:
+    - uses: actions/checkout@v3
+
+    - name: cache toolchain
+      id: cache-tc
+      uses: actions/cache@v3
+      with:
+        path: |
+          msvc6lt
+          vc6varsgh.bat
+        key: msvc6lt-cache1
+
+    - name: install toolchain
+      if: steps.cache-tc.outputs.cache-hit != 'true'
+      run: |
+        C:\msys64\usr\bin\wget.exe -q http://mutantstargoat.com/~nuclear/msvc6.zip
+        7z x msvc6.zip
+        C:\msys64\usr\bin\wget.exe -q http://mutantstargoat.com/~nuclear/vc6fullvarsgh.bat
+
+    - name: build miniglut
+      shell: cmd
+      run: |
+        call vc6fullvarsgh.bat
+        msdev miniglut.dsp /MAKE "miniglut - Win32 Release"
+        mkdir miniglut-win32-msvc
+        copy Release\miniglut.lib miniglut-win32-msvc
+
+    - name: build test
+      shell: cmd
+      run: |
+        call vc6fullvarsgh.bat
+        msdev test.dsp /MAKE "test - Win32 Release"
+        copy Release\test.exe miniglut-win32-msvc
+
+    - uses: actions/upload-artifact@v3
+      with:
+        name: miniglut-win32-msvc
+        path: miniglut-win32-msvc
+
+# vi:ts=2 sts=2 sw=2 expandtab: