Skip to content

Commit

Permalink
Update Rust setup actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dnnanuti committed Apr 9, 2024
1 parent e71d5b7 commit 93232e1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 34 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/python-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@ jobs:
uses: actions/checkout@v4

- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable

- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
Expand Down Expand Up @@ -75,16 +71,12 @@ jobs:
uses: actions/checkout@v4

- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable

- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/rust-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable

- name: Run cargo deny
uses: EmbarkStudios/cargo-deny-action@v1
Expand All @@ -47,17 +44,12 @@ jobs:
uses: actions/checkout@v4

- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
uses: dtolnay/rust-toolchain@stable

- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
Expand All @@ -78,10 +70,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable

- name: Build Rust tests
run: cargo test --no-default-features --no-run --manifest-path s3torchconnectorclient/Cargo.toml
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,22 @@ jobs:
uses: ./.github/workflows/generate_third_party_licenses.yml

build_wheels:
name: Wheels for ${{ matrix.python }} - ${{ matrix.builder.kind }} - ${{ matrix.builder.arch }}
name: Wheels for ${{ matrix.python.id }} - ${{ matrix.builder.kind }} - ${{ matrix.builder.arch }}
runs-on: ${{ matrix.builder.runner }}
needs: generate_third_party_licenses
strategy:
matrix:
python:
- cp38
- cp39
- cp310
- cp311
- cp312
- id: cp38
version: "3.8"
- id: cp39
version: "3.9"
- id: cp310
version: "3.10"
- id: cp311
version: "3.11"
- id: cp312
version: "3.12"
builder:
- runner: codebuild-${{ vars.CODEBUILD_PROJECT_NAME }}-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-large
kind: manylinux
Expand Down Expand Up @@ -74,13 +79,16 @@ jobs:
# actions/setup-python doesn't yet support ARM
# https://github.com/actions/setup-python/issues/678
- if: ${{ matrix.builder.arch != 'aarch64' }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ matrix.python.version }}
cache: "pip"

- name: Install pipx
run: |
python -m pip install --upgrade pipx
which python
python -m pip install --upgrade pipx
pipx ensurepath
# Run cibuildwheel manually, as the current runner uses setup-python
# https://github.com/pypa/cibuildwheel/issues/1623
Expand All @@ -89,7 +97,7 @@ jobs:
cibuildwheel
"s3torchconnectorclient"
--output-dir "wheelhouse"
--only "${{ matrix.python }}-${{ matrix.builder.kind }}_${{ matrix.builder.arch }}"
--only "${{ matrix.python.id }}-${{ matrix.builder.kind }}_${{ matrix.builder.arch }}"
2>&1
shell: bash
Expand Down

0 comments on commit 93232e1

Please sign in to comment.