mirror of
https://github.com/matter-labs/nixsgx.git
synced 2025-07-21 23:43:56 +02:00
ci: use nixci and proper caching
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
This commit is contained in:
parent
e1116e9487
commit
f36ef2047c
1 changed files with 45 additions and 29 deletions
74
.github/workflows/nix.yml
vendored
74
.github/workflows/nix.yml
vendored
|
@ -11,39 +11,55 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
|
|
||||||
with:
|
|
||||||
extra_nix_config: |
|
|
||||||
access-tokens = github.com=${{ github.token }}
|
|
||||||
- run: nix flake check -L --show-trace --keep-going
|
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||||
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
|
- uses: cachix/install-nix-action@v26
|
||||||
with:
|
with:
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
access-tokens = github.com=${{ github.token }}
|
access-tokens = github.com=${{ github.token }}
|
||||||
- run: nix fmt
|
- uses: cachix/cachix-action@v14
|
||||||
|
with:
|
||||||
|
name: nixsgx
|
||||||
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
- name: Enable magic Nix cache
|
||||||
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
|
||||||
build:
|
- run: nix fmt . -- --check
|
||||||
|
|
||||||
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||||
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
|
- uses: cachix/install-nix-action@v26
|
||||||
with:
|
with:
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
access-tokens = github.com=${{ github.token }}
|
access-tokens = github.com=${{ github.token }}
|
||||||
- uses: cachix/cachix-action@v14
|
- uses: cachix/cachix-action@v14
|
||||||
continue-on-error: true
|
with:
|
||||||
with:
|
name: nixsgx
|
||||||
name: nixsgx
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
- name: Enable magic Nix cache
|
||||||
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
|
||||||
- name: Build
|
- run: nix flake check -L --show-trace --keep-going
|
||||||
run: nix build -L
|
|
||||||
|
build:
|
||||||
|
needs: check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||||
|
- uses: cachix/install-nix-action@v26
|
||||||
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
access-tokens = github.com=${{ github.token }}
|
||||||
|
- uses: cachix/cachix-action@v14
|
||||||
|
with:
|
||||||
|
name: nixsgx
|
||||||
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
- name: Enable magic Nix cache
|
||||||
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
|
||||||
|
- name: nix build
|
||||||
|
run: nix run nixpkgs#nixci
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue