Renames method for compile-time checking #9
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
| # .github/workflows/ci.yml | |
| name: C/C++ CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| # use Bash everywhere (MSYS2 on Windows gives us bash, make, gcc, etc) | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Install compilers + make | |
| - name: Install toolchain | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential | |
| - name: Install toolchain | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew update | |
| brew install pkg-config | |
| - name: Setup MSYS2 (Windows) | |
| if: runner.os == 'Windows' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| update: true | |
| install: base-devel | |
| # Build and test | |
| - name: Build & Test | |
| run: | | |
| # pick up number of cores, fallback to 2 | |
| CORES=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2) | |
| make -j"$CORES" |