From c34715441bfdbc69e3db4d6961be1e7d623e1980 Mon Sep 17 00:00:00 2001 From: Sasha Bogicevic Date: Wed, 14 Jan 2026 14:41:27 +0100 Subject: [PATCH 1/5] Use StrictData in hydra-node This reduces the memory usage significantly (1.7 GB vs. 137 MB for the stress-test I was running) Signed-off-by: Sasha Bogicevic --- hydra-node/hydra-node.cabal | 1 + 1 file changed, 1 insertion(+) diff --git a/hydra-node/hydra-node.cabal b/hydra-node/hydra-node.cabal index 90205b097b8..dfa40a10031 100644 --- a/hydra-node/hydra-node.cabal +++ b/hydra-node/hydra-node.cabal @@ -38,6 +38,7 @@ common project-config PatternSynonyms TypeFamilies ViewPatterns + StrictData ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates From b331582f25217847ff7d276f0e9399f278dea8de Mon Sep 17 00:00:00 2001 From: Jack Chan Date: Tue, 6 Jan 2026 08:07:23 +0800 Subject: [PATCH 2/5] ci: add disk cleanup step to prevent space exhaustion GitHub Actions runners have limited disk space (~14GB available). When building uncached Nix derivations (like our modified hydra-node), the build can exhaust disk space during compilation. This adds a cleanup step that removes unused tools before the build: - .NET SDK (~1.8GB) - Android SDK (~9GB) - GHC (~5GB) - CodeQL (~2.5GB) - Unused Docker images This frees up ~20GB of disk space, ensuring builds complete successfully. --- .github/actions/nix-cachix-setup/action.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/actions/nix-cachix-setup/action.yml b/.github/actions/nix-cachix-setup/action.yml index fcf19333bb5..6c24c24a284 100644 --- a/.github/actions/nix-cachix-setup/action.yml +++ b/.github/actions/nix-cachix-setup/action.yml @@ -9,6 +9,21 @@ runs: using: composite steps: + - name: 🧹 Free disk space + if: runner.os == 'Linux' + shell: bash + run: | + echo "Disk space before cleanup:" + df -h / + # Remove unnecessary tools to free up disk space + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache/CodeQL + sudo docker image prune --all --force || true + echo "Disk space after cleanup:" + df -h / + - name: ❄ Prepare nix uses: cachix/install-nix-action@v30 with: From 4f243fafb58bae95ecd0b835d27778654cb99a95 Mon Sep 17 00:00:00 2001 From: Jack Chan Date: Sat, 3 Jan 2026 19:21:30 +0800 Subject: [PATCH 3/5] ci: enable Docker builds for pull requests - Add pull_request trigger for PRs targeting master branch - Tag PR builds as pr- for easy identification - Use PR head SHA as version for traceability --- .github/workflows/docker.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index e0021638606..b716d2bcba0 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -13,6 +13,8 @@ on: push: branches: [ "master" ] tags: [ "*.*.*" ] + pull_request: + branches: [ "master" ] workflow_dispatch: inputs: ref_name: @@ -73,6 +75,12 @@ jobs: # And the version as the git commit. VERSION=${{github.sha}} + # For PRs, tag as pr- + if [[ "${{github.event_name}}" == "pull_request" ]]; then + IMAGE_LABEL=pr-${{github.event.pull_request.number}} + VERSION=${{github.event.pull_request.head.sha}} + fi + # Determine whether we are building a tag and if yes, set the label # name to be the tag name, and the version to be the tag. BUILDING_TAG=${{github.ref_type == 'tag'}} From 7c12876b2b9bb7148e0d74cd14c31f1dd1be8375 Mon Sep 17 00:00:00 2001 From: Jack Chan Date: Tue, 6 Jan 2026 17:59:37 +0800 Subject: [PATCH 4/5] ci: trigger CI and Docker builds for v1.2.0-base branch --- .github/workflows/ci-nix.yaml | 4 ++++ .github/workflows/docker.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-nix.yaml b/.github/workflows/ci-nix.yaml index 8477afbd02d..d3843fa4815 100644 --- a/.github/workflows/ci-nix.yaml +++ b/.github/workflows/ci-nix.yaml @@ -11,7 +11,11 @@ on: branches: - master - release + - v1.2.0-base pull_request: + branches: + - master + - v1.2.0-base schedule: # Everyday at 4:00 AM - cron: "0 4 * * *" diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index b716d2bcba0..f9262c0609f 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -11,10 +11,10 @@ concurrency: on: push: - branches: [ "master" ] + branches: [ "master", "v1.2.0-base" ] tags: [ "*.*.*" ] pull_request: - branches: [ "master" ] + branches: [ "master", "v1.2.0-base" ] workflow_dispatch: inputs: ref_name: From 67cdf89367bf36a435162cc1153677262c617d65 Mon Sep 17 00:00:00 2001 From: Jack Chan Date: Thu, 15 Jan 2026 10:43:54 +0800 Subject: [PATCH 5/5] fix: treefmt --- hydra-node/hydra-node.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hydra-node/hydra-node.cabal b/hydra-node/hydra-node.cabal index dfa40a10031..2ff54fa1451 100644 --- a/hydra-node/hydra-node.cabal +++ b/hydra-node/hydra-node.cabal @@ -36,9 +36,9 @@ common project-config OverloadedStrings PartialTypeSignatures PatternSynonyms + StrictData TypeFamilies ViewPatterns - StrictData ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates