diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b433292 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Build SNEK_GL Application + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up MinGW + uses: egor-tensin/setup-mingw@v1 + with: + arch: x86 + + - name: Add MinGW to PATH + run: echo "C:\\mingw32\\bin" >> $GITHUB_PATH + + - name: Install FreeGLUT + run: | + curl -LO https://downloads.sourceforge.net/project/freeglut/freeglut/2.6.0/freeglut-MSVC-2.6.0-3.mp.zip + 7z x freeglut-MSVC-2.6.0-3.mp.zip -ofreeglut + xcopy freeglut\\freeglut\\bin\\x86\\*.dll C:\\mingw32\\bin + xcopy freeglut\\freeglut\\lib\\x86\\*.lib C:\\mingw32\\lib + xcopy freeglut\\freeglut\\include\\GL C:\\mingw32\\include\\GL /E /I /Y + + - name: Build project with Makefile + run: mingw32-make + + - name: Archive build artifacts + uses: actions/upload-artifact@v2 + with: + name: build-artifacts + path: | + release/SNEK.exe + release/AboutDialog.dll