Skip to content

Commit c88d78c

Browse files
committed
test: refactor CI
per request from #1432 (comment) ### Changes - remove all test jobs from test.yml workflow except the one that runs on s390x platform. - rename the test.yml Display name accordingly: "Tests (s390x)" - skip building ppc64le wheels when not triggered on master branch. - reconfigure wheels.yml workflow triggers. The wheels.yml CI now runs for 1. any push to master branch 2. any change in a PR that targets master branch (excluding when PR changes only affect docs/ path) 3. any tag (starting with "v") is pushed - added step to job that deploys wheels to PyPI. This new step creates a GitHub Release for the tag that was pushed. - added `skip-existing` param in case deployment to PyPI suffers a network error and the CI just needs to be re-run.
1 parent d16e2f3 commit c88d78c

File tree

2 files changed

+24
-49
lines changed

2 files changed

+24
-49
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,14 @@
1-
name: Tests
1+
name: Tests (s390x)
22

33
on:
44
pull_request:
5+
branches: [master]
56
push:
7+
branches: [master]
68
paths-ignore:
79
- '**.rst'
810

911
jobs:
10-
linux:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
matrix:
14-
include:
15-
- os: ubuntu-24.04
16-
python-version: '3.10'
17-
- os: ubuntu-24.04
18-
python-version: '3.13'
19-
- os: ubuntu-24.04
20-
python-version: 'pypy3.10'
21-
- os: ubuntu-24.04-arm
22-
python-version: '3.13'
23-
24-
steps:
25-
- name: Checkout pygit2
26-
uses: actions/checkout@v5
27-
28-
- name: Set up Python
29-
uses: actions/setup-python@v6
30-
with:
31-
python-version: ${{ matrix.python-version }}
32-
33-
- name: Linux
34-
run: |
35-
sudo apt install tinyproxy
36-
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.1 /bin/sh build.sh test
37-
3812
linux-s390x:
3913
runs-on: ubuntu-24.04
4014
if: github.ref == 'refs/heads/master'
@@ -53,19 +27,3 @@ jobs:
5327
run: |
5428
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.1 /bin/sh build.sh test
5529
continue-on-error: true # Tests are expected to fail, see issue #812
56-
57-
macos-arm64:
58-
runs-on: macos-latest
59-
steps:
60-
- name: Checkout pygit2
61-
uses: actions/checkout@v5
62-
63-
- name: Set up Python
64-
uses: actions/setup-python@v6
65-
with:
66-
python-version: '3.13'
67-
68-
- name: macOS
69-
run: |
70-
export OPENSSL_PREFIX=`brew --prefix openssl@3`
71-
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.1 /bin/sh build.sh test

.github/workflows/wheels.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ name: Wheels
22

33
on:
44
push:
5-
branches:
6-
- master
7-
- wheels-*
5+
branches: [master]
86
tags:
9-
- 'v*'
7+
- 'v*'
8+
pull_request:
9+
branches: [master]
10+
paths-ignore:
11+
- 'docs/**'
1012

1113
jobs:
1214
build_wheels:
@@ -54,6 +56,7 @@ jobs:
5456

5557
build_wheels_ppc:
5658
name: Wheels for linux-ppc
59+
if: github.ref == 'refs/heads/master'
5760
runs-on: ubuntu-24.04
5861

5962
steps:
@@ -140,3 +143,17 @@ jobs:
140143
with:
141144
user: __token__
142145
password: ${{ secrets.PYPI_API_TOKEN }}
146+
skip-existing: true
147+
148+
- name: Create GitHub Release
149+
env:
150+
GITHUB_TOKEN: ${{ github.token }}
151+
TAG: ${{ github.ref_name }}
152+
REPO: ${{ github.repository }}
153+
# https://cli.github.com/manual/gh_release_create
154+
run: >-
155+
gh release create ${TAG}
156+
--verify-tag
157+
--repo ${REPO}
158+
--title ${TAG}
159+
--generate-notes

0 commit comments

Comments
 (0)