diff --git a/.github/actions/setup-builder/action.yaml b/.github/actions/setup-builder/action.yaml index 20da777ec0e5..f73f7abf9b82 100644 --- a/.github/actions/setup-builder/action.yaml +++ b/.github/actions/setup-builder/action.yaml @@ -17,15 +17,6 @@ name: Prepare Rust Builder description: 'Prepare Rust Build Environment' -inputs: - rust-version: - description: 'version of rust to install (e.g. stable)' - required: false - default: 'stable' - target: - description: 'target architecture(s)' - required: false - default: 'x86_64-unknown-linux-gnu' runs: using: "composite" steps: @@ -43,6 +34,9 @@ runs: /usr/local/cargo/git/db/ key: cargo-cache3-${{ hashFiles('**/Cargo.toml') }} restore-keys: cargo-cache3- + - name: Setup Rust toolchain + shell: bash + run: rustup install - name: Generate lockfile shell: bash run: cargo fetch @@ -51,12 +45,6 @@ runs: run: | apt-get update apt-get install -y protobuf-compiler - - name: Setup Rust toolchain - shell: bash - run: | - echo "Installing ${{ inputs.rust-version }}" - rustup toolchain install ${{ inputs.rust-version }} --target ${{ inputs.target }} - rustup default ${{ inputs.rust-version }} - name: Disable debuginfo generation # Disable full debug symbol generation to speed up CI build and keep memory down # "1" means line tables only, which is useful for panic tracebacks. diff --git a/.github/workflows/arrow.yml b/.github/workflows/arrow.yml index 9d2d7761725b..894111420238 100644 --- a/.github/workflows/arrow.yml +++ b/.github/workflows/arrow.yml @@ -148,8 +148,10 @@ jobs: submodules: true - name: Setup Rust toolchain uses: ./.github/actions/setup-builder - with: - target: wasm32-unknown-unknown,wasm32-wasip1 + - name: Install wasm32 targets + run: | + rustup target add wasm32-unknown-unknown + rustup target add wasm32-wasip1 - name: Build wasm32-unknown-unknown run: cargo build -p arrow --no-default-features --features=json,csv,ipc,ffi --target wasm32-unknown-unknown - name: Build wasm32-wasip1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 354a77b76634..34e823fd6aca 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,12 +34,8 @@ jobs: docs: name: Rustdocs are clean runs-on: ubuntu-latest - strategy: - matrix: - arch: [ amd64 ] - rust: [ nightly ] container: - image: ${{ matrix.arch }}/rust + image: amd64/rust env: RUSTDOCFLAGS: "-Dwarnings --enable-index-page -Zunstable-options" steps: @@ -52,10 +48,10 @@ jobs: apt install -y libpython3.11-dev - name: Setup Rust toolchain uses: ./.github/actions/setup-builder - with: - rust-version: ${{ matrix.rust }} + - name: Install Nightly Rust + run: rustup install nightly - name: Run cargo doc - run: cargo doc --document-private-items --no-deps --workspace --all-features + run: cargo +nightly doc --document-private-items --no-deps --workspace --all-features - name: Fix file permissions shell: sh run: | diff --git a/.github/workflows/parquet.yml b/.github/workflows/parquet.yml index 946aef75db19..9d4f4e444cb7 100644 --- a/.github/workflows/parquet.yml +++ b/.github/workflows/parquet.yml @@ -133,8 +133,10 @@ jobs: submodules: true - name: Setup Rust toolchain uses: ./.github/actions/setup-builder - with: - target: wasm32-unknown-unknown,wasm32-wasip1 + - name: Install wasm32 targets + run: | + rustup target add wasm32-unknown-unknown + rustup target add wasm32-wasip1 - name: Install clang # Needed for zlib compilation run: apt-get update && apt-get install -y clang gcc-multilib - name: Build wasm32-unknown-unknown diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 000000000000..4ac629d201c5 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +[toolchain] +channel = "1.89" +components = ["rustfmt", "clippy"]