Skip to content

Commit 40918cf

Browse files
committed
ci: Update github actions to latest
* Fix incompatible change in {upload,download}-artifact. * Fix "permission denied" on "macos-latest" by installing mbedtls in local directory. * Fix warning with cp38 on macos.
1 parent 268f78e commit 40918cf

File tree

6 files changed

+31
-23
lines changed

6 files changed

+31
-23
lines changed

.github/workflows/cov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
BACKEND_VERSION: "2.28.8"
1212
steps:
1313

14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

1616
- name: Build backend
1717
run: |
1818
./scripts/download-mbedtls.sh $BACKEND_VERSION $BACKEND_DIR/src
1919
./scripts/install-mbedtls.sh $BACKEND_DIR/src $BACKEND_DIR
2020
21-
- uses: actions/setup-python@v4
21+
- uses: actions/setup-python@v5
2222
with:
2323
python-version: '3.11'
2424
cache: pip

.github/workflows/main.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,41 @@ jobs:
1515
pyver: [cp38, cp39, cp310, cp311, cp312]
1616
version: [2.28.8]
1717
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-python@v4
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
2020
with:
2121
python-version: '3.10'
2222
- name: Create source dist
2323
run: python setup.py sdist
2424
- name: Upload source dist
25-
uses: actions/upload-artifact@v3
25+
uses: actions/upload-artifact@v4
2626
with:
27-
name: dist
27+
name: dist-${{ matrix.version }}-${{ matrix.pyver }}-${{ matrix.os }}
2828
path: dist
2929
if-no-files-found: error
3030
- name: Build and test wheels
31-
uses: pypa/cibuildwheel@v2.16
31+
uses: pypa/cibuildwheel@v2.17
3232
env:
3333
CIBW_BUILD: ${{ matrix.pyver }}-*
3434
CIBW_ENVIRONMENT: VERSION=${{ matrix.version }}
3535
CIBW_ENVIRONMENT_MACOS: >
3636
VERSION=${{ matrix.version }}
3737
LDFLAGS="-Wl,-headerpad_max_install_names"
38+
UPSTREAM_DEST="$GITHUB_WORKSPACE/.local/upstream"
39+
C_INCLUDE_PATH="$UPSTREAM_DEST/include"
40+
LIBRARY_PATH="$UPSTREAM_DEST/lib"
41+
DYLD_LIBRARY_PATH="$UPSTREAM_DEST/lib"
3842
CIBW_ENVIRONMENT_WINDOWS: >
3943
VERSION=${{ matrix.version }}
4044
LIB=$GITHUB_WORKSPACE\\_lib\\mbedtls\\visualc\\VS2010\\x64\\Release
4145
INCLUDE=$GITHUB_WORKSPACE\\_lib\\mbedtls\\include
46+
CIBW_TEST_SKIP: "cp38-macosx_arm64"
4247
- name: Inventory
4348
run: ls wheelhouse
4449
- name: Upload wheels
45-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
4651
with:
47-
name: wheels
52+
name: wheels-${{ matrix.version }}-${{ matrix.pyver }}-${{ matrix.os }}
4853
path: wheelhouse/
4954
if-no-files-found: error
5055

@@ -60,15 +65,16 @@ jobs:
6065
&& github.repository == 'Synss/python-mbedtls'
6166
steps:
6267
- name: Download source packages
63-
uses: actions/download-artifact@v3
68+
uses: actions/download-artifact@v4
6469
with:
65-
name: dist
70+
pattern: dist-${{ matrix.version }}-*
6671
path: dist
6772
- name: Download wheels
68-
uses: actions/download-artifact@v3
73+
uses: actions/download-artifact@v4
6974
with:
70-
name: wheels
75+
pattern: wheels-${{ matrix.version }}-*
7176
path: dist
77+
merge-multiple: true
7278
- name: List dir content
7379
run: ls dist
7480
- name: Publish to pypi

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-python@v4
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
1414
with:
1515
python-version: '3.11'
1616
- uses: pre-commit/action@v3.0.0

.github/workflows/typing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
BACKEND_DIR: "${{ github.workspace }}/.local"
1414
BACKEND_VERSION: "2.28.6"
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- name: Build backend
1919
run: |
2020
./scripts/download-mbedtls.sh $BACKEND_VERSION $BACKEND_DIR/src
2121
./scripts/install-mbedtls.sh $BACKEND_DIR/src $BACKEND_DIR
2222
23-
- uses: actions/setup-python@v4
23+
- uses: actions/setup-python@v5
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
cache: pip

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ test-command = "pytest {project}/tests"
99

1010
[tool.cibuildwheel.linux]
1111
before-all = [
12-
"./scripts/download-mbedtls.sh $VERSION ~/.local/src",
13-
"./scripts/install-mbedtls.sh ~/.local/src",
12+
"./scripts/download-mbedtls.sh $VERSION .local/src",
13+
"./scripts/install-mbedtls.sh .local/src",
1414
]
1515

1616
[tool.cibuildwheel.macos]
17+
environment.UPSTREAM_DEST="$PWD"
1718
before-all = [
18-
"./scripts/download-mbedtls.sh $VERSION ~/.local/src",
19-
"./scripts/install-mbedtls.sh ~/.local/src",
20-
"cp /usr/local/lib/libmbed*dylib .",
19+
"./scripts/download-mbedtls.sh $VERSION .local/src",
20+
"./scripts/install-mbedtls.sh .local/src $UPSTREAM_DEST",
2121
]
2222

2323
[tool.cibuildwheel.windows]

scripts/install-mbedtls.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ else
2222
exit 1
2323
fi
2424

25-
make -C "$srcdir" clean
25+
C_INCLUDE_PATH=
26+
LIBRARY_PATH=
27+
2628
make -C "$srcdir" -j CFLAGS="-O2 -DMBEDTLS_ARIA_C=ON" SHARED=ON lib
2729
make -C "$srcdir" -j DESTDIR="$destdir" install

0 commit comments

Comments
 (0)