Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ on:
required: false
type: boolean
default: true
# TODO (huydhn): Remove them once all libraries using Nova has removed them
secrets:
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID:
description: "AWS Access Key passed from caller workflow"
Expand All @@ -73,6 +74,10 @@ on:
description: "AWS Secret Access Ket passed from caller workflow"
required: false

permissions:
id-token: write
contents: read

jobs:
build:
strategy:
Expand Down Expand Up @@ -230,13 +235,23 @@ jobs:
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"
${CONDA_RUN} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
# TODO (huydhn): Move the following step to a separate build job
- name: Configure aws credentials (pytorch account)
if: ${{ inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly') }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels
aws-region: us-east-1
- name: Configure aws credentials (pytorch account)
if: ${{ env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/') }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels
aws-region: us-east-1
- name: Upload package to pytorch.org
if: ${{ (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) || (env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/')) }}
shell: bash -l {0}
working-directory: ${{ inputs.repository }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
run: |
set -euxo pipefail
source "${BUILD_ENV_FILE}"
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/build_wheels_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ on:
description: "The key created when saving a cache and the key used to search for a cache."
default: ""
type: string
# TODO (huydhn): Remove them once all libraries using Nova has removed them
secrets:
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID:
description: "AWS Access Key passed from caller workflow"
Expand All @@ -67,6 +68,10 @@ on:
description: "AWS Secret Access Ket passed from caller workflow"
required: false

permissions:
id-token: write
contents: read

jobs:
build:
strategy:
Expand Down Expand Up @@ -204,13 +209,23 @@ jobs:
${CONDA_RUN} python3 "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
export PATH=${OLD_PATH}
# TODO (huydhn): Move the following step to a separate build job
- name: Configure aws credentials (pytorch account)
if: ${{ inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly') }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels
aws-region: us-east-1
- name: Configure aws credentials (pytorch account)
if: ${{ env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/') }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels
aws-region: us-east-1
- name: Upload package to pytorch.org
if: ${{ (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) || (env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/')) }}
shell: bash -l {0}
working-directory: ${{ inputs.repository }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
run: |
set -euxo pipefail
# shellcheck disable=SC1090
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/build_wheels_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ on:
description: "The key created when saving a cache and the key used to search for a cache."
default: ""
type: string
# TODO (huydhn): Remove them once all libraries using Nova has removed them
secrets:
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID:
description: "AWS Access Key passed from caller workflow"
Expand All @@ -67,6 +68,10 @@ on:
description: "AWS Secret Access Ket passed from caller workflow"
required: false

permissions:
id-token: write
contents: read

jobs:
build:
strategy:
Expand Down Expand Up @@ -194,13 +199,23 @@ jobs:
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"
${CONDA_RUN} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
# TODO (huydhn): Move the following step to a separate build job
- name: Configure aws credentials (pytorch account)
if: ${{ inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly') }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels
aws-region: us-east-1
- name: Configure aws credentials (pytorch account)
if: ${{ env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/') }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels
aws-region: us-east-1
- name: Upload package to pytorch.org
if: ${{ (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) || (env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/')) }}
shell: bash -l {0}
working-directory: ${{ inputs.repository }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
run: |
source "${BUILD_ENV_FILE}"
${CONDA_RUN} pip install awscli
Expand Down