ULL. #220
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: Build Unittest | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - 'src/**' | |
| - 'tools/**' | |
| - '.github/workflows/build-unitests.yml' | |
| - 'external/**' | |
| - 'nob.c' | |
| - 'tests/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| mac: | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| matrix: | |
| os: [ macos-14, macos-15 ] | |
| steps: | |
| - uses: actions/checkout@v4.1.7 | |
| - run: | | |
| clang -I. -o nob nob.c -lm | |
| ./nob | |
| - run: | | |
| ./nob unittests -dpa | |
| - run: | | |
| ./nob amalgam | |
| clang -I.generated tests/hello_world.c -lm -L. | |
| clang -I.generated tests/animations.c -lm -L. | |
| linux: | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-22.04, ubuntu-24.04 ] | |
| steps: | |
| - uses: actions/checkout@v4.1.7 | |
| - name: Set up Clang | |
| uses: egor-tensin/setup-clang@v1.4 | |
| with: | |
| version: latest | |
| platform: x64 | |
| - run: | | |
| clang -I. -o nob nob.c -lm | |
| ./nob | |
| - run: | | |
| ./nob unittests -dpa | |
| - run: | | |
| ./nob fuzztests || ((cat crash-* | base64) && exit 128) | |
| - run: | | |
| ./nob amalgam | |
| cc -g -I.generated tests/hello_world.c -lm | |
| cc -g -I.generated tests/animations.c -lm | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4.1.7 | |
| - name: Set up Clang | |
| uses: egor-tensin/setup-clang@v1.4 | |
| with: | |
| version: latest | |
| platform: x64 | |
| - run: | | |
| clang -I. -o nob.exe nob.c | |
| ./nob.exe | |
| - run: | | |
| ./nob unittests -dp | |
| - run: | | |
| ./nob amalgam | |
| clang -I.generated tests/hello_world.c | |
| clang -I.generated tests/animations.c | |
| - run: | | |
| ./nob.exe amalgam | |
| windows-cl: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4.1.7 | |
| - shell: cmd | |
| run: | | |
| call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" | |
| cl.exe /I. /Fe:nobcl.exe nob.c | |
| nobcl.exe | |
| - shell: cmd | |
| run: | | |
| call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" | |
| nobcl.exe amalgam | |
| cl.exe /DBRPLOT_APP /Fe:brplot.exe /Tc .generated/brplot.h |