docking feature + example (#6) #22
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 | |
| # Transition step: a fresh mcpp bootstrap currently defaults to a | |
| # musl-static toolchain, which cannot link the host X11/GL runtime on | |
| # Linux. The package intentionally does not pin a toolchain in mcpp.toml; | |
| # we set an explicit environment default here instead. Remove this once | |
| # mcpp's bootstrap default becomes a glibc toolchain. | |
| - name: Set default toolchain (env) | |
| if: runner.os == 'Linux' | |
| shell: bash | |
| run: | | |
| mcpp toolchain install gcc 16.1.0 | |
| mcpp toolchain default gcc@16.1.0 | |
| - 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 | |
| - name: Build docking example (features=["docking"]) | |
| shell: bash | |
| run: | | |
| cd examples/docking | |
| mcpp build |