Skip to content

Commit 74d15ee

Browse files
committed
more versitile nix settup
1 parent f7ce56f commit 74d15ee

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

.github/actions/build/action.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Build o1js
22
description: 'All of the building steps for o1js'
33

4-
54
permissions:
65
contents: write
76

@@ -16,9 +15,22 @@ inputs:
1615
runs:
1716
using: "composite"
1817
steps:
19-
- name: Set up Nix
18+
- name: Install zstd if needed
19+
shell: bash
20+
run: command -v unzstd || (sudo apt-get update && sudo apt-get install -y zstd)
21+
- uses: nixbuild/nix-quick-install-action@v30
22+
continue-on-error: true
23+
with:
24+
nix_conf: |
25+
keep-env-derivations = true
26+
keep-outputs = true
27+
extra-substituters = https://storage.googleapis.com/mina-nix-cache
28+
extra-trusted-public-keys = nix-cache.minaprotocol.org:fdcuDzmnM0Kbf7yU4yywBuUEJWClySc1WIF6t6Mm8h4= nix-cache.minaprotocol.org:D3B1W+V7ND1Fmfii8EhbAbF1JXoe2Ct4N34OKChwk2c= mina-nix-cache-1:djtioLfv2oxuK2lqPUgmZbf8bY8sK/BnYZCU2iU5Q10=
29+
- name: Fallback to persistant nix
30+
# only available on some runners
2031
shell: bash
21-
run: echo "PATH=$PATH:/nix/var/nix/profiles/default/bin" >> $GITHUB_ENV
32+
run: command -v nix || echo "PATH=$PATH:/nix/var/nix/profiles/default/bin" >> $GITHUB_ENV
33+
2234
- name: Disable smudging
2335
shell: bash
2436
run: echo "GIT_LFS_SKIP_SMUDGE=1" >> $GITHUB_ENV

.github/workflows/checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ permissions:
1818

1919
jobs:
2020
Prepare:
21-
runs-on: [sdk-self-hosted-linux-amd64-build-system]
21+
runs-on: self-hosted
2222
steps:
2323
- name: Checkout repository with submodules
2424
uses: actions/checkout@v4
@@ -72,7 +72,7 @@ jobs:
7272
- name: Run Oxlint
7373
if: steps.get_changed_files.outputs.files_changed == 'true'
7474
run: xargs npm run lint:strict < changed_files.txt
75-
75+
7676
- name: Run codespell
7777
if: steps.get_changed_files.outputs.files_changed == 'true' && github.event.pull_request.labels.*.name != 'no-typo-check'
7878
uses: codespell-project/actions-codespell@master
@@ -86,7 +86,7 @@ jobs:
8686
Upload-bindings:
8787
name: upload bindings artifact
8888
needs: [Prepare]
89-
runs-on: [sdk-self-hosted-linux-amd64-build-system]
89+
runs-on: self-hosted
9090
steps:
9191
- uses: actions/checkout@v4
9292
with:

flake.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)