From 66c8e4f0dcc7857bb53cb2fc64c112dca2950433 Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Thu, 21 Sep 2023 11:33:29 +0200 Subject: [PATCH] Replace action-rs/toolchain with manual config (#3834) * Replace action-rs/toolchain with manual config * Run CI workflow if workflow itself changed * Fine tune rustup setup * Fix typo in override toolchain * Remove toolchain override --- .../actions/cargo-build-macos-binary/action.yml | 8 +++----- .github/actions/cross-build-binary/action.yml | 8 +++----- .github/workflows/ci.yml | 15 +++++++-------- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/actions/cargo-build-macos-binary/action.yml b/.github/actions/cargo-build-macos-binary/action.yml index 89d4383ba3d..bbc346ecf5f 100644 --- a/.github/actions/cargo-build-macos-binary/action.yml +++ b/.github/actions/cargo-build-macos-binary/action.yml @@ -25,11 +25,9 @@ runs: - name: Install protoc run: brew install protobuf shell: bash - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - targets: ${{ inputs.target }} - override: true + - name: Install rustup + shell: bash + run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y - name: Add target aarch64-apple-darwin if: "${{ inputs.target == 'aarch64-apple-darwin' }}" run: rustup target add aarch64-apple-darwin diff --git a/.github/actions/cross-build-binary/action.yml b/.github/actions/cross-build-binary/action.yml index 340e6e57223..d10e02dda8d 100644 --- a/.github/actions/cross-build-binary/action.yml +++ b/.github/actions/cross-build-binary/action.yml @@ -22,11 +22,9 @@ runs: cache-dependency-path: quickwit/quickwit-ui/yarn.lock - run: make build-ui shell: bash - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: ${{ inputs.target }} - override: true + - name: Install rustup + shell: bash + run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y - name: Install cross run: cargo install cross shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adfd79d4e58..d2fe3c3e46d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,14 +56,12 @@ jobs: - quickwit/**/*.toml - quickwit/**/*.proto - quickwit/rest-api-tests/** + - .github/workflows/ci.yml # The following step is just meant to install rustup actually. # The next one installs the correct toolchain. - name: Install rustup - uses: actions-rs/toolchain@v1 if: steps.modified.outputs.rust_src == 'true' - with: - toolchain: 1.70 - components: "" + run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y - name: Setup stable Rust Toolchain if: steps.modified.outputs.rust_src == 'true' run: rustup show @@ -106,15 +104,16 @@ jobs: - quickwit/**/*.rs - quickwit/**/*.toml - quickwit/**/*.proto + - .github/workflows/ci.yml - name: Install Ubuntu packages if: always() && steps.modified.outputs.rust_src == 'true' run: sudo apt-get -y install protobuf-compiler python3 python3-pip + - name: Install rustup + if: steps.modified.outputs.rust_src == 'true' + run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y - name: Setup nightly Rust Toolchain (for rustfmt) - uses: actions-rs/toolchain@v1 if: steps.modified.outputs.rust_src == 'true' - with: - toolchain: nightly - components: rustfmt + run: rustup toolchain install nightly - name: Setup stable Rust Toolchain if: steps.modified.outputs.rust_src == 'true' run: rustup show