2020-03-28 14:24:17 +00:00
|
|
|
name: "Test"
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
jobs:
|
|
|
|
tests:
|
2020-05-14 17:08:49 +00:00
|
|
|
runs-on: macos-10.15
|
2020-11-04 20:05:19 +00:00
|
|
|
timeout-minutes: 30
|
2020-03-28 14:24:17 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-04 20:05:19 +00:00
|
|
|
- uses: cachix/install-nix-action@v12
|
|
|
|
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-20.09-darwin -I darwin=. -A tests
|
|
|
|
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-20.09-darwin -I darwin=. -A manpages
|
|
|
|
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-20.09-darwin -I darwin=. -A examples.simple
|
2020-03-28 14:24:17 +00:00
|
|
|
install:
|
2020-05-14 17:08:49 +00:00
|
|
|
runs-on: macos-10.15
|
2020-11-04 20:05:19 +00:00
|
|
|
timeout-minutes: 30
|
2020-03-28 14:24:17 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-04 20:05:19 +00:00
|
|
|
- uses: cachix/install-nix-action@v12
|
2020-03-28 14:24:17 +00:00
|
|
|
- run: |
|
2020-11-04 20:05:19 +00:00
|
|
|
nix-channel --add https://nixos.org/channels/nixpkgs-20.09-darwin nixpkgs
|
2020-03-28 14:24:17 +00:00
|
|
|
nix-channel --update
|
|
|
|
echo "FIXME workaround channel permission error"
|
|
|
|
- run: |
|
2020-11-04 20:05:19 +00:00
|
|
|
export NIX_PATH=$HOME/.nix-defexpr/channels
|
2020-03-28 14:24:17 +00:00
|
|
|
nix-shell -A installer
|
|
|
|
nix-shell -A installer.check
|
|
|
|
- run: |
|
|
|
|
. /etc/static/bashrc
|
|
|
|
darwin-rebuild switch -I darwin=.
|
|
|
|
- run: |
|
2020-11-04 20:05:19 +00:00
|
|
|
export NIX_PATH=$HOME/.nix-defexpr/channels
|
2020-03-28 14:24:17 +00:00
|
|
|
nix-shell -A uninstaller
|
|
|
|
nix-shell -A uninstaller.check
|
2020-10-18 12:36:51 +00:00
|
|
|
install-flake:
|
|
|
|
runs-on: macos-10.15
|
2020-11-04 20:05:19 +00:00
|
|
|
timeout-minutes: 30
|
2020-10-18 12:36:51 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-04 20:05:19 +00:00
|
|
|
- uses: cachix/install-nix-action@v12
|
2020-10-18 12:36:51 +00:00
|
|
|
- run: |
|
2020-11-04 20:05:19 +00:00
|
|
|
nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
|
2020-10-18 12:36:51 +00:00
|
|
|
nix-channel --update
|
|
|
|
echo "FIXME workaround channel permission error"
|
2020-11-04 20:05:19 +00:00
|
|
|
- run: |
|
|
|
|
NIX_PATH=$HOME/.nix-defexpr/channels nix-shell -A installer
|
2020-10-18 12:36:51 +00:00
|
|
|
echo "TODO installed doesn't support flakes, handle multi-user install"
|
|
|
|
- run: |
|
2020-11-04 20:05:19 +00:00
|
|
|
nix-build channel:nixpkgs-unstable -A nixUnstable -o nix-unstable
|
|
|
|
./nix-unstable/bin/nix --experimental-features 'nix-command flakes' registry add darwin $PWD
|
|
|
|
./nix-unstable/bin/nix --experimental-features 'nix-command flakes' build ./modules/examples#darwinConfigurations.simple.system
|
2020-10-18 12:36:51 +00:00
|
|
|
- run: |
|
2020-10-18 19:30:06 +00:00
|
|
|
./result/sw/bin/darwin-rebuild switch --flake ./modules/examples#simple
|
2020-10-18 12:36:51 +00:00
|
|
|
- run: |
|
|
|
|
. /etc/static/bashrc
|
2020-10-18 19:30:06 +00:00
|
|
|
darwin-rebuild build --flake ./modules/examples#simple
|