-
Notifications
You must be signed in to change notification settings - Fork 129
Don't run the PyPi job all the time #1363
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -17,9 +17,34 @@ | |||||||||||||||||
cancel-in-progress: true | ||||||||||||||||||
|
||||||||||||||||||
jobs: | ||||||||||||||||||
check_changes: | ||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||
outputs: | ||||||||||||||||||
should_run: ${{ steps.filter.outputs.any_changed }} | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
steps: | ||||||||||||||||||
- uses: actions/checkout@v4 | ||||||||||||||||||
Check warningCode scanning / zizmor does not set persist-credentials: false Warning
does not set persist-credentials: false
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
- uses: dorny/paths-filter@v2 | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
id: filter | ||||||||||||||||||
with: | ||||||||||||||||||
filters: | | ||||||||||||||||||
any_changed: | ||||||||||||||||||
- '.github/workflows/pypi.yml' | ||||||||||||||||||
- 'pyproject.toml' | ||||||||||||||||||
- 'setup.py' | ||||||||||||||||||
- 'pytensor/_version.py' | ||||||||||||||||||
- 'pytensor/scan_perform.pyx' | ||||||||||||||||||
- 'pytensor/scan_perform_ext.py' | ||||||||||||||||||
|
||||||||||||||||||
# The job to build precompiled pypi wheels. | ||||||||||||||||||
Check warningCode scanning / zizmor default permissions used due to no permissions: block Warning
default permissions used due to no permissions: block
|
||||||||||||||||||
make_sdist: | ||||||||||||||||||
name: Make SDist | ||||||||||||||||||
needs: check_changes | ||||||||||||||||||
# Run if it's a release, auto-release branch, or if relevant files changed on main | ||||||||||||||||||
if: | | ||||||||||||||||||
github.event_name == 'release' || | ||||||||||||||||||
github.ref == 'refs/heads/auto-release' || | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe we should delete all references to |
||||||||||||||||||
(github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') || | ||||||||||||||||||
(github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true') | ||||||||||||||||||
Comment on lines
+46
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||
permissions: | ||||||||||||||||||
# write id-token and attestations are required to attest build provenance | ||||||||||||||||||
|
@@ -49,6 +74,13 @@ | |||||||||||||||||
|
||||||||||||||||||
run_checks: | ||||||||||||||||||
name: Build & inspect our package. | ||||||||||||||||||
needs: check_changes | ||||||||||||||||||
# Run if it's a release, auto-release branch, or if relevant files changed on main | ||||||||||||||||||
if: | | ||||||||||||||||||
github.event_name == 'release' || | ||||||||||||||||||
github.ref == 'refs/heads/auto-release' || | ||||||||||||||||||
(github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') || | ||||||||||||||||||
(github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true') | ||||||||||||||||||
Comment on lines
+82
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
# Note: the resulting builds are not actually published. | ||||||||||||||||||
# This is purely for additional testing and diagnostic purposes. | ||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||
|
@@ -62,6 +94,13 @@ | |||||||||||||||||
|
||||||||||||||||||
build_wheels: | ||||||||||||||||||
name: Build wheels for ${{ matrix.platform }} | ||||||||||||||||||
needs: check_changes | ||||||||||||||||||
# Run if it's a release, auto-release branch, or if relevant files changed on main | ||||||||||||||||||
if: | | ||||||||||||||||||
github.event_name == 'release' || | ||||||||||||||||||
github.ref == 'refs/heads/auto-release' || | ||||||||||||||||||
(github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') || | ||||||||||||||||||
(github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true') | ||||||||||||||||||
Comment on lines
+102
to
+103
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
runs-on: ${{ matrix.platform }} | ||||||||||||||||||
permissions: | ||||||||||||||||||
# write id-token and attestations are required to attest build provenance | ||||||||||||||||||
|
@@ -96,6 +135,13 @@ | |||||||||||||||||
|
||||||||||||||||||
build_universal_wheel: | ||||||||||||||||||
name: Build universal wheel for Pyodide | ||||||||||||||||||
needs: check_changes | ||||||||||||||||||
# Run if it's a release, auto-release branch, or if relevant files changed on main | ||||||||||||||||||
if: | | ||||||||||||||||||
github.event_name == 'release' || | ||||||||||||||||||
github.ref == 'refs/heads/auto-release' || | ||||||||||||||||||
(github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') || | ||||||||||||||||||
(github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true') | ||||||||||||||||||
Comment on lines
+143
to
+144
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||
permissions: | ||||||||||||||||||
# write id-token and attestations are required to attest build provenance | ||||||||||||||||||
|
@@ -133,7 +179,12 @@ | |||||||||||||||||
|
||||||||||||||||||
check_dist: | ||||||||||||||||||
name: Check dist | ||||||||||||||||||
needs: [make_sdist,build_wheels] | ||||||||||||||||||
needs: [check_changes, make_sdist, build_wheels] | ||||||||||||||||||
if: | | ||||||||||||||||||
github.event_name == 'release' || | ||||||||||||||||||
github.ref == 'refs/heads/auto-release' || | ||||||||||||||||||
(github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') || | ||||||||||||||||||
(github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true') | ||||||||||||||||||
Comment on lines
+186
to
+187
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
runs-on: ubuntu-22.04 | ||||||||||||||||||
steps: | ||||||||||||||||||
- uses: actions/download-artifact@v4 | ||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make zizmor happy about default permissions