Skip to content

Commit 04fd0ff

Browse files
committed
bring back DeterminateSystems/magic-nix-cache
1 parent 5d19c5a commit 04fd0ff

File tree

1 file changed

+20
-59
lines changed

1 file changed

+20
-59
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,27 @@
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
1+
name: Deploy Config
102

113
on:
124
push:
135
workflow_dispatch:
146

15-
167
jobs:
17-
build:
18-
name: Build bp_ort
19-
runs-on: ubuntu-24.04
8+
deploy:
9+
runs-on: ubuntu-latest
2010
steps:
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/
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/

0 commit comments

Comments
 (0)