mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-10 01:56:56 +00:00
.github/workflows/ci.yml: Use swatinem/rust-cache (#2228)
This commit is contained in:
parent
e83e1b3d0b
commit
6f7a19e753
50
.github/workflows/ci.yml
vendored
50
.github/workflows/ci.yml
vendored
@ -19,17 +19,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2.3.4
|
||||||
|
|
||||||
- name: Cache CARGO_HOME
|
- uses: Swatinem/rust-cache@v1.3.0
|
||||||
uses: actions/cache@v2.1.6
|
|
||||||
with:
|
|
||||||
path: ~/.cargo
|
|
||||||
key: cargo-home-${{ hashFiles('Cargo.toml') }}
|
|
||||||
|
|
||||||
- name: Cache cargo build
|
|
||||||
uses: actions/cache@v2.1.6
|
|
||||||
with:
|
|
||||||
path: target
|
|
||||||
key: cargo-build-target-${{ hashFiles('Cargo.toml') }}
|
|
||||||
|
|
||||||
- name: Run tests, with no feature
|
- name: Run tests, with no feature
|
||||||
run: cargo test --workspace --no-default-features
|
run: cargo test --workspace --no-default-features
|
||||||
@ -72,25 +62,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Install a recent version of clang
|
- name: Install a recent version of clang
|
||||||
run: |
|
run: |
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
|
||||||
echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" >> /etc/apt/sources.list
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y clang-11
|
apt-get install -y clang-11
|
||||||
|
|
||||||
- name: Install CMake
|
- name: Install CMake
|
||||||
run: apt-get install -y cmake
|
run: apt-get install -y cmake
|
||||||
|
|
||||||
- name: Cache CARGO_HOME
|
- uses: Swatinem/rust-cache@v1.3.0
|
||||||
uses: actions/cache@v2.1.6
|
|
||||||
with:
|
|
||||||
path: ~/.cargo
|
|
||||||
key: cargo-home-${{ hashFiles('Cargo.toml') }}
|
|
||||||
|
|
||||||
- name: Cache cargo build
|
|
||||||
uses: actions/cache@v2.1.6
|
|
||||||
with:
|
|
||||||
path: target
|
|
||||||
key: wasm-cargo-build-target-${{ hashFiles('Cargo.toml') }}
|
|
||||||
|
|
||||||
- name: Build on wasm32-unknown-emscripten
|
- name: Build on wasm32-unknown-emscripten
|
||||||
# TODO: also run `cargo test`
|
# TODO: also run `cargo test`
|
||||||
@ -137,17 +115,7 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
components: clippy
|
components: clippy
|
||||||
|
|
||||||
- name: Cache CARGO_HOME
|
- uses: Swatinem/rust-cache@v1.3.0
|
||||||
uses: actions/cache@v2.1.6
|
|
||||||
with:
|
|
||||||
path: ~/.cargo
|
|
||||||
key: cargo-home-${{ hashFiles('Cargo.toml') }}
|
|
||||||
|
|
||||||
- name: Cache cargo build
|
|
||||||
uses: actions/cache@v2.1.6
|
|
||||||
with:
|
|
||||||
path: target
|
|
||||||
key: cargo-build-target-${{ hashFiles('Cargo.toml') }}
|
|
||||||
|
|
||||||
- name: Run cargo clippy
|
- name: Run cargo clippy
|
||||||
uses: actions-rs/cargo@v1.0.3
|
uses: actions-rs/cargo@v1.0.3
|
||||||
@ -168,17 +136,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2.3.4
|
||||||
|
|
||||||
- name: Cache CARGO_HOME
|
- uses: Swatinem/rust-cache@v1.3.0
|
||||||
uses: actions/cache@v2.1.6
|
|
||||||
with:
|
|
||||||
path: ~/.cargo
|
|
||||||
key: cargo-home-${{ hashFiles('Cargo.toml') }}
|
|
||||||
|
|
||||||
- name: Cache cargo build
|
|
||||||
uses: actions/cache@v2.1.6
|
|
||||||
with:
|
|
||||||
path: target
|
|
||||||
key: cargo-build-target-${{ hashFiles('Cargo.toml') }}
|
|
||||||
|
|
||||||
- name: Run ipfs-kad example
|
- name: Run ipfs-kad example
|
||||||
run: RUST_LOG=libp2p_swarm=debug,libp2p_kad=trace,libp2p_tcp=debug cargo run --example ipfs-kad
|
run: RUST_LOG=libp2p_swarm=debug,libp2p_kad=trace,libp2p_tcp=debug cargo run --example ipfs-kad
|
||||||
|
Loading…
x
Reference in New Issue
Block a user