Fixing windows side compilation problems with the Visual C standard l… #69
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: | |
| push: | |
| branches: [ dev, main ] | |
| pull_request: | |
| branches: [ dev, main ] | |
| permissions: | |
| contents: read | |
| actions: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-test: | |
| name: Build & Test (${{ matrix.os }} / ${{ matrix.compiler }} / ${{ matrix.platform }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false # We want to test on all compilers, so stopping jobs when other job fails is not good. | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| compiler: [g++, clang] | |
| platform: [x86, x64] | |
| env: | |
| CXX: ${{ matrix.compiler == 'clang' && 'clang++-14' || 'g++-13' }} | |
| CC: ${{ matrix.compiler == 'clang' && 'clang-14' || 'gcc-13' }} | |
| CFLAGS: ${{ matrix.platform == 'x86' && '-m32' || '-m64' }} | |
| CXXFLAGS: ${{ matrix.platform == 'x86' && '-m32' || '-m64' }} | |
| LDFLAGS: ${{ matrix.platform == 'x86' && '-m32' || '-m64' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential python3 python3-pip ninja-build meson | |
| if [ "${{ matrix.platform }}" = "x86" ]; then | |
| sudo apt-get install -y gcc-13-multilib g++-13-multilib | |
| fi | |
| if [ "${{ matrix.compiler }}" = "clang" ]; then | |
| sudo apt-get install -y clang-14 | |
| else | |
| sudo apt-get install -y gcc-13 g++-13 | |
| fi | |
| - name: Install dependencies (Windows) | |
| if: matrix.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| choco install -y ninja git mingw-w64 | |
| if ("${{ matrix.compiler }}" -eq "clang") { | |
| choco install -y llvm | |
| } | |
| python -m pip install --upgrade meson | |
| - name: Configure (Meson) Ubuntu | |
| if: matrix.os == 'ubuntu-latest' | |
| run: CI=1 ./bin/init.sh | |
| - name: Configure (Meson) Windows | |
| if: matrix.os == 'windows-latest' | |
| run: .\bin\init.bat | |
| - name: Run tests Ubuntu | |
| if: matrix.os == 'ubuntu-latest' | |
| run: ./bin/test.sh | |
| - name: Run tests Windows | |
| if: matrix.os == 'windows-latest' | |
| run: .\bin\test.bat | |
| - name: Upload test logs if tests fail | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-logs-${{ matrix.os }} | |
| path: ./test/logs/ |