-
Notifications
You must be signed in to change notification settings - Fork 87
Ci build #391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Ci build #391
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a74d48d
add github build workflow
andrewfulton9 eb65897
update repository_url
andrewfulton9 b4ad328
update url environment variable in upload_to_pypi
andrewfulton9 385f6c3
update workflow with buildwheels
andrewfulton9 01fb1c1
downgrade python
andrewfulton9 3a092cf
add build pip install
andrewfulton9 2065cd4
remove python3.11
andrewfulton9 f6e904f
comment out code blocking upload to pypi
andrewfulton9 8738f6d
don't verify metadata for upload to pypi
andrewfulton9 5f9e4f5
use underscore
andrewfulton9 cf80e2d
fix setup-name
andrewfulton9 f4ce031
run verbose update pypa publish runner
andrewfulton9 b01c57b
only build with python 310
andrewfulton9 c36f556
revert package name to real name
andrewfulton9 275e1f6
update for pushing to pypi
andrewfulton9 ec70bb4
fix name
andrewfulton9 52fafc8
build wheel and sdist in single step, add build for python 3.9
andrewfulton9 b70b49d
fix build to upload both .whl and .tar.gz files
andrewfulton9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,105 @@ | ||
| name: Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build_sdist: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.10' | ||
|
|
||
| - name: install python dependencies | ||
| run: pip install build twine | ||
|
|
||
| - name: build sdist | ||
| run: | | ||
| python -m build --sdist -o wheelhouse | ||
|
|
||
| - name: List and check sdist | ||
| run: | | ||
| ls -lh wheelhouse/ | ||
| twine check wheelhouse/* | ||
| - name: Upload sdist | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: sdist | ||
| path: ./wheelhouse/*.tar.gz | ||
|
|
||
|
|
||
| build_wheels: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10"] | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install python build dependencies | ||
| run: | | ||
| pip install wheel build | ||
|
|
||
| - name: Build wheels | ||
| run: | | ||
| python -m build --wheel | ||
| mkdir wheelhouse | ||
| mv dist/*.whl wheelhouse/ | ||
| - name: List and check wheels | ||
| run: | | ||
| pip install twine pkginfo>=1.11.0 | ||
| ${{ matrix.ls || 'ls -lh' }} wheelhouse/ | ||
| twine check wheelhouse/* | ||
| - name: Upload wheels | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: wheels-${{ matrix.python-version }} | ||
| path: ./wheelhouse/*.whl | ||
|
||
|
|
||
| upload_to_pypi: | ||
| name: Upload to PyPI | ||
| runs-on: ubuntu-latest | ||
| if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch') | ||
| needs: [build_wheels, build_sdist] | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/p/fairness-indicators | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - name: Retrieve wheels | ||
| uses: actions/[email protected] | ||
| with: | ||
| merge-multiple: true | ||
| path: wheels | ||
|
|
||
| - name: List the build artifacts | ||
| run: | | ||
| ls -lAs wheels/ | ||
|
|
||
| - name: Upload to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1.12 | ||
| with: | ||
| packages_dir: wheels/ | ||
| repository_url: https://pypi.org/legacy/ | ||
| verify_metadata: false | ||
| verbose: true | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.