Feature/build fix #84
Workflow file for this run
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: CI | |
| on: | |
| create: | |
| tags: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| env: | |
| EM_VERSION: 4.0.8 | |
| EM_CACHE_FOLDER: 'emsdk-cache' | |
| jobs: | |
| build: | |
| name: build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: install packages (linux) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install ninja-build libsdl2-dev | |
| if: matrix.os == 'ubuntu-latest' | |
| - name: install packages (macos) | |
| run: brew install ninja SDL2 | |
| if: matrix.os == 'macos-latest' | |
| - name: mkdir bin | |
| run: mkdir -p bin | |
| if: matrix.os == 'windows-latest' | |
| - name: download sdl2 (windows) | |
| uses: albin-johansson/download-sdl2@v2 | |
| with: | |
| version: 2.0.14 | |
| sources_destination: . | |
| binaries_destination: bin | |
| if: matrix.os == 'windows-latest' | |
| - name: mkdir out | |
| run: mkdir -p out | |
| - name: cmake (linux + macos) | |
| run: cmake -S . -B out -G Ninja | |
| if: matrix.os != 'windows-latest' | |
| - name: cmake (windows) | |
| run: cmake -S . -B out "-DSDL2_ROOT_DIR=SDL2-2.0.14" | |
| if: matrix.os == 'windows-latest' | |
| - name: build | |
| run: cmake --build out | |
| - name: tests | |
| run: | | |
| python scripts/build_tests.py | |
| python scripts/tester.py -vv --exe bin/binjgb-tester | |
| if: matrix.os != 'windows-latest' | |
| build-wasm: | |
| name: build-wasm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: install packages | |
| run: sudo apt-get install ninja-build | |
| - name: setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{env.EM_CACHE_FOLDER}} | |
| key: ${{env.EM_VERSION}}-${{ runner.os }} | |
| - name: emsdk install | |
| uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: ${{env.EM_VERSION}} | |
| actions-cache-folder: ${{env.EM_CACHE_FOLDER}} | |
| - name: mkdir | |
| run: mkdir -p out | |
| - name: cmake | |
| run: emcmake cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DWASM=true | |
| - name: build | |
| run: emmake cmake --build out | |
| build-rgbds-live: | |
| name: build-rgbds-live | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: install packages | |
| run: sudo apt-get install ninja-build | |
| - name: setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{env.EM_CACHE_FOLDER}} | |
| key: ${{env.EM_VERSION}}-${{ runner.os }} | |
| - name: emsdk install | |
| uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: ${{env.EM_VERSION}} | |
| actions-cache-folder: ${{env.EM_CACHE_FOLDER}} | |
| - name: mkdir | |
| run: mkdir -p out | |
| - name: cmake | |
| run: emcmake cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DWERROR=ON -DWASM=true -DRGBDS_LIVE=ONs -DCMAKE_C_FLAGS="-DBREAKPOINTS_MAX_BANKS_NUMBER=256" | |
| - name: build | |
| run: emmake cmake --build out | |
| build-gbstudio: | |
| name: build-gbstudio | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: install packages | |
| run: sudo apt-get install ninja-build | |
| - name: setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{env.EM_CACHE_FOLDER}} | |
| key: ${{env.EM_VERSION}}-${{ runner.os }} | |
| - name: emsdk install | |
| uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: ${{env.EM_VERSION}} | |
| actions-cache-folder: ${{env.EM_CACHE_FOLDER}} | |
| - name: mkdir | |
| run: mkdir -p out | |
| - name: cmake | |
| run: emcmake cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DWERROR=ON -DWASM=true -DGBSTUDIO=ON | |
| - name: build | |
| run: emmake cmake --build out |