name: CI # pull_request is unfiltered: stacked PRs (based on other feature branches) # must run CI too. on: push: branches: [master] pull_request: workflow_dispatch: jobs: test: # ATTIC_TOKEN_PUBLIC only exists in the public-cache environment; master # jobs must opt into it to publish to the public cache. environment: ${{ github.ref == 'refs/heads/master' && 'public-cache' || '' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # Nix and the Logos cache both come from the shared action, which runs # cachix/install-nix-action@v31 internally -- so the version note below # still describes the installer this job gets. # # v27 pins Nix 2.22.1, which is old enough to mis-evaluate flake input # overrides that newer Nix handles fine (notably nested # `a.inputs.b.inputs.c.follows`, which 2.22 rejects with "cannot find # flake in the flake registries"). v31 pins 2.35.1. Keep this in step # with logos-standalone-app, which already runs v31 for the same reason. - uses: logos-co/setup-nix-cache-action@v1 with: attic-token-ci: ${{ secrets.ATTIC_TOKEN_CI }} attic-token-public: ${{ secrets.ATTIC_TOKEN_PUBLIC }} extra-nix-config: | experimental-features = nix-command flakes - name: Build tests run: nix build '.#tests' - name: Run SDK tests run: ./result/bin/sdk_tests - name: Run generator tests run: ./result/bin/generator_tests - name: Run experimental generator tests run: ./result/bin/experimental_tests env: FIXTURES_DIR: ./result/fixtures # The module-impl C ABI: does the cdylib backend still DEFINE every # export logos-protocol DECLARES? Not implied by `.#tests` above — the # gtest suite never leaves the generator's internals — and not catchable # downstream either: a module missing an export links clean and dies at # dlopen(). Runs here, on Linux, where that would actually happen. # --no-link so the `result` symlink the steps above use is left alone. - name: Check the module-impl C ABI is fully defined run: nix build --no-link '.#checks.x86_64-linux.module-impl-abi'