release(v0.4.1): safety + trust depth — re-entrancy guard, append_all… #2
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: Nix | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| flake-check: | |
| name: nix flake check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| # Pin nixpkgs to the same channel the flake uses for eval stability | |
| # on CI runners. The flake itself follows nixos-unstable. | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Check that the flake evaluates | |
| run: nix flake check --no-build | |
| build: | |
| name: nix build .#default | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| # cachix-action degrades gracefully without an authToken (pushes | |
| # silently skip). Guard it to the canonical repo so forks don't even | |
| # attempt the upload. The cache name is optional; remove this step if | |
| # no cachix cache is ever configured. | |
| - uses: cachix/cachix-action@v15 | |
| if: github.repository == 'LarsArtmann/segment-buffer' | |
| with: | |
| name: larsartmann-segment-buffer | |
| authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
| skipPush: ${{ github.event_name == 'pull_request' }} | |
| - name: Build the default package | |
| run: nix build .#default --print-build-logs | |
| test: | |
| name: nix build .#checks.x86_64-linux.test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - uses: cachix/cachix-action@v15 | |
| if: github.repository == 'LarsArtmann/segment-buffer' | |
| with: | |
| name: larsartmann-segment-buffer | |
| authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
| skipPush: ${{ github.event_name == 'pull_request' }} | |
| - name: Run the test check | |
| run: nix build .#checks.x86_64-linux.test --print-build-logs | |
| fmt: | |
| name: nix fmt (treefmt) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Run treefmt in check mode | |
| run: nix fmt -- --fail-on-change |