-
-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (50 loc) · 2.56 KB
/
cache-devshells.yaml
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
60
61
62
name: "cache-devshells"
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches: [ main, main-0.3, main-0.4 ]
pull_request:
branches: [ main, main-0.3, main-0.4 ]
jobs:
cache-devshells:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Extend space
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/actions/extend-space
- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
- uses: cachix/cachix-action@v15
with:
name: holochain-ci
- uses: cachix/cachix-action@v15
with:
name: darksoil-studio
- name: Cache holochainTauriDev
env:
CACHIX_AUTH_TOKEN: "${{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}"
run: |
cachix watch-exec darksoil-studio -- nix flake check --accept-flake-config -L
nix develop --no-update-lock-file --accept-flake-config --profile holochainTauriDev -c true .#holochainTauriDev
cachix push darksoil-studio holochainTauriDev
nix develop --no-update-lock-file --accept-flake-config --profile holochainTauriAndroidDev -c true .#holochainTauriAndroidDev
cachix push darksoil-studio holochainTauriAndroidDev
cachix watch-exec darksoil-studio -- nix build --no-update-lock-file -L --accept-flake-config .#holochainTauriRust
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#holochainTauriRust | nix run nixpkgs#jq -- -r 'keys[0]')
cachix watch-exec darksoil-studio -- nix build --no-update-lock-file -L --accept-flake-config .#androidTauriRust
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#androidTauriRust | nix run nixpkgs#jq -- -r 'keys[0]')
- name: Pin holochainTauriDev
if: github.event_name != 'pull_request' && github.ref_name == 'main'
env:
CACHIX_AUTH_TOKEN: "${{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}"
run: |
cachix pin darksoil-studio holochainTauriRust $(nix path-info --json --accept-flake-config --no-warn-dirty .#holochainTauriRust | nix run nixpkgs#jq -- -r 'keys[0]')
cachix pin darksoil-studio androidTauriRust $(nix path-info --json --accept-flake-config --no-warn-dirty .#androidTauriRust | nix run nixpkgs#jq -- -r 'keys[0]')