mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-31 15:20:15 +00:00
Use Rust cache action
This commit is contained in:
parent
88b3321ec5
commit
52433f7412
34
.github/workflows/ci.yml
vendored
34
.github/workflows/ci.yml
vendored
@ -15,15 +15,11 @@ jobs:
|
|||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cache ~/.cargo/bin directory
|
- uses: Swatinem/rust-cache@v1.2.0
|
||||||
id: cargo-bin-cache
|
id: cache
|
||||||
uses: actions/cache@v2.1.4
|
|
||||||
with:
|
|
||||||
path: ~/.cargo/bin
|
|
||||||
key: ubuntu-rust-${{ hashFiles('rust-toolchain') }}-cargo-bin-directory-v1
|
|
||||||
|
|
||||||
- name: Install tomlfmt
|
- name: Install tomlfmt
|
||||||
if: steps.cargo-bin-cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: cargo install cargo-tomlfmt
|
run: cargo install cargo-tomlfmt
|
||||||
|
|
||||||
- name: Check Cargo.toml formatting
|
- name: Check Cargo.toml formatting
|
||||||
@ -58,13 +54,7 @@ jobs:
|
|||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cache target and registry directory
|
- uses: Swatinem/rust-cache@v1.2.0
|
||||||
uses: actions/cache@v2.1.4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target
|
|
||||||
~/.cargo/registry
|
|
||||||
key: rust-${{ matrix.target }}-build-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('rust-toolchain') }}-v1
|
|
||||||
|
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
run: |
|
run: |
|
||||||
@ -99,13 +89,7 @@ jobs:
|
|||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cache target and registry directory
|
- uses: Swatinem/rust-cache@v1.2.0
|
||||||
uses: actions/cache@v2.1.4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target
|
|
||||||
~/.cargo/registry
|
|
||||||
key: rust-${{ matrix.target }}-test-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('rust-toolchain') }}-v1
|
|
||||||
|
|
||||||
- name: Build tests
|
- name: Build tests
|
||||||
run: cargo build --tests --workspace --all-features
|
run: cargo build --tests --workspace --all-features
|
||||||
@ -135,13 +119,7 @@ jobs:
|
|||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cache target and registry directory
|
- uses: Swatinem/rust-cache@v1.2.0
|
||||||
uses: actions/cache@v2.1.4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target
|
|
||||||
~/.cargo/registry
|
|
||||||
key: rust-${{ matrix.target }}-test-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('rust-toolchain') }}-v1
|
|
||||||
|
|
||||||
- name: Run test ${{ matrix.test_name }}
|
- name: Run test ${{ matrix.test_name }}
|
||||||
run: cargo test --package swap --all-features --test ${{ matrix.test_name }} ""
|
run: cargo test --package swap --all-features --test ${{ matrix.test_name }} ""
|
||||||
|
2
.github/workflows/release-cli.yml
vendored
2
.github/workflows/release-cli.yml
vendored
@ -27,6 +27,8 @@ jobs:
|
|||||||
ref: ${{ github.event.release.target_commitish }}
|
ref: ${{ github.event.release.target_commitish }}
|
||||||
token: ${{ secrets.BOTTY_GITHUB_TOKEN }}
|
token: ${{ secrets.BOTTY_GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1.2.0
|
||||||
|
|
||||||
- name: Build ${{ matrix.target }} release binary
|
- name: Build ${{ matrix.target }} release binary
|
||||||
run: cargo build --target=${{ matrix.target }} --release --package swap --bin swap_cli
|
run: cargo build --target=${{ matrix.target }} --release --package swap --bin swap_cli
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user