Skip to content
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

Build wheels on the 1st and 15th of every month #3436

Merged
merged 4 commits into from
Oct 11, 2023
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
1 change: 1 addition & 0 deletions .github/release_reminder.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Create {{ date | date('YY.MM') }} (final or rc0) release
labels: priority:high
---
Quarterly reminder to create a -

Expand Down
6 changes: 6 additions & 0 deletions .github/wheel_failure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Fortnightly build for wheels failed
labels: priority:high, bug
---

The build is failing with the following logs - {{ env.LOGS }}
22 changes: 19 additions & 3 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Build and publish package to PyPI
on:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a badge for this in the README?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a good idea. Alternatively or in addition we can use one of those actions to open an issue if one of the jobs fails

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works now - Saransh-cpp#13!

release:
types: [published]
schedule:
# Run at 10 am UTC on day-of-month 1 and 15.
- cron: "0 10 1,15 * *"
workflow_dispatch:
inputs:
target:
Expand Down Expand Up @@ -151,6 +154,7 @@ jobs:
if-no-files-found: error

publish_pypi:
if: github.event_name != 'schedule'
name: Upload package to PyPI
needs: [build_wheels, build_windows_wheels, build_sdist]
runs-on: ubuntu-latest
Expand All @@ -164,9 +168,7 @@ jobs:
mv windows_wheels/* wheels/* sdist/* files/
- name: Publish on PyPI
if: |
github.event.inputs.target == 'pypi' ||
(github.event_name == 'push' && github.ref == 'refs/heads/main')
if: github.event.inputs.target == 'pypi' || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand All @@ -181,3 +183,17 @@ jobs:
password: ${{ secrets.TESTPYPI_TOKEN }}
packages-dir: files/
repository-url: https://test.pypi.org/legacy/

open_failure_issue:
needs: [build_windows_wheels, build_wheels, build_sdist]
name: Open an issue if build fails
if: ${{ always() && contains(needs.*.result, 'failure') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LOGS: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
filename: .github/wheel_failure.md