Skip to content

Commit 5f1d497

Browse files
committed
Revert "Bring back magic-nix-cache (#40)"
This reverts commit 93ae576. magic-nix-cache doesn't solve slow ci build times, just speeding up compile times does
1 parent 93ae576 commit 5f1d497

File tree

1 file changed

+59
-20
lines changed

1 file changed

+59
-20
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,66 @@
1-
name: Deploy Config
1+
name: Build bp_ort
2+
3+
4+
env:
5+
nix_conf: |
6+
substituters = https://cache.nixos.org/ https://nix-community.cachix.org https://cache.iog.io
7+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
8+
keep-env-derivations = true
9+
keep-outputs = true
210
311
on:
412
push:
513
workflow_dispatch:
614

15+
716
jobs:
8-
deploy:
9-
runs-on: ubuntu-latest
17+
build:
18+
name: Build bp_ort
19+
runs-on: ubuntu-24.04
1020
steps:
11-
- name: Checkout repository
12-
uses: actions/checkout@v4
13-
14-
- name: Install Nix
15-
uses: DeterminateSystems/nix-installer-action@main
16-
- name: Cache Nix
17-
uses: DeterminateSystems/magic-nix-cache-action@main
18-
19-
- name: Build
20-
run: nix build .#packaged-mod
21-
22-
- name: Upload Build Artifact
23-
uses: actions/upload-artifact@v4
24-
with:
25-
name: bp-ort-mod
26-
path: |
27-
result/
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Install Nix
25+
uses: nixbuild/nix-quick-install-action@v30
26+
with:
27+
# We don't enable ca-derivations here
28+
# because we have later jobs where ca-derivations is enabled.
29+
nix_conf: ${{ env.nix_conf }}
30+
31+
- name: Restore and save Nix store
32+
uses: nix-community/cache-nix-action@v6
33+
with:
34+
# restore and save a cache using this key
35+
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
36+
# if there's no cache hit, restore a cache by this prefix
37+
restore-prefixes-first-match: nix-${{ runner.os }}-
38+
# collect garbage until the Nix store size (in bytes) is at most this number
39+
# before trying to save a new cache
40+
# 1G = 1073741824
41+
gc-max-store-size-linux: 1G
42+
# do purge caches
43+
purge: true
44+
# purge all versions of the cache
45+
purge-prefixes: nix-${{ runner.os }}-
46+
# created more than this number of seconds ago
47+
purge-created: 0
48+
# or, last accessed more than this number of seconds ago
49+
# relative to the start of the `Post Restore and save Nix store` phase
50+
purge-last-accessed: 0
51+
# except any version with the key that is the same as the `primary-key`
52+
purge-primary-key: never
53+
54+
- name: Build
55+
run: nix build .#packaged-mod
56+
57+
# # Uncomment to debug this job
58+
# - name: Setup tmate session
59+
# uses: mxschmitt/action-tmate@v3
60+
61+
- name: Upload Build Artifact
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: package
65+
path: |
66+
result/

0 commit comments

Comments
 (0)