From 8a5c04b0d299227f9d0858838a958b837c2386e1 Mon Sep 17 00:00:00 2001 From: Stan Bondi Date: Wed, 5 Jul 2023 09:40:12 +0200 Subject: [PATCH] fix(ci): use nightly only for cargo fmt --- .github/workflows/ci.yml | 68 ++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bc1f25e9..6d64e594e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,15 +16,16 @@ on: merge_group: env: - toolchain: nightly-2023-06-12 + nightly_toolchain: nightly-2023-06-12 + stable_toolchain: stable CARGO_HTTP_MULTIPLEXING: false CARGO_TERM_COLOR: always PROTOC: protoc TERM: unknown jobs: - clippy: - name: clippy + fmt: + name: fmt runs-on: [ self-hosted, ubuntu18.04-high-cpu ] steps: - name: checkout @@ -32,8 +33,8 @@ jobs: - name: toolchain uses: actions-rs/toolchain@v1 with: - toolchain: ${{ env.toolchain }} - components: clippy, rustfmt + toolchain: ${{ env.nightly_toolchain }} + components: rustfmt override: true - name: ubuntu dependencies run: | @@ -65,6 +66,43 @@ jobs: with: command: fmt args: --all -- --check + clippy: + name: clippy + runs-on: [ self-hosted, ubuntu18.04-high-cpu ] + steps: + - name: checkout + uses: actions/checkout@v2 + - name: toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.stable_toolchain }} + components: clippy + override: true + - name: ubuntu dependencies + run: | + sudo apt-get update && \ + sudo apt-get -y install \ + build-essential \ + libgtk-3-dev \ + libwebkit2gtk-4.0-dev \ + libsoup2.4-dev \ + pkg-config \ + libssl-dev \ + sqlite3 \ + libsqlite3-dev \ + curl \ + wget \ + libappindicator3-dev \ + patchelf \ + librsvg2-dev \ + libprotobuf-dev \ + protobuf-compiler \ + pkg-config \ + libssl-dev \ + sqlite3 \ + libsqlite3-dev + - name: wasm target install + run: rustup target add wasm32-unknown-unknown - name: Install cargo-lints uses: actions-rs/cargo@v1 with: @@ -84,7 +122,7 @@ jobs: - name: toolchain uses: actions-rs/toolchain@v1 with: - toolchain: ${{ env.toolchain }} + toolchain: ${{ env.nightly_toolchain }} profile: minimal override: true - name: ubuntu dependencies @@ -185,7 +223,7 @@ jobs: - name: toolchain uses: actions-rs/toolchain@v1 with: - toolchain: ${{ env.toolchain }} + toolchain: ${{ env.stable_toolchain }} - name: ubuntu dependencies run: | sudo apt-get update && \ @@ -224,22 +262,6 @@ jobs: name: cucumber-test-results path: ${{ github.workspace }}/applications/tari_validator_node/cucumber-output-junit.xml - # Allows other workflows to know the PR number - artifacts: - runs-on: [ ubuntu-20.04 ] - steps: - - name: Save the PR number in an artifact - shell: bash - env: - PR_NUM: ${{ github.event.number }} - run: echo $PR_NUM > pr_num.txt - - - name: Upload the PR number - uses: actions/upload-artifact@v2 - with: - name: pr_num - path: ./pr_num.txt - # needed for test results event_file: runs-on: ubuntu-latest