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
This commit is contained in:
a-kenji 2022-03-17 14:00:48 +01:00 committed by GitHub
parent 6d71d0a9f1
commit ccd9a55a9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -13,6 +13,7 @@ jobs:
test: test:
name: Build generic binary and run tests on it name: Build generic binary and run tests on it
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: cachix
services: services:
ssh: ssh:
@ -29,6 +30,11 @@ jobs:
options: -v ${{ github.workspace }}/target:/usr/src/zellij --name ssh options: -v ${{ github.workspace }}/target:/usr/src/zellij --name ssh
steps: steps:
- uses: actions/checkout@v3 - 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 - name: Add WASM target
run: rustup target add wasm32-wasi run: rustup target add wasm32-wasi
- name: Install musl-tools - name: Install musl-tools
@ -36,7 +42,8 @@ jobs:
- name: Add musl target - name: Add musl target
run: rustup target add x86_64-unknown-linux-musl run: rustup target add x86_64-unknown-linux-musl
- name: Install cargo-make - 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 - name: Build asset
run: cargo make build-e2e run: cargo make build-e2e
# we copy this manually into the target folder instead of mounting it because # we copy this manually into the target folder instead of mounting it because

View file

@ -158,6 +158,12 @@ in rec {
name = "fmt-shell"; name = "fmt-shell";
nativeBuildInputs = fmtInputs; nativeBuildInputs = fmtInputs;
}; };
e2eShell = pkgs.mkShell {
name = "e2e-shell";
nativeBuildInputs = [
pkgs.cargo-make
];
};
}; };
devShell = devShells.zellij; devShell = devShells.zellij;