From 74b66bb1cf1dc7a1110dbe3de77982137cacc12b Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Sat, 16 Sep 2023 11:41:43 +0200 Subject: [PATCH] try --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++---- .github/workflows/rustup.yml | 29 ----------------------------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02ea41ca..49c33da9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,16 +10,36 @@ env: CARGO_TERM_COLOR: always jobs: - setup: + install_toolchain: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - - name: Set-Up run: sudo apt-get update && sudo apt-get install -f -y git clang curl libssl-dev llvm libudev-dev protobuf-compiler eatmydata - check: + - name: Cache toolchain + id: cache-rustup + uses: actions/cache@v3 + with: + key: ${{ runner.os }}-toolchain-${{ hashFiles('**/rust-toolchain.toml') }} + path: | + ~/.cargo/ + ~/.rustup/ + + - name: Install Rustup + id: install-rustup + if: steps.cache-rustup.outputs.cache-hit != 'true' + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source ~/.cargo/env + which rustup + rustup default stable + rustup update nightly + rustup update stable + rustup toolchain install nightly + rustup target add wasm32-unknown-unknown --toolchain nightly + + build: runs-on: ubuntu-latest needs: [install_toolchain] @@ -42,5 +62,7 @@ jobs: - name: Build run: SKIP_WASM_BUILD= eatmydata cargo check --all-targets --features runtime-benchmarks + test: + needs: [build] - name: Test run: SKIP_WASM_BUILD= eatmydata cargo test --workspace --features runtime-benchmarks -- --nocapture diff --git a/.github/workflows/rustup.yml b/.github/workflows/rustup.yml index b5c69e7a..b1a70440 100644 --- a/.github/workflows/rustup.yml +++ b/.github/workflows/rustup.yml @@ -5,32 +5,3 @@ on: pull_request: branches: [ main, develop ] -jobs: - install_toolchain: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set-Up - run: sudo apt-get update && sudo apt-get install -f -y git clang curl libssl-dev llvm libudev-dev protobuf-compiler eatmydata - - - name: Cache toolchain - id: cache-rustup - uses: actions/cache@v3 - with: - key: ${{ runner.os }}-toolchain-${{ hashFiles('**/rust-toolchain.toml') }} - path: | - ~/.cargo/ - ~/.rustup/ - - - name: Install Rustup - id: install-rustup - if: steps.cache-rustup.outputs.cache-hit != 'true' - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source ~/.cargo/env - which rustup - rustup default stable - rustup update nightly - rustup update stable - rustup toolchain install nightly - rustup target add wasm32-unknown-unknown --toolchain nightly