Skip to content

Commit

Permalink
reenable mac ci
Browse files Browse the repository at this point in the history
  • Loading branch information
symphorien committed Oct 22, 2023
1 parent 437e952 commit 697a353
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.5.0
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-build test.nix
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2.5.0
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-build test.nix
# spurious failures due to https://github.com/kolloch/crate2nix/issues/263
# mac:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2.5.0
# - uses: cachix/install-nix-action@v18
# with:
# nix_path: nixpkgs=channel:nixos-unstable
# - run: nix-build test.nix
7 changes: 6 additions & 1 deletion test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ let
isDerivation = x: (x.type or null) == "derivation";
tryEvalOpt = x: let res = builtins.tryEval x; in if res.success then res.value else null;
allNixVersions = pkgs: [ pkgs.nixStable pkgs.nixUnstable ] ++ (builtins.filter isDerivation (map tryEvalOpt (builtins.attrValues (pkgs.nixVersions or { }))));
isDarwin = (builtins.match ".*darwin.*" builtins.currentSystem) != null;
channelsToTest = if isDarwin then
[ "channel:nixos-unstable" ] # buildRustCrate is broken on 23.05 due to stripping rlibs
else
[ "channel:nixos-23.05" "channel:nixos-unstable" ];
in
map
(url:
Expand All @@ -10,4 +15,4 @@ map
channel_name = builtins.replaceStrings [ "channel:" ] [ "" ] (builtins.toString url);
in
map (x: (pkgs.callPackage ./nix-du.nix { nix = x; }).tested.overrideAttrs (old: { name = old.name + "-${channel_name}-nix-(${x.version}"; })) (allNixVersions pkgs)
) [ "channel:nixos-23.05" "channel:nixos-unstable" ]
) channelsToTest

0 comments on commit 697a353

Please sign in to comment.