From ccd9a55a9b5c9f7e2295ce64085573a9cda33e2b Mon Sep 17 00:00:00 2001 From: a-kenji Date: Thu, 17 Mar 2022 14:00:48 +0100 Subject: [PATCH] add(ci): install `cargo-make` through `nix` (#1233) * add(ci): install `cargo-make` through `nix` Should speed the e2e tests up by about 2 minutes. Can easily reverted by `commenting/uncommenting` the `run` part of the `Install cargo-make` step. * check if cachix speeds the process up --- .github/workflows/e2e.yml | 9 ++++++++- nix/default.nix | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index fff090c6..a138126a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,6 +13,7 @@ jobs: test: name: Build generic binary and run tests on it runs-on: ubuntu-latest + environment: cachix services: ssh: @@ -29,6 +30,11 @@ jobs: options: -v ${{ github.workspace }}/target:/usr/src/zellij --name ssh steps: - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v16 + - uses: cachix/cachix-action@v10 + with: + name: zellij + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Add WASM target run: rustup target add wasm32-wasi - name: Install musl-tools @@ -36,7 +42,8 @@ jobs: - name: Add musl target run: rustup target add x86_64-unknown-linux-musl - name: Install cargo-make - run: cargo install --debug cargo-make + run: nix profile install nixpkgs#cargo-make + #run: cargo install --debug cargo-make - name: Build asset run: cargo make build-e2e # we copy this manually into the target folder instead of mounting it because diff --git a/nix/default.nix b/nix/default.nix index a05d9130..ad2f1de0 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -158,6 +158,12 @@ in rec { name = "fmt-shell"; nativeBuildInputs = fmtInputs; }; + e2eShell = pkgs.mkShell { + name = "e2e-shell"; + nativeBuildInputs = [ + pkgs.cargo-make + ]; + }; }; devShell = devShells.zellij;