Skip to content

Commit

Permalink
ci: use env rather than passing environment inline
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Nov 20, 2024
1 parent 39baa0c commit d2e004f
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ jobs:
- beta
- nightly
- 1.63.0
env:
TOOLCHAIN: ${{ matrix.toolchain }}
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TOOLCHAIN=${{ matrix.toolchain }} ./ci/install-rust.sh
run: ./ci/install-rust.sh
- name: Execute build.sh
run: TOOLCHAIN=${{ matrix.toolchain }} ./ci/build.sh
run: ./ci/build.sh

build_channels_macos:
name: Build Channels macOS
Expand All @@ -56,12 +58,14 @@ jobs:
- { toolchain: nightly, os: macos-14 }
- { toolchain: 1.63.0, os: macos-14 }
runs-on: ${{ matrix.target.os }}
env:
TOOLCHAIN: ${{ matrix.toolchain }}
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TOOLCHAIN=${{ matrix.target.toolchain }} ./ci/install-rust.sh
run: ./ci/install-rust.sh
- name: Execute build.sh
run: TOOLCHAIN=${{ matrix.target.toolchain }} ./ci/build.sh
run: ./ci/build.sh

build_channels_windows:
name: Build Channels Windows
Expand All @@ -74,13 +78,15 @@ jobs:
toolchain:
- 1.63.0
- stable
env:
TOOLCHAIN: ${{ matrix.toolchain }}
steps:
- uses: actions/checkout@v4
- name: Self-update rustup
run: rustup self update
shell: bash
- name: Execute build.sh
run: TOOLCHAIN=${{ matrix.toolchain }} ./ci/build.sh
run: ./ci/build.sh
shell: bash

macos:
Expand All @@ -91,10 +97,12 @@ jobs:
matrix:
target:
- aarch64-apple-darwin
env:
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} ./ci/install-rust.sh
run: ./ci/install-rust.sh
- name: Execute run.sh
run: ./ci/run.sh ${{ matrix.target }}

Expand All @@ -118,13 +126,15 @@ jobs:
# ARCH_BITS: 32
# ARCH: i686
- target: i686-pc-windows-msvc
env:
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- name: Self-update rustup
run: rustup self update
shell: bash
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} ./ci/install-rust.sh
run: ./ci/install-rust.sh
shell: bash
- name: Execute run.sh
run: ./ci/run.sh ${{ matrix.target }}
Expand All @@ -140,10 +150,12 @@ jobs:
target:
- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
env:
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} ./ci/install-rust.sh
run: ./ci/install-rust.sh
- name: Execute run-docker.sh
run: ./ci/run-docker.sh ${{ matrix.target }}

Expand Down Expand Up @@ -182,10 +194,12 @@ jobs:
# FIXME: It seems some items in `src/unix/mod.rs`
# aren't defined on redox actually.
# - x86_64-unknown-redox
env:
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} ./ci/install-rust.sh
run: ./ci/install-rust.sh
- name: Execute run-docker.sh
run: ./ci/run-docker.sh ${{ matrix.target }}

Expand Down Expand Up @@ -219,10 +233,12 @@ jobs:
check_cfg:
name: "Check #[cfg]s"
runs-on: ubuntu-22.04
env:
TOOLCHAIN: nightly
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TOOLCHAIN=nightly ./ci/install-rust.sh
run: ./ci/install-rust.sh
- name: Build with check-cfg
run: LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg

Expand Down

0 comments on commit d2e004f

Please sign in to comment.