From 59cb85bf4ec3dfcd2baa8e2b5f45055459c9cbfc Mon Sep 17 00:00:00 2001 From: Andre da Silva Date: Fri, 1 Nov 2024 21:29:02 -0300 Subject: [PATCH] Split rust CI into more jobs --- .github/workflows/rust.yml | 71 +++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d851a1cc817e..b032362d1866 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -38,7 +38,7 @@ permissions: jobs: test: runs-on: ubuntu-latest-16-cores - timeout-minutes: 75 + timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -76,10 +76,9 @@ jobs: run: | cd examples cargo build --locked --release --target wasm32-unknown-unknown - - name: Run the storage-service instance and the storage-service tests + - name: Run the storage-service instance run: | cargo run --release -p linera-storage-service -- memory --endpoint $LINERA_STORAGE_SERVICE & - cargo test --features storage-service,unstable-oracles -- storage_service --nocapture - name: Run Ethereum tests run: | cargo test -p linera-ethereum --features ethereum @@ -128,6 +127,38 @@ jobs: echo 'Run `linera help-markdown > CLI.md` to update it.' exit 1 fi + + storage-service-tests: + runs-on: ubuntu-latest-16-cores + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: foundry-rs/foundry-toolchain@v1.2.0 + - name: Clear up some space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Set environment variables + run: | + echo "LINERA_STORAGE_SERVICE=127.0.0.1:1235" >> "$GITHUB_ENV" + echo "LINERA_WALLET=/tmp/local-linera-net/wallet_0.json" >> "$GITHUB_ENV" + echo "LINERA_STORAGE=rocksdb:/tmp/local-linera-net/client_0.db" >> "$GITHUB_ENV" + echo "LINERA_FAUCET_URL=http://localhost:8079" >> "$GITHUB_ENV" + - name: Build example applications + run: | + cd examples + cargo build --locked --release --target wasm32-unknown-unknown + - name: Run the storage-service instance and the storage-service tests + run: | + cargo run --release -p linera-storage-service -- memory --endpoint $LINERA_STORAGE_SERVICE & + cargo test --features storage-service,unstable-oracles -- storage_service --nocapture web: runs-on: ubuntu-latest-16-cores @@ -162,7 +193,7 @@ jobs: lint: runs-on: ubuntu-latest - timeout-minutes: 45 + timeout-minutes: 35 steps: - uses: actions/checkout@v3 @@ -193,9 +224,6 @@ jobs: - name: Install cargo-machete run: | cargo install cargo-machete --locked - - name: Install cargo-all-features - run: | - cargo install --git https://github.com/ma2bd/cargo-all-features --branch workspace_metadata --locked - name: Install cargo-rdme run: | cargo install cargo-rdme --locked @@ -255,11 +283,6 @@ jobs: continue-on-error: true run: | cargo doc --locked --all-features - - name: Run cargo check-all-features - continue-on-error: true - run: | - cargo check-all-features - cargo check-all-features --all-targets - name: Restore `rust-toolchain.toml` file if: '!cancelled()' run: | @@ -267,3 +290,27 @@ jobs: - name: Check linera-service GraphQL schema run: | diff <(cargo run --locked --bin linera-schema-export) linera-service-graphql-client/gql/service_schema.graphql + + check-all-features: + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - uses: actions/checkout@v3 + - name: Clear up some space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + - name: Install cargo-all-features + run: | + cargo install --git https://github.com/ma2bd/cargo-all-features --branch workspace_metadata --locked + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Run cargo check-all-features + run: | + cargo check-all-features + cargo check-all-features --all-targets