Skip to content

Commit

Permalink
Tag builds in CI
Browse files Browse the repository at this point in the history
__original_commit__ = fairinternal/xformers@5969b712af054a260a2f19feaa05e1c5118098a6
  • Loading branch information
xFormers Bot committed Nov 24, 2023
1 parent 1a4137b commit fbf349a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/wheels_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
required: true
type: string
description: "Example: 117 for 11.7"
artifact_tag:
default: "facebookresearch"
type: string

# this yaml file can be cleaned up using yaml anchors, but they're not supported in github actions yet
# https://github.com/actions/runner/issues/1182
Expand All @@ -32,7 +35,7 @@ env:

jobs:
build:
name: ${{ inputs.os }}-py${{ inputs.python }}-torch${{ inputs.torch_version }}+cu${{ inputs.cuda_short_version }}
name: ${{ contains(inputs.os, 'ubuntu') && 'ubuntu' || 'win' }}-py${{ inputs.python }}-pt${{ inputs.torch_version }}+cu${{ inputs.cuda_short_version }}
runs-on: ${{ inputs.os }}
env:
# alias for the current python version
Expand Down Expand Up @@ -157,6 +160,6 @@ jobs:
- run: du -h dist/*
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.os }}-py${{ inputs.python }}-torch${{ inputs.torch_version }}+cu${{ inputs.cuda_short_version }}
name: ${{ inputs.os }}-py${{ inputs.python }}-torch${{ inputs.torch_version }}+cu${{ inputs.cuda_short_version }}_${{ inputs.artifact_tag }}
path: dist/*.whl
# Note: it might be helpful to have additional steps that test if the built wheels actually work
5 changes: 4 additions & 1 deletion .github/workflows/wheels_upload_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:
required: true
type: boolean
description: Actually upload the wheels. Dry-run if false
artifact_tag:
default: "facebookresearch"
type: string

env:
TWINE_USERNAME: __token__
Expand Down Expand Up @@ -58,7 +61,7 @@ jobs:
set -ex
mv dist all-dist
mkdir dist
for f in all-dist/${{ inputs.filter }}/*.whl; do
for f in all-dist/${{ inputs.filter }}_${{ inputs.artifact_tag }}/*.whl; do
cp $f dist/
done;
- run: ls -R dist/
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/wheels_upload_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ on:
required: true
type: boolean
description: Actually upload the wheels. Dry-run if false
artifact_tag:
default: "facebookresearch"
type: string

jobs:
wheels_upload_s3:
Expand Down Expand Up @@ -55,7 +58,7 @@ jobs:
set -ex
mv dist all-dist
mkdir dist
for f in all-dist/${{ inputs.filter }}/*.whl; do
for f in all-dist/${{ inputs.filter }}_${{ inputs.artifact_tag }}/*.whl; do
cp $f dist/
done;
- run: ls -R dist/
Expand Down

0 comments on commit fbf349a

Please sign in to comment.