From 538b686adec3b3d1d4821912cf57b26720c6418f Mon Sep 17 00:00:00 2001 From: Serhii Shymkiv Date: Tue, 26 Nov 2024 09:51:12 +0200 Subject: [PATCH 1/3] Cleanup Nix store after the o1js bindings build procedure. --- .github/workflows/build-bindings.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-bindings.yml b/.github/workflows/build-bindings.yml index 7ffc1a7cf..b90a01a28 100644 --- a/.github/workflows/build-bindings.yml +++ b/.github/workflows/build-bindings.yml @@ -1,4 +1,4 @@ -# Purpose: We want to build the o1js bindings in CI so that people in the +# Purpose: We want to build the o1js bindings in CI so that people in the # community can change them without being scared of breaking things, or # needing to do the complicated (without nix) build setup. @@ -7,7 +7,7 @@ name: Build o1js bindings on: pull_request: -jobs: +jobs: nix-build: name: build-bindings-ubuntu runs-on: [sdk-self-hosted-linux-amd64-build-system] @@ -17,9 +17,16 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - run: | + - name: Build the o1js bindings + run: | set -Eeu # Until we restart the runner and the PATH gets updated from /etc/bash.bashrc export PATH="$PATH":/nix/var/nix/profiles/default/bin ./pin.sh nix develop o1js --command bash -c "npm run build:update-bindings" + - name: Cleanup the Nix store + run: | + nix-env --delete-generations old + nix-collect-garbage -d --quiet + nix-store --gc --print-dead + nix-store --optimise From 8205fad5a06e4f8d84257ee7fcab1c9de96a7658 Mon Sep 17 00:00:00 2001 From: Serhii Shymkiv Date: Tue, 26 Nov 2024 15:56:25 +0200 Subject: [PATCH 2/3] Attempting to setup Nix via PATH. --- .github/workflows/build-bindings.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-bindings.yml b/.github/workflows/build-bindings.yml index b90a01a28..6590514bc 100644 --- a/.github/workflows/build-bindings.yml +++ b/.github/workflows/build-bindings.yml @@ -12,6 +12,8 @@ jobs: name: build-bindings-ubuntu runs-on: [sdk-self-hosted-linux-amd64-build-system] steps: + - name: Set up Nix in PATH + run: echo "PATH=$PATH:/nix/var/nix/profiles/default/bin" >> $GITHUB_ENV - name: Disable smudging run: echo "GIT_LFS_SKIP_SMUDGE=1" >> $GITHUB_ENV - uses: actions/checkout@v4 From ed7bf0c3704e49c3fe823655367f3260ef0cb67a Mon Sep 17 00:00:00 2001 From: Serhii Shymkiv Date: Tue, 26 Nov 2024 16:14:42 +0200 Subject: [PATCH 3/3] Cleaning up. --- .github/workflows/build-bindings.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-bindings.yml b/.github/workflows/build-bindings.yml index 6590514bc..3362768b1 100644 --- a/.github/workflows/build-bindings.yml +++ b/.github/workflows/build-bindings.yml @@ -12,7 +12,7 @@ jobs: name: build-bindings-ubuntu runs-on: [sdk-self-hosted-linux-amd64-build-system] steps: - - name: Set up Nix in PATH + - name: Set up Nix run: echo "PATH=$PATH:/nix/var/nix/profiles/default/bin" >> $GITHUB_ENV - name: Disable smudging run: echo "GIT_LFS_SKIP_SMUDGE=1" >> $GITHUB_ENV @@ -22,8 +22,6 @@ jobs: - name: Build the o1js bindings run: | set -Eeu - # Until we restart the runner and the PATH gets updated from /etc/bash.bashrc - export PATH="$PATH":/nix/var/nix/profiles/default/bin ./pin.sh nix develop o1js --command bash -c "npm run build:update-bindings" - name: Cleanup the Nix store