From ef4a69ae22f55e93929de387f1d7a037b0aa3ed4 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Tue, 7 May 2024 11:04:44 +0100 Subject: [PATCH 1/4] Build more wheels --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c59e680..072f674 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,7 +117,10 @@ jobs: test_command: 'pytest -p no:warnings --doctest-rst --pyargs streamtracer' submodules: false targets: | - - cp3{10,11,12}-manylinux*_x86_64 + - cp3{10,11,12}-manylinux_aarch64 + - cp3{10,11,12}-manylinux_x86_64 + - cp3{10,11,12}-musllinux_x86_64 + - cp3{10,11,12}-musllinux_aarch64 - cp3{10,11,12}-macosx_x86_64 - cp3{10,11,12}-macosx_arm64 - cp3{10,11,12}-win_amd64 From d47b5ca5de3ae0f66416cb49fa3d87723e67ae4d Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Tue, 7 May 2024 11:20:53 +0100 Subject: [PATCH 2/4] Add a cron and notify job --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 072f674..d02fe6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,13 @@ on: pull_request: # Allow manual runs through the web UI workflow_dispatch: + schedule: + # ┌───────── minute (0 - 59) + # │ ┌───────── hour (0 - 23) + # │ │ ┌───────── day of the month (1 - 31) + # │ │ │ ┌───────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) + - cron: '0 7 * * *' # Every day at 07:00 UTC concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -126,3 +133,17 @@ jobs: - cp3{10,11,12}-win_amd64 secrets: pypi_token: ${{ secrets.pypi_token }} + + notify: + if: always() && github.event_name != 'pull_request' && github.ref_name == 'main' + needs: [publish, cron] + runs-on: ubuntu-latest + steps: + - uses: Cadair/matrix-notify-action@main + with: + matrix_token: ${{ secrets.matrix_access_token }} + github_token: ${{ secrets.GITHUB_TOKEN }} + homeserver: ${{ secrets.matrix_homeserver }} + roomid: '!jfEXWJFdXwYnBWsiqk:openastronomy.org' + ignore_pattern: '.*Load.*' + summarise_success: true From 4fd42ddfaeaca38ff33cfa17f17534e507b6bef7 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Tue, 7 May 2024 11:40:42 +0100 Subject: [PATCH 3/4] Hopefully fix up trigger events --- .github/workflows/ci.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d02fe6f..86c1298 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,10 @@ jobs: cron: if: | - github.event_name == 'workflow_dispatch' || ( + ( + github.event_name == 'workflow_dispatch' || + github.event_name == 'schedule' + ) || ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Run cron CI') ) @@ -104,15 +107,11 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} publish: - # Build wheels when pushing to any branch except main + # Build wheels when on a branch or when label is set # publish.yml will only publish if tagged ^v.* if: | - ( - github.event_name != 'pull_request' && ( - github.ref_name != 'main' || - github.event_name == 'workflow_dispatch' - ) - ) || ( + github.event_name != 'pull_request' + || ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Run publish') ) From bffa49e0635323e6f771232dc8a1cfdab2b6b2c8 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Tue, 7 May 2024 15:45:00 +0100 Subject: [PATCH 4/4] Add lint config --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 4f3b1c5..ef37970 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,3 +22,7 @@ ndarray = {version = "0.15", features = ["rayon"]} [dev-dependencies] float_eq = "1.0.0" + +[lints.clippy] +needless_return = "allow" +implicit_return = "warn"