@ -15,19 +15,12 @@ jobs:
- name : Checkout sources
- name : Checkout sources
uses : actions/checkout@v2
uses : actions/checkout@v2
- name : Install Rust
uses : actions-rs/toolchain@v1
with:
profile : minimal
override : true
components : rustfmt, clippy
- name : Cache ~/.cargo/bin directory
- name : Cache ~/.cargo/bin directory
id : cargo-bin-cache
id : cargo-bin-cache
uses : actions/cache@v2.1.4
uses : actions/cache@v2.1.4
with:
with:
path : ~/.cargo/bin
path : ~/.cargo/bin
key : ubuntu-rust-${{ env.RUST_TOOLCHAIN }}-cargo-bin-directory-v1
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.cargo-bin-cache.outputs.cache-hit != 'true'
@ -63,19 +56,13 @@ jobs:
- name : Checkout sources
- name : Checkout sources
uses : actions/checkout@v2
uses : actions/checkout@v2
- name : Install Rust toolchain
uses : actions-rs/toolchain@v1
with:
profile : minimal
override : true
- name : Cache target and registry directory
- name : Cache target and registry directory
uses : actions/cache@v2.1.4
uses : actions/cache@v2.1.4
with:
with:
path : |
path : |
target
target
~/.cargo/registry
~/.cargo/registry
key : rust-${{ matrix.target }}-build-${{ hashFiles('Cargo.lock') }}- v1
key : rust-${{ matrix.target }}-build-${{ hashFiles('Cargo.lock') }}- ${{ hashFiles('rust-toolchain') }}- v1
- name : Build binary
- name : Build binary
run : |
run : |
@ -110,19 +97,13 @@ jobs:
- name : Checkout sources
- name : Checkout sources
uses : actions/checkout@v2
uses : actions/checkout@v2
- name : Install Rust toolchain
uses : actions-rs/toolchain@v1
with:
profile : minimal
override : true
- name : Cache target and registry directory
- name : Cache target and registry directory
uses : actions/cache@v2.1.4
uses : actions/cache@v2.1.4
with:
with:
path : |
path : |
target
target
~/.cargo/registry
~/.cargo/registry
key : rust-${{ matrix.target }}-test-${{ hashFiles('Cargo.lock') }}- v1
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
@ -152,19 +133,13 @@ jobs:
- name : Checkout sources
- name : Checkout sources
uses : actions/checkout@v2
uses : actions/checkout@v2
- name : Install Rust toolchain
uses : actions-rs/toolchain@v1
with:
profile : minimal
override : true
- name : Cache target and registry directory
- name : Cache target and registry directory
uses : actions/cache@v2.1.4
uses : actions/cache@v2.1.4
with:
with:
path : |
path : |
target
target
~/.cargo/registry
~/.cargo/registry
key : rust-${{ matrix.target }}-test-${{ hashFiles('Cargo.lock') }}- v1
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 }} ""