|
|
|
@ -15,13 +15,13 @@ jobs: |
|
|
|
|
uses: actions/checkout@v2 |
|
|
|
|
with: |
|
|
|
|
fetch-depth: 0 # Nix Flakes doesn't work on shallow clones |
|
|
|
|
- name: Install Nix (flakes, nixos-unstable) |
|
|
|
|
- name: Install Nix (flakes, nixpkgs-unstable) |
|
|
|
|
uses: cachix/install-nix-action@v12 |
|
|
|
|
with: |
|
|
|
|
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install |
|
|
|
|
extra_nix_config: | |
|
|
|
|
experimental-features = nix-command flakes |
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable |
|
|
|
|
nix_path: nixpkgs=channel:nixpkgs-unstable |
|
|
|
|
- name: Check flake |
|
|
|
|
run: nix flake check -v --show-trace --no-update-lock-file |
|
|
|
|
|
|
|
|
@ -85,10 +85,16 @@ jobs: |
|
|
|
|
steps: |
|
|
|
|
- name: Checkout |
|
|
|
|
uses: actions/checkout@v2 |
|
|
|
|
- name: Install Nix (flakes, nixos-unstable) |
|
|
|
|
- name: Get locked nixpkgs revision |
|
|
|
|
id: nixpkgs_rev |
|
|
|
|
run: | |
|
|
|
|
rev=$(jq '.nodes.nixpkgs.locked.rev' --raw-output flake.lock) |
|
|
|
|
echo "Revision: $rev" |
|
|
|
|
echo "::set-output name=rev::$rev" |
|
|
|
|
- name: Install Nix |
|
|
|
|
uses: cachix/install-nix-action@v12 |
|
|
|
|
with: |
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable |
|
|
|
|
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/${{ steps.nixpkgs_rev.outputs.rev }}.tar.gz |
|
|
|
|
- name: Instantiate derivation |
|
|
|
|
id: instantiate |
|
|
|
|
run: | |
|
|
|
@ -105,6 +111,9 @@ jobs: |
|
|
|
|
run: | |
|
|
|
|
nix-build -E "$build_expr" |
|
|
|
|
./result/bin/rustc --version |
|
|
|
|
- name: Prepare nix-shell |
|
|
|
|
if: steps.cache-drv-status.outputs.cache-hit != 'true' |
|
|
|
|
run: nix-shell -p "$build_expr" --pure --command "exit" |
|
|
|
|
- name: Check compile |
|
|
|
|
if: steps.cache-drv-status.outputs.cache-hit != 'true' |
|
|
|
|
run: | |
|
|
|
|