From 4d7f46009d5e6fdac7d1bbbf186efa0f1e75c182 Mon Sep 17 00:00:00 2001 From: polybluez <163671824+polybluez@users.noreply.github.com> Date: Sun, 29 Dec 2024 16:30:11 +0000 Subject: [PATCH] Fix CI --- .github/workflows/build-toolchain.yml | 10 ++-------- .github/workflows/main.yml | 11 +++++++++-- flake.nix | 2 ++ packages/executables.nix | 8 +++----- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-toolchain.yml b/.github/workflows/build-toolchain.yml index 8733d76..28380b8 100644 --- a/.github/workflows/build-toolchain.yml +++ b/.github/workflows/build-toolchain.yml @@ -18,16 +18,10 @@ jobs: # this might remove tools that are actually needed, # if set to "true" but frees about 6 GB tool-cache: true + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Build fpc-3_2_2 run: | nix build --inputs-from . --verbose --show-trace --print-build-logs --print-out-paths .#universal.__archPkgs.fpc-3_2_2 - - name: Build fpc-trunk - run: | - nix build --inputs-from . --verbose --show-trace --print-build-logs --print-out-paths .#universal.__archPkgs.fpc-trunk - name: Build lazarus-3_6 run: | - nix build --inputs-from . --verbose --show-trace --print-build-logs --print-out-paths .#universal.__archPkgs.lazarus-3_6 - - name: Save Nix store - uses: nix-community/cache-nix-action/save@v5 - with: - primary-key: build-${{ runner.os }}-${{ hashFiles('flake.nix') }} \ No newline at end of file + nix build --inputs-from . --verbose --show-trace --print-build-logs --print-out-paths .#universal.__archPkgs.lazarus-3_6 \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4359e50..ffc1d37 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,8 +13,15 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v29 + - name: Remove unnecessary packages + run: | # stolen from https://github.com/easimon/maximize-build-space + echo "=== Before pruning ===" + df -h + sudo rm -rf /opt || true + echo + echo "=== After pruning ===" + df -h - uses: DeterminateSystems/magic-nix-cache-action@main # To make the environment in the flake's devShell available to future steps: - uses: rrbutani/use-nix-shell-action@v1 diff --git a/flake.nix b/flake.nix index 9a04621..7a48eb7 100755 --- a/flake.nix +++ b/flake.nix @@ -93,6 +93,8 @@ libfaketime coreutils ]; + + nativeBuildInputs = [pkgs.libgcc]; }; }; }) diff --git a/packages/executables.nix b/packages/executables.nix index 44fd1f9..20e49eb 100644 --- a/packages/executables.nix +++ b/packages/executables.nix @@ -18,13 +18,11 @@ fpc-trunk = fpcPkgs.fpc-trunk.override {inherit archsAttrs;}; fpc-3_0_4 = fpcPkgs.fpc-3_0_4.override {inherit archsAttrs;}; fpc-3_2_2 = fpcPkgs.fpc-3_2_2.override {inherit archsAttrs;}; - fpc = fpc-trunk; + fpc = fpc-3_2_2; lazarus-3_6 = if (lib.any (archAttrs: archAttrs.infoAttrs.fpcAttrs.lazarusExists) (lib.attrValues crossPkgs)) then (pkgs.callPackage fpcPkgs.lazarus { - # TODO - # Check if it still crashes with trunk fpc = fpc; }) else null; @@ -52,14 +50,14 @@ fpc-3_0_4 = fpcWrapper universal.fpc-3_0_4; fpc-3_2_2 = fpcWrapper universal.fpc-3_2_2; fpc-trunk = fpcWrapper universal.fpc-trunk; - fpc = fpcWrapper universal.fpc-trunk; + fpc = fpcWrapper universal.fpc-3_2_2; lazarus-3_6 = if (archAttrs.infoAttrs.fpcAttrs.lazarusExists) then (pkgs.callPackage fpcPkgs.lazarusWrapper { # FIXME # lazarus doesn't compile editor with trunk fpc - fpc = universal.fpc-3_2_2; + fpc = universal.fpc; fpcAttrs = archAttrs.infoAttrs.fpcAttrs; lazarus = universal.lazarus-3_6; })