Skip to content

Commit

Permalink
ARROW-11085: [Rust] Migrated from action-rs to shell in github actions.
Browse files Browse the repository at this point in the history
This addresses a blocker in our pipeline causing all CIs to not run due to a policy change by the INFRA team.

See https://issues.apache.org/jira/browse/INFRA-21234 and https://issues.apache.org/jira/browse/INFRA-21239 for more details.

Closes apache#9056 from jorgecarleitao/rust_actions

Authored-by: Jorge C. Leitao <jorgecarleitao@gmail.com>
Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
  • Loading branch information
jorgecarleitao authored and GeorgeAp committed Jun 7, 2021
1 parent 457048c commit 8030946
Showing 1 changed file with 38 additions and 40 deletions.
78 changes: 38 additions & 40 deletions .github/workflows/rust.yml
Expand Up @@ -57,11 +57,11 @@ jobs:
# and thus are specific for a particular OS, arch and rust version.
path: /github/home/target
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}-
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
default: true
components: rustfmt
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
- name: Build
run: |
export CARGO_HOME="/github/home/.cargo"
Expand Down Expand Up @@ -99,11 +99,11 @@ jobs:
path: /github/home/target
# this key equals the ones on `linux-build-lib` for re-use
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
default: true
components: rustfmt
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
- name: Run tests
run: |
export CARGO_HOME="/github/home/.cargo"
Expand Down Expand Up @@ -150,11 +150,11 @@ jobs:
path: /github/home/target
# this key equals the ones on `linux-build-lib` for re-use
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
default: true
components: rustfmt
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
- name: Run tests
run: |
export CARGO_HOME="/github/home/.cargo"
Expand All @@ -173,14 +173,13 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
# this particular action (and not cache@v2) is necessary to avoid build errors on mac due to caching
# (see its README)
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
default: true
components: rustfmt
# TODO: this won't cache anything, which is expensive. Setup this action
# with a OS-dependent path.
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
- name: Run tests
shell: bash
run: |
Expand Down Expand Up @@ -215,11 +214,11 @@ jobs:
path: /github/home/target
# this key equals the ones on `linux-build-lib` for re-use
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
default: true
components: rustfmt, clippy
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt clippy
- name: Run clippy
run: |
export CARGO_HOME="/github/home/.cargo"
Expand Down Expand Up @@ -278,11 +277,11 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
default: true
components: rustfmt
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt clippy
- name: Cache Cargo
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -341,13 +340,12 @@ jobs:
with:
path: /github/home/target
key: ${{ runner.os }}-${{ matrix.arch }}-target-wasm32-cache-${{ matrix.rust }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
default: true
override: true
components: rustfmt
target: wasm32-unknown-unknown
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup override set ${{ matrix.rust }}
rustup component add rustfmt
rustup target add wasm32-unknown-unknown
- name: Build arrow crate
run: |
export CARGO_HOME="/github/home/.cargo"
Expand Down

0 comments on commit 8030946

Please sign in to comment.