nob_win64_mingw: use new command API in stage2 #185
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: no-build build | |
| on: [push, pull_request] | |
| jobs: | |
| macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Clone GIT repo | |
| uses: actions/checkout@v4 | |
| - name: Build nob | |
| run: clang -o nob nob.c | |
| - name: Run nob | |
| run: ./nob | |
| - name: Upload build folder | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-build-folder | |
| path: build/ | |
| ubuntu: | |
| strategy: | |
| matrix: | |
| cc: [gcc, clang] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone GIT repo | |
| uses: actions/checkout@v4 | |
| - name: Pull Deps | |
| run: sudo apt install xorg-dev | |
| - name: Build nob | |
| run: ${{ matrix.cc }} -o nob nob.c | |
| - name: Run nob | |
| run: ./nob | |
| - name: Upload build folder | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ubuntu-${{ matrix.cc }}-build-folder | |
| path: build/ | |
| windows: | |
| name: windows (${{ matrix.hotreload == true && 'hotreload' || '' }}) | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| hotreload: [true, false] | |
| steps: | |
| - name: Clone GIT repo | |
| uses: actions/checkout@v4 | |
| - name: Build nob | |
| shell: cmd | |
| # cl.exe isn't available as-is in Github images because they don't want | |
| # to, so we need to pull env vars ourselves. Refs: | |
| # https://github.com/actions/runner-images/issues/6205#issuecomment-1241573412 | |
| # https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#create-your-own-command-prompt-shortcut | |
| run: | | |
| call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" | |
| cl.exe /Fenob nob.c | |
| - name: Run nob | |
| shell: cmd | |
| run: | | |
| call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" | |
| nob.exe config ${{ matrix.hotreload == true && 'hotreload' || '' }} | |
| nob.exe | |
| - name: Upload build folder | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-${{ matrix.hotreload == true && 'hotreload' || '' }}-build-folder | |
| path: build/ |