Update CI workflows, README #4
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: | |
| repository_dispatch: | |
| types: [dependency-update] | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y cmake libsdl2-dev | |
| - name: Configure | |
| run: cmake -B build -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build build -j$(nproc) | |
| - name: Test | |
| run: cd build && ctest --output-on-failure | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Configure | |
| run: cmake -B build -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Test | |
| run: cd build && ctest -C Release --output-on-failure | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: brew install cmake sdl2 | |
| - name: Configure | |
| run: cmake -B build -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build build -j$(sysctl -n hw.logicalcpu) | |
| - name: Test | |
| run: cd build && ctest --output-on-failure | |
| size-check: | |
| runs-on: ubuntu-latest | |
| needs: build-linux | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y cmake libsdl2-dev | |
| - name: Build standalone | |
| run: | | |
| cmake -B build -DEAPPS_BUILD_STANDALONE=ON | |
| cmake --build build -j$(nproc) | |
| - name: Check binary sizes | |
| run: | | |
| echo "Binary sizes:" | |
| find build/apps -name "*_standalone" -exec ls -lh {} \; | |
| find build/apps -name "*_standalone" -exec sh -c 'size=$(stat -f%z "$1" 2>/dev/null || stat -c%s "$1"); if [ "$size" -gt 5242880 ]; then echo "FAIL: $1 is $(($size/1048576))MB (>5MB)"; exit 1; fi' _ {} \; |