-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: clean install & share pkg build (#15986)
* abstract pkg build * share ci * syntax * Checkgroup * folders * whl 1st * doctest Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Carlos Mocholí <[email protected]> (cherry picked from commit 18a4638)
- Loading branch information
Showing
21 changed files
with
182 additions
and
108 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Building packages | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
artifact-name: | ||
description: 'Unique name for collecting artifacts' | ||
required: true | ||
type: string | ||
pkg-names: | ||
description: 'list package names to be build in json format' | ||
required: false | ||
type: string | ||
default: | | ||
["lightning", "app", "lite", "pytorch"] | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
|
||
init: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
mkdir dist && touch dist/.placeholder | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: dist | ||
|
||
|
||
build-packages: | ||
needs: init | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
max-parallel: 1 # run sequential to prevent download/upload collisions | ||
matrix: | ||
pkg-name: ${{ fromJSON(inputs.pkg-names) }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: pypi | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- run: python -c "print('NB_DIRS=' + str(2 if '${{ matrix.pkg-name }}' == 'pytorch' else 1))" >> $GITHUB_ENV | ||
- uses: ./.github/actions/pkg-check | ||
with: | ||
pkg-name: ${{ matrix.pkg-name }} | ||
nb-dirs: ${{ env.NB_DIRS }} | ||
|
||
- run: | | ||
mkdir pypi/${{ matrix.pkg-name }} | ||
cp dist/* pypi/${{ matrix.pkg-name }}/ | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: pypi |
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
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
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
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
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
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
Oops, something went wrong.