Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
polybluez committed Dec 29, 2024
1 parent b9a143a commit 4d7f460
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/build-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
nix build --inputs-from . --verbose --show-trace --print-build-logs --print-out-paths .#universal.__archPkgs.lazarus-3_6
11 changes: 9 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
libfaketime
coreutils
];

nativeBuildInputs = [pkgs.libgcc];
};
};
})
Expand Down
8 changes: 3 additions & 5 deletions packages/executables.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
})
Expand Down

0 comments on commit 4d7f460

Please sign in to comment.