Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(gh-actions): Switch to macos-14; prequal to #42 #45

Merged
merged 4 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions lib/mk-gh-actions-matrix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
}: {
flake = {
lib = rec {
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
nixSystemToGHPlatform = {
"ubuntu-latest" = "x86_64-linux";
"macos-latest" = "x86_64-darwin";
# not supported:
# "macos-latest-xlarge" = "aarch64-darwin";
"x86_64-linux" = "ubuntu-latest";
# "x86_64-darwin" = "macos-13"; - macos-13 is a 4 x86_64 vCPU / 14GB RAM
"x86_64-darwin" = "macos-14"; # - macos-14 is a 3 aarch64 vCPU / 7GB RAM (but it seems faster than the macos-13 one)
"aarch64-darwin" = "macos-14";
};

inherit (import ./build-status.nix {inherit lib;}) getBuildStatus;
Expand All @@ -18,8 +19,8 @@
include = lib.pipe (builtins.attrNames nixSystemToGHPlatform) [
(builtins.concatMap
(
platform: let
system = nixSystemToGHPlatform.${platform};
system: let
platform = nixSystemToGHPlatform.${system};
in
map (package: let
p = self.packages.${system}.${package};
Expand Down
8 changes: 8 additions & 0 deletions lib/version-catalog.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
darwinPkgs = {
inherit (pkgs.darwin.apple_sdk.frameworks) Foundation;
};

system = pkgs.hostPlatform.system;
filterBySystem = pkgs:
lib.filterAttrs
(_name: pkg: builtins.elem system pkg.meta.platforms)
pkgs;
in {
genPkgVersions = pkgName: let
mod = ../pkgs/${pkgName}/version-catalog.nix;
Expand Down Expand Up @@ -47,6 +53,7 @@ in {
)
)
listToAttrs
filterBySystem
];

hierarchical = {
Expand All @@ -58,6 +65,7 @@ in {
supportedVersions."${type}"
)))
listToAttrs
filterBySystem
];
};
};
Expand Down
13 changes: 9 additions & 4 deletions pkgs/ldc/binary.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
"i686-windows" = "windows-x86";
};

defaultSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];

supportedSystems = lib.pipe (builtins.attrNames systemToArchivePlatform) [
(builtins.filter (x: builtins.elem x defaultSystems))
(builtins.filter (sys: hashes.${systemToArchivePlatform.${sys}} != null))
];

tarballSuffix =
if hostPlatform.isWindows
then "7z"
Expand All @@ -43,7 +50,7 @@ in
inherit version;

passthru = {
inherit buildStatus;
inherit buildStatus supportedSystems hashes;
};

src = fetchurl rec {
Expand Down Expand Up @@ -75,8 +82,6 @@ in
# from https://github.com/ldc-developers/ldc/blob/master/LICENSE
license = with licenses; [bsd3 boost mit ncsa gpl2Plus];
maintainers = with maintainers; [ThomasMader lionello];
# FIXME: change to the following after the CI verifies it:
# platforms = builtins.attrNames systemToArchivePlatform;
platforms = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
platforms = supportedSystems;
};
}
5 changes: 5 additions & 0 deletions pkgs/ldc/build-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"build": false,
"check": false,
"skippedTests": []
},
"aarch64-darwin": {
"build": false,
"check": false,
"skippedTests": []
}
}
}
Loading