From 30962d21beb2133b5d986b8aebfe64408be5e80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 13 Mar 2020 11:57:58 +0100 Subject: [PATCH] Add CI with github actions --- .github/workflows/test.yml | 14 ++++++++++++++ release.nix | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..f261cd0bc --- /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 build -A binaryTarball -A perlBindings -A installerScript diff --git a/release.nix b/release.nix index 1f592424b..45c2f14ba 100644 --- a/release.nix +++ b/release.nix @@ -348,9 +348,9 @@ let 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 '';