Use cargo update fix #29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Wheels | |
on: | |
push: | |
tags: [ "v[0-9]+.[0-9]+.[0-9]+" ] | |
branches: [ "dependabot/*", "main", "workflow/*" ] | |
env: | |
S3_REGION: ${{ vars.S3_REGION }} | |
S3_BUCKET: ${{ vars.S3_BUCKET }} | |
S3_PREFIX: ${{ vars.S3_PREFIX }} | |
S3_EXPRESS_BUCKET: ${{ vars.S3_EXPRESS_BUCKET }} | |
S3_EXPRESS_REGION: ${{ vars.S3_EXPRESS_REGION }} | |
jobs: | |
generate_third_party_licenses: | |
name: Generate THIRD-PARTY-LICENSES | |
uses: ./.github/workflows/generate_third_party_licenses.yml | |
build_wheels: | |
name: Build wheels for ${{ matrix.build_target }} | |
runs-on: ubuntu-20.04 | |
needs: generate_third_party_licenses | |
strategy: | |
matrix: | |
build_target: | |
- cp38-manylinux_x86_64 | |
- cp39-manylinux_x86_64 | |
- cp310-manylinux_x86_64 | |
- cp311-manylinux_x86_64 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
id: creds | |
with: | |
role-to-assume: ${{ vars.ACTIONS_IAM_ROLE }} | |
aws-region: ${{ vars.S3_REGION }} | |
# Downloading artifacts that were created from action/upload-artifact@v3 and below are not supported. | |
# https://github.com/actions/download-artifact | |
# These actions should remain @v3 for now, ignore dependabot proposed upgrade. | |
# https://github.com/actions/upload-artifact/issues/478 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ needs.generate_third_party_licenses.outputs.artifact_name }} | |
- name: Rename third party license | |
run: | | |
mv NOTICE_DEFAULT THIRD-PARTY-LICENSES | |
- name: Build wheels for s3torchconnectorclient | |
uses: pypa/cibuildwheel@v2.16.5 | |
env: | |
CIBW_BUILD: ${{ matrix.build_target }} | |
with: | |
package-dir: s3torchconnectorclient | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: "./wheelhouse/*.whl" | |
name: wheels | |
build_source_wheels: | |
name: Build source wheels for ${{ matrix.build_target }} | |
runs-on: ubuntu-20.04 | |
needs: generate_third_party_licenses | |
strategy: | |
matrix: | |
build_target: | |
- s3torchconnector | |
- s3torchconnectorclient | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ needs.generate_third_party_licenses.outputs.artifact_name }} | |
- name: Copy license files | |
run: | | |
cp README.md ${{ matrix.build_target }}/ | |
cp LICENSE ${{ matrix.build_target }}/ | |
cp NOTICE_DEFAULT ${{ matrix.build_target }}/THIRD-PARTY-LICENSES | |
cp NOTICE ${{ matrix.build_target }}/ | |
- name: Build wheel | |
run: | | |
cd ${{ matrix.build_target }} | |
python -m pip install build | |
python -m build --sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: "./${{ matrix.build_target }}/dist/*" | |
name: wheels |