-
Notifications
You must be signed in to change notification settings - Fork 91
59 lines (49 loc) · 1.95 KB
/
ci-nix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: "CI (nix)"
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main", "master", "devel" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
name: cargo-crev
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build workspace
run: nix build -L --extra-experimental-features nix-command --extra-experimental-features flakes .#workspaceBuild
# - name: Clippy workspace
# run: nix build -L --extra-experimental-features nix-command --extra-experimental-features flakes .#workspaceClippy
- name: Run cargo doc
run: nix build -L --extra-experimental-features nix-command --extra-experimental-features flakes .#workspaceDoc
- name: Test workspace
run: nix build -L --extra-experimental-features nix-command --extra-experimental-features flakes .#workspaceTest
containers:
name: "Containers"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
name: cargo-crev
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build cargo-crev container
run: |
nix build -L --extra-experimental-features nix-command --extra-experimental-features flakes .#container.cargo-crev
echo "cargo-crev_container_tag=$(docker load < result | awk '{ print $3 }')" >> $GITHUB_ENV