add auto-build files for github
authorJohn Tsiombikas <nuclear@member.fsf.org>
Sun, 2 Apr 2023 22:00:39 +0000 (01:00 +0300)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Sun, 2 Apr 2023 23:09:23 +0000 (02:09 +0300)
.github/workflows/build_gnulinux.yml [new file with mode: 0644]
.github/workflows/build_win_mingw.yml [new file with mode: 0644]
.github/workflows/build_win_msvc6.yml [new file with mode: 0644]
README.md

diff --git a/.github/workflows/build_gnulinux.yml b/.github/workflows/build_gnulinux.yml
new file mode 100644 (file)
index 0000000..51c3d3f
--- /dev/null
@@ -0,0 +1,35 @@
+name: GNU/Linux build
+
+on:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v3
+
+    - name: install dependencies
+      run: |
+        sudo apt-get update
+        sudo apt-get install libgl-dev libx11-dev
+
+    - name: build
+      run: make
+
+    - name: package
+      run: |
+        mkdir miniglut-gnulinux64
+        cp libminiglut.a miniglut-gnulinux64
+        cp test miniglut-gnulinux64
+
+    - uses: actions/upload-artifact@v3
+      with:
+        name: miniglut-gnulinux64
+        path: miniglut-gnulinux64
+
+# vi:ts=2 sts=2 sw=2 expandtab:
diff --git a/.github/workflows/build_win_mingw.yml b/.github/workflows/build_win_mingw.yml
new file mode 100644 (file)
index 0000000..e481a91
--- /dev/null
@@ -0,0 +1,37 @@
+name: Windows MinGW build
+
+on:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+jobs:
+  build:
+
+    runs-on: windows-latest
+    defaults:
+      run:
+        shell: msys2 {0}
+
+    steps:
+    - uses: actions/checkout@v3
+    - uses: msys2/setup-msys2@v2
+      with:
+        msystem: MINGW32
+        install: mingw-w64-i686-gcc mingw-w64-i686-make
+
+    - name: build
+      run: mingw32-make
+
+    - name: package
+      run: |
+        mkdir miniglut-win32-mingw
+        cp libminiglut-w32.a miniglut-win32-mingw/libminiglut.a
+        cp test.exe miniglut-win32-mingw
+
+    - uses: actions/upload-artifact@v3
+      with:
+        name: miniglut-win32-mingw
+        path: miniglut-win32-mingw
+
+# vi:ts=2 sts=2 sw=2:expandtab
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:
index 2ebf1c5..4e84296 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,6 +3,10 @@ MiniGLUT
 
 ![logo](http://nuclear.mutantstargoat.com/sw/miniglut/img/miniglut_logo_sm_alpha.png)
 
+![GNU/Linux build status](https://github.com/jtsiomb/miniglut/actions/workflows/build_gnulinux.yml/badge.svg)
+![Windows MinGW build status](https://github.com/jtsiomb/miniglut/actions/workflows/build_win_mingw.yml/badge.svg)
+![Windows MSVC6 build status](https://github.com/jtsiomb/miniglut/actions/workflows/build_win_msvc6.yml/badge.svg)
+
 MiniGLUT is a subset of GLUT (or more precisely a subset of FreeGLUT)
 implemented in a single C source file, without any non-essential dependencies,
 not even the C library.