ci: build and publish the Windows installer on version tags #7
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: Build Linux | |
| on: | |
| push: | |
| branches: [ master, development ] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| ninja-build libtbb-dev zlib1g-dev libpython3-dev \ | |
| libgl1-mesa-dev xorg-dev \ | |
| libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules | |
| # A complete, self-consistent LLVM + Clang dev toolchain (static libs and | |
| # cmake config), which the distribution packages do not provide. | |
| - name: Setup LLVM/Clang toolchain | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-name: llvm | |
| create-args: >- | |
| llvmdev=20.1 | |
| clangdev=20.1 | |
| lld=20.1 | |
| zlib | |
| zstd | |
| libxml2-devel | |
| init-shell: bash | |
| cache-environment: true | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ github.job }}-${{ runner.os }} | |
| max-size: 2G | |
| - name: Cache AnyDSL toolchain (thorin/artic/runtime) | |
| uses: actions/cache@v4 | |
| with: | |
| path: deps | |
| key: anydsl-deps-${{ runner.os }}-${{ hashFiles('scripts/setup/config.json', 'scripts/setup/*.ps1') }} | |
| restore-keys: | | |
| anydsl-deps-${{ runner.os }}- | |
| - name: Cache CPM sources | |
| uses: actions/cache@v4 | |
| with: | |
| path: .cpm-cache | |
| key: cpm-${{ runner.os }}-${{ hashFiles('cmake/Dependencies.cmake') }} | |
| restore-keys: | | |
| cpm-${{ runner.os }}- | |
| - name: Generate CI setup config | |
| shell: bash -el {0} | |
| run: | | |
| pwsh -NoProfile -Command ' | |
| $cfg = Get-Content scripts/setup/config.json -Raw | ConvertFrom-Json | |
| $cfg.LOCATION = "$env:GITHUB_WORKSPACE/deps" | |
| $cfg.LLVM.SYSTEM_DIR = "$env:CONDA_PREFIX" | |
| $cfg.CMAKE.EXTRA_ARGS += "-DCMAKE_C_COMPILER_LAUNCHER=ccache" | |
| $cfg.CMAKE.EXTRA_ARGS += "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" | |
| $cfg | ConvertTo-Json -Depth 16 | Set-Content scripts/setup/config.ci.json | |
| ' | |
| - name: Setup dependencies and build Ignis | |
| shell: bash -el {0} | |
| run: | | |
| export CMAKE_PREFIX_PATH="$CONDA_PREFIX:$CMAKE_PREFIX_PATH" | |
| export CPM_SOURCE_CACHE="$GITHUB_WORKSPACE/.cpm-cache" | |
| pwsh ./scripts/setup/setup.ps1 -config_file scripts/setup/config.ci.json | |
| - name: Run tests | |
| shell: bash -el {0} | |
| run: | | |
| export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH" | |
| ctest --test-dir build/Release --output-on-failure -E "(ignis_test_integrator)|(ignis_test_multiple_runtimes)" |