|
|
|
@ -15,15 +15,11 @@ jobs:
|
|
|
|
|
- name: Checkout sources
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
- name: Cache ~/.cargo/bin directory
|
|
|
|
|
id: cargo-bin-cache
|
|
|
|
|
uses: actions/cache@v2.1.4
|
|
|
|
|
with:
|
|
|
|
|
path: ~/.cargo/bin
|
|
|
|
|
key: ubuntu-rust-${{ hashFiles('rust-toolchain') }}-cargo-bin-directory-v1
|
|
|
|
|
- uses: Swatinem/rust-cache@v1.2.0
|
|
|
|
|
id: cache
|
|
|
|
|
|
|
|
|
|
- name: Install tomlfmt
|
|
|
|
|
if: steps.cargo-bin-cache.outputs.cache-hit != 'true'
|
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
|
run: cargo install cargo-tomlfmt
|
|
|
|
|
|
|
|
|
|
- name: Check Cargo.toml formatting
|
|
|
|
@ -58,13 +54,7 @@ jobs:
|
|
|
|
|
- name: Checkout sources
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
- name: Cache target and registry directory
|
|
|
|
|
uses: actions/cache@v2.1.4
|
|
|
|
|
with:
|
|
|
|
|
path: |
|
|
|
|
|
target
|
|
|
|
|
~/.cargo/registry
|
|
|
|
|
key: rust-${{ matrix.target }}-build-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('rust-toolchain') }}-v1
|
|
|
|
|
- uses: Swatinem/rust-cache@v1.2.0
|
|
|
|
|
|
|
|
|
|
- name: Build binary
|
|
|
|
|
run: |
|
|
|
|
@ -99,13 +89,7 @@ jobs:
|
|
|
|
|
- name: Checkout sources
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
- name: Cache target and registry directory
|
|
|
|
|
uses: actions/cache@v2.1.4
|
|
|
|
|
with:
|
|
|
|
|
path: |
|
|
|
|
|
target
|
|
|
|
|
~/.cargo/registry
|
|
|
|
|
key: rust-${{ matrix.target }}-test-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('rust-toolchain') }}-v1
|
|
|
|
|
- uses: Swatinem/rust-cache@v1.2.0
|
|
|
|
|
|
|
|
|
|
- name: Build tests
|
|
|
|
|
run: cargo build --tests --workspace --all-features
|
|
|
|
@ -135,13 +119,7 @@ jobs:
|
|
|
|
|
- name: Checkout sources
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
- name: Cache target and registry directory
|
|
|
|
|
uses: actions/cache@v2.1.4
|
|
|
|
|
with:
|
|
|
|
|
path: |
|
|
|
|
|
target
|
|
|
|
|
~/.cargo/registry
|
|
|
|
|
key: rust-${{ matrix.target }}-test-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('rust-toolchain') }}-v1
|
|
|
|
|
- uses: Swatinem/rust-cache@v1.2.0
|
|
|
|
|
|
|
|
|
|
- name: Run test ${{ matrix.test_name }}
|
|
|
|
|
run: cargo test --package swap --all-features --test ${{ matrix.test_name }} ""
|
|
|
|
|