build(github CI): replace `actions/cache@v2` with `Swatinem/rust-cache@v2` (#123)
This commit is contained in:
parent
e4071fea6e
commit
e8642fe521
|
@ -20,14 +20,7 @@ jobs:
|
||||||
- name: install target
|
- name: install target
|
||||||
run: rustup target add aarch64-apple-darwin
|
run: rustup target add aarch64-apple-darwin
|
||||||
|
|
||||||
- name: cargo cache artifacts
|
- uses: Swatinem/rust-cache@v2
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: cargo build --package cli --release --target aarch64-apple-darwin
|
run: cargo build --package cli --release --target aarch64-apple-darwin
|
||||||
|
@ -66,14 +59,7 @@ jobs:
|
||||||
- name: install target
|
- name: install target
|
||||||
run: rustup target add x86_64-apple-darwin
|
run: rustup target add x86_64-apple-darwin
|
||||||
|
|
||||||
- name: cargo cache artifacts
|
- uses: Swatinem/rust-cache@v2
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: cargo build --package cli --release --target x86_64-apple-darwin
|
run: cargo build --package cli --release --target x86_64-apple-darwin
|
||||||
|
@ -118,14 +104,7 @@ jobs:
|
||||||
sudo apt-get install -y gcc-aarch64-linux-gnu
|
sudo apt-get install -y gcc-aarch64-linux-gnu
|
||||||
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: cargo cache artifacts
|
- uses: Swatinem/rust-cache@v2
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: cargo build --package cli --release --target aarch64-unknown-linux-gnu
|
run: cargo build --package cli --release --target aarch64-unknown-linux-gnu
|
||||||
|
@ -164,14 +143,7 @@ jobs:
|
||||||
- name: install target
|
- name: install target
|
||||||
run: rustup target add x86_64-unknown-linux-gnu
|
run: rustup target add x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
- name: cargo cache artifacts
|
- uses: Swatinem/rust-cache@v2
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: cargo build --package cli --release --target x86_64-unknown-linux-gnu
|
run: cargo build --package cli --release --target x86_64-unknown-linux-gnu
|
||||||
|
|
|
@ -17,13 +17,7 @@ jobs:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
override: true
|
override: true
|
||||||
- uses: actions/cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: check
|
command: check
|
||||||
|
@ -38,13 +32,7 @@ jobs:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
override: true
|
override: true
|
||||||
- uses: actions/cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
|
@ -61,13 +49,7 @@ jobs:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
override: true
|
override: true
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
- uses: actions/cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: fmt
|
command: fmt
|
||||||
|
@ -84,13 +66,7 @@ jobs:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
override: true
|
override: true
|
||||||
components: clippy
|
components: clippy
|
||||||
- uses: actions/cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
|
|
Loading…
Reference in New Issue