Support macOS

Currently it requires Linux remote builders to be set up to do
anything useful, but soon it will not once we able to initiate
builds directly on the target nodes themselves.
This commit is contained in:
Zhaofeng Li 2022-01-01 16:41:35 -08:00
parent f9f4dd5f63
commit 06804e3715
3 changed files with 9 additions and 5 deletions

View file

@ -4,9 +4,11 @@ on:
push:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
- macos-11
nix:
- name: 2.4
url: https://releases.nixos.org/nix/nix-2.4/install
@ -14,6 +16,7 @@ jobs:
# url: https://releases.nixos.org/nix/nix-2.3.16/install
#- name: 2.5pre
# url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.5pre20211026_5667822/install
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.5
- uses: cachix/install-nix-action@v15
@ -43,9 +46,10 @@ jobs:
if: ${{ !contains(matrix.nix.name, '2.3') }}
tests:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
nix:
- name: 2.3.16
url: https://releases.nixos.org/nix/nix-2.3.16/install
@ -53,6 +57,7 @@ jobs:
url: https://releases.nixos.org/nix/nix-2.4/install
- name: 2.5pre
url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.5pre20211026_5667822/install
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.5
- uses: cachix/install-nix-action@v15

View file

@ -41,6 +41,6 @@ in rustPlatform.buildRustPackage rec {
homepage = "https://zhaofengli.github.io/colmena/${passthru.apiVersion}";
license = licenses.mit;
maintainers = with maintainers; [ zhaofengli ];
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
};
}

View file

@ -12,8 +12,7 @@
};
outputs = { self, nixpkgs, utils, ... }: let
# We aren't testing against Darwin at the moment
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
in utils.lib.eachSystem supportedSystems (system: let
pkgs = import nixpkgs { inherit system; };
in rec {