Skip to content

Commit

Permalink
Pin Rust toolchain in workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Emanuele Giaquinta <[email protected]>
  • Loading branch information
exg committed Jan 18, 2024
1 parent e1ba891 commit 36cd7a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
RUST_TOOLCHAIN: nightly-2024-01-17

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
- uses: actions/setup-python@v5
with:
python-version: '3.11'
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
RUST_TOOLCHAIN: nightly-2024-01-17

jobs:
build-linux-x86_64:
name: Build Linux x86_64 wheel
Expand All @@ -29,7 +32,7 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain nightly
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain "$RUST_TOOLCHAIN"
- run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- run: /opt/python/${{ matrix.python-path }}/bin/python -m venv .venv
- run: .venv/bin/pip install -U pip wheel maturin
Expand All @@ -51,7 +54,7 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain nightly
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain ${{ env.RUST_TOOLCHAIN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -75,7 +78,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain nightly
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain "$RUST_TOOLCHAIN"
- run: rustup component add rust-src
- name: Set up Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -106,7 +109,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain nightly
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain "$RUST_TOOLCHAIN"
- run: rustup target add aarch64-apple-darwin
- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -131,7 +134,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain nightly
- run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain "$RUST_TOOLCHAIN"
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down

0 comments on commit 36cd7a9

Please sign in to comment.