Skip to content

Update build.yml

Update build.yml #5

Workflow file for this run

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:
platform: x86_64
- name: Add MinGW to PATH
run: echo "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw64\\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:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw64\\bin
xcopy freeglut\\freeglut\\lib\\x86\\*.lib C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw64\\lib
xcopy freeglut\\freeglut\\include\\GL C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw64\\include\\GL /E /I /Y
- name: Remove unnecessary files
run: |
$filePath = "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw32\\i686-w64-mingw32\\lib\\libpthread.dll.a"
if (Test-Path $filePath) {
Remove-Item $filePath
}
- name: Build project with Makefile
run: mingw32-make
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
release/SNEK.exe
release/AboutDialog.dll