Backend abstraction layer, cross-platform, unpinned toolchain (#3) #12
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: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| mcpp: | |
| name: mcpp (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| experimental: false | |
| - os: macos-latest | |
| experimental: true | |
| - os: windows-latest | |
| experimental: true | |
| runs-on: ${{ matrix.os }} | |
| # Linux is the required, must-pass platform. macOS/Windows are best-effort | |
| # while mcpp-index runtime/toolchain support for them settles, so they do | |
| # not block the overall CI result. | |
| continue-on-error: ${{ matrix.experimental }} | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Xlings (Linux/macOS) | |
| if: runner.os != 'Windows' | |
| env: | |
| XLINGS_NON_INTERACTIVE: 1 | |
| shell: bash | |
| run: | | |
| curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/refs/heads/main/tools/other/quick_install.sh | bash | |
| echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" | |
| - name: Install Xlings (Windows) | |
| if: runner.os == 'Windows' | |
| env: | |
| XLINGS_NON_INTERACTIVE: 1 | |
| shell: pwsh | |
| run: | | |
| irm https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.ps1 | iex | |
| "$env:USERPROFILE\.xlings\subos\current\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Install project tools | |
| shell: bash | |
| run: | | |
| xlings update | |
| xlings install | |
| - name: Show mcpp version | |
| shell: bash | |
| run: mcpp --version | |
| - name: Build library | |
| shell: bash | |
| run: mcpp build | |
| - name: Run tests | |
| shell: bash | |
| run: mcpp test | |
| - name: Run headless example | |
| shell: bash | |
| run: | | |
| cd examples/basic | |
| mcpp run | |
| - name: Build minimal window example | |
| shell: bash | |
| run: | | |
| cd examples/minimal_window | |
| mcpp build | |
| - name: Build GLFW/OpenGL3 example | |
| shell: bash | |
| run: | | |
| cd examples/glfw_opengl3 | |
| mcpp build |