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

.github: Update CI runner to macos-latest #46

Merged
merged 5 commits into from
Nov 15, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
check:
runs-on: macos-13
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

result*

/ci/*.json

*.o
*.out

Expand Down
5 changes: 3 additions & 2 deletions ci/activate-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ if [[ "$#" != "1" ]]; then
fi
example="$1"

nix-instantiate --eval --json -E 'builtins.currentSystem' >"${DIR}/system.json"
systemProfile=$(nix build "./${DIR}/..#darwinConfigurations.ci.${example}.system" -L --no-link --print-out-paths)
system="$(nix eval --raw --impure --expr 'builtins.currentSystem')"
>&2 echo "System: ${system}"

systemProfile="$(nix build "./${DIR}/..#ci.${system}.${example}.system" -L --no-link --print-out-paths)"
>&2 echo "Built $systemProfile"

sudo rm "/etc/nix/nix.conf"
Expand Down
6 changes: 2 additions & 4 deletions ci/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Activates example configurations on CI

{ self, nix-darwin, nixpkgs, ... }:
{ self, pkgs, nix-darwin, ... }:

let
system = builtins.fromJSON (builtins.readFile ./system.json);
pkgs = nixpkgs.legacyPackages.${system};
inherit (pkgs) lib;
inherit (pkgs) lib system;
makeProfile = example: nix-darwin.lib.darwinSystem {
inherit system pkgs;
modules = [
Expand Down
1 change: 0 additions & 1 deletion ci/example.json

This file was deleted.

1 change: 0 additions & 1 deletion ci/step.json

This file was deleted.

1 change: 0 additions & 1 deletion ci/system.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/migrate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{
nix-homebrew = {
enable = true;
enableRosetta = true;
autoMigrate = true;
user = "yourname";
};
Expand Down
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

BREW_SRC = brew-src;
};
ci = import ./ci (inputs // {
inherit pkgs;
});
}) // {
darwinModules = {
nix-homebrew = { lib, ... }: {
Expand All @@ -41,8 +44,5 @@
});
};
};
darwinConfigurations = {
ci = import ./ci inputs;
};
};
}
2 changes: 1 addition & 1 deletion modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ let

if test -n "${toString cfg.enableRosetta}" && ! pgrep -q oahd; then
warn "The Intel Homebrew prefix has been set up, but Rosetta isn't installed yet."
ohai 'Run ''${tty_bold}softwareupdate --install-rosetta''${tty_reset} to install it.'
ohai "Run ''${tty_bold}softwareupdate --install-rosetta''${tty_reset} to install it."
fi
'';

Expand Down
Loading