aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-03-13 16:53:35 +0100
committerGitHub <noreply@github.com>2020-03-13 16:53:35 +0100
commiteab7d790a36ff0aa648321a39eaeaa4248755156 (patch)
tree543798e5f8a2d921c35dafc10bbb17bbba0a1dab
parent858ad7a4b3eed6a5f950ef7fa06497cd23635e8f (diff)
parentc0a3ff7d47f5a0d0322689d446d71e2372de37d1 (diff)
Merge pull request #3409 from NixOS/github-actions
Add CI with github actions
-rw-r--r--.github/workflows/test.yml14
-rw-r--r--release.nix7
2 files changed, 17 insertions, 4 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 000000000..87997414d
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,14 @@
+name: "Test"
+on:
+ pull_request:
+ push:
+jobs:
+ tests:
+ strategy:
+ matrix:
+ os: [ubuntu-18.04, macos]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v2
+ - uses: cachix/install-nix-action@v8
+ - run: nix-build release.nix --arg nix '{ outPath = ./.; revCount = 123; shortRev = "abcdefgh"; }' --arg systems '[ builtins.currentSystem ]' -A installerScript -A perlBindings
diff --git a/release.nix b/release.nix
index 1f592424b..b1cb1e437 100644
--- a/release.nix
+++ b/release.nix
@@ -340,17 +340,16 @@ let
installerScript =
pkgs.runCommand "installer-script"
- { buildInputs = [ build.x86_64-linux ];
- }
+ { buildInputs = [ build.${builtins.currentSystem or "x86_64-linux"} ]; }
''
mkdir -p $out/nix-support
substitute ${./scripts/install.in} $out/install \
${pkgs.lib.concatMapStrings
(system: "--replace '@binaryTarball_${system}@' $(nix --experimental-features nix-command hash-file --base16 --type sha256 ${binaryTarball.${system}}/*.tar.xz) ")
- [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" ]
+ systems
} \
- --replace '@nixVersion@' ${build.x86_64-linux.src.version}
+ --replace '@nixVersion@' ${build.${builtins.head systems}.src.version}
echo "file installer $out/install" >> $out/nix-support/hydra-build-products
'';