Skip to content

Commit 41adfea

Browse files
committed
feat: add separate CI job for testing new cache
1 parent 8bf173d commit 41adfea

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/ci.wip.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI w/ attic caching
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
check:
11+
strategy:
12+
matrix:
13+
include:
14+
- name: x86_64-linux
15+
runner: [ self-hosted, legacy ]
16+
- name: aarch64-darwin
17+
runner: [ self-hosted, macos ]
18+
name: Build (${{ matrix.name }})
19+
runs-on: ${{ matrix.runner }}
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up Attic cache
25+
env:
26+
ATTIC_ENDPOINT: ${{ secrets.ATTIC_ENDPOINT }}
27+
ATTIC_CACHE: ${{ secrets.ATTIC_CACHE }}
28+
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
29+
run: |
30+
attic login --set-default admin "$ATTIC_ENDPOINT" "$ATTIC_TOKEN"
31+
attic use "$ATTIC_CACHE"
32+
33+
- name: Build and cache flake outputs
34+
env:
35+
ATTIC_ENDPOINT: ${{ secrets.ATTIC_ENDPOINT }}
36+
ATTIC_CACHE: ${{ secrets.ATTIC_CACHE }}
37+
run: |
38+
nix build .#ci --print-build-logs --max-jobs auto --json | jq -r '.[].outputs.out' | nix path-info -r --stdin | attic push --stdin "$ATTIC_CACHE"

0 commit comments

Comments
 (0)