Skip to content

Merge pull request #324 from arximboldi/jp/boehm-gc-issues #590

Merge pull request #324 from arximboldi/jp/boehm-gc-issues

Merge pull request #324 from arximboldi/jp/boehm-gc-issues #590

Workflow file for this run

name: test
on: [push, pull_request]
jobs:
nix-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- id: set-matrix
name: Generate Nix Matrix
run: |
set -Eeu
matrix="$(nix eval --json '.#githubActions.matrix')"
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
build-nix:
name: "nix: ${{ matrix.name }} (${{ matrix.system }})"
needs: nix-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- uses: cachix/cachix-action@v16
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix build -L '.#${{ matrix.attr }}'
build-spm:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: swift build
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v16
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix develop --command cmake -B build
- run: nix develop --command make -C build docs
- uses: shimataro/ssh-key-action@v2
if: github.ref == 'refs/heads/master' && github.repository_owner == 'arximboldi'
with:
key: ${{ secrets.SINUSOIDES_SSH_KEY }}
known_hosts: ${{ secrets.SINUSOIDES_KNOWN_HOSTS }}
- run: nix develop --command make -C build upload-docs
if: github.ref == 'refs/heads/master' && github.repository_owner == 'arximboldi'
check:
strategy:
matrix:
type: [Debug, Release]
toolchain: [gnu-14, gnu-13, llvm-19, llvm-18]
std: [14]
opts: [[]]
include:
# std 17
- type: Debug
toolchain: gnu-15
std: 17
- type: Debug
toolchain: llvm-20
std: 17
# std 20
- type: Debug
toolchain: gnu-15
std: 20
- type: Debug
toolchain: llvm-20
std: 20
# benchmarks
- type: Release
toolchain: gnu
std: 14
opts: ['benchmark']
- type: Release
toolchain: llvm
std: 14
opts: ['benchmark']
# coverage
- type: Debug
toolchain: gnu
std: 14
opts: ['coverage']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v16
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: configure CMake
run: |
nix develop .#${{ matrix.toolchain }} --command \
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.type }} \
-DCHECK_SLOW_TESTS=false \
-DCXX_STANDARD=${{ matrix.std }} \
-DCHECK_BENCHMARKS=${{ contains(matrix.opts, 'benchmark') }} \
-DENABLE_COVERAGE=${{ contains(matrix.opts, 'coverage') }} \
-DENABLE_ASAN=${{ contains(matrix.opts, 'sanitize') }} \
-DENABLE_LSAN=${{ contains(matrix.opts, 'sanitize') }} \
-DENABLE_UBSAN=${{ contains(matrix.opts, 'sanitize') }} \
-DCHECK_FUZZERS=${{ contains(matrix.opts, 'fuzzers') }} \
-DDISABLE_FREE_LIST=${{ contains(matrix.opts, 'sanitize') }}
- run: nix develop .#${{ matrix.toolchain }} --command ninja -C build check
- run: nix develop .#${{ matrix.toolchain }} --command bash <(curl -s https://codecov.io/bash)
if: contains(matrix.opts, 'coverage')
- uses: shimataro/ssh-key-action@v2
if: contains(matrix.opts, 'benchmark') && github.repository_owner == 'arximboldi'
with:
key: ${{ secrets.SINUSOIDES_SSH_KEY }}
known_hosts: ${{ secrets.SINUSOIDES_KNOWN_HOSTS }}
- run: nix develop .#${{ matrix.toolchain }} --command ninja -C build upload-benchmark-reports
if: contains(matrix.opts, 'benchmark') && github.repository_owner == 'arximboldi'