Skip to content

Commit 781fa6f

Browse files
committed
Update GitHub actions
Drop Python 2.7, as it is no longer available: Warning: The support for python 2.7 will be removed on June 19. Related issue: actions/setup-python#672 Version 2.7 was not found in the local cache Error: The version '2.7' with architecture 'x64' was not found for Ubuntu 22.04. The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json Add Python 3.12 as its support was just added. Fork macOS steps from Linux due to the ARM arch change: - Rust 1.41 does not have a `aarch64-apple-darwin` version. The first Rust version that supports `aarch64-apple-darwin` is 1.49.0. - Python 3.7 to 3.10 do not have a macOS ARM version.
1 parent b2acd66 commit 781fa6f

File tree

1 file changed

+41
-4
lines changed

1 file changed

+41
-4
lines changed

.github/workflows/test.yml

+41-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
unix:
10+
linux:
1111
runs-on: ${{ matrix.os }}
1212

1313
strategy:
1414
matrix:
15-
os: [ ubuntu-latest, macos-latest ]
16-
py: [ "2.7", "3.7", "3.8", "3.9", "3.10", "3.11" ]
15+
os: [ ubuntu-latest ]
16+
py: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
1717
rust: [ "1.41.1", "stable", "nightly" ]
1818

1919
steps:
@@ -44,13 +44,50 @@ jobs:
4444
run: |
4545
make test extensions
4646
47+
macos:
48+
runs-on: ${{ matrix.os }}
49+
50+
strategy:
51+
matrix:
52+
os: [ macos-latest ]
53+
py: [ "3.11", "3.12" ]
54+
rust: [ "1.49.0", "stable", "nightly" ]
55+
56+
steps:
57+
- name: Checkout code
58+
uses: actions/checkout@v3
59+
- name: Setup Python ${{ matrix.py }}
60+
uses: actions/setup-python@v4
61+
with:
62+
python-version: ${{ matrix.py }}
63+
- name: Setup Rust ${{ matrix.rust }}
64+
uses: dtolnay/rust-toolchain@master
65+
with:
66+
toolchain: ${{ matrix.rust }}
67+
- name: Check versions and paths
68+
run: |
69+
python -V ; rustc -V
70+
echo "PATH=$PATH"
71+
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
72+
echo "LIBRARY_PATH=$LIBRARY_PATH"
73+
PYTHON_LIB=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
74+
echo "PYTHON_LIB=$PYTHON_LIB"
75+
echo "LIBRARY_PATH=$LIBRARY_PATH:$PYTHON_LIB" >> "$GITHUB_ENV"
76+
- name: Remove Cargo.lock
77+
if: ${{ matrix.rust == 'stable' || matrix.rust == 'nightly' }}
78+
run: |
79+
rm Cargo.lock
80+
- name: Build and test
81+
run: |
82+
make test extensions
83+
4784
windows:
4885
runs-on: ${{ matrix.os }}
4986

5087
strategy:
5188
matrix:
5289
os: [ windows-latest ]
53-
py: [ "2.7", "3.7", "3.8", "3.9", "3.10", "3.11"]
90+
py: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
5491
rust: [ "1.41.1", "stable" ]
5592

5693
steps:

0 commit comments

Comments
 (0)