Merge pull request #295 from quark-zju/py312 #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: [ master, github-actions ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
linux: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
py: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] | |
rust: [ "1.41.1", "stable", "nightly" ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.py }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.py }} | |
- name: Setup Rust ${{ matrix.rust }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Check versions and paths | |
run: | | |
python -V ; rustc -V | |
echo "PATH=$PATH" | |
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" | |
echo "LIBRARY_PATH=$LIBRARY_PATH" | |
PYTHON_LIB=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") | |
echo "PYTHON_LIB=$PYTHON_LIB" | |
echo "LIBRARY_PATH=$LIBRARY_PATH:$PYTHON_LIB" >> "$GITHUB_ENV" | |
- name: Remove Cargo.lock | |
if: ${{ matrix.rust == 'stable' || matrix.rust == 'nightly' }} | |
run: | | |
rm Cargo.lock | |
- name: Build and test | |
run: | | |
make test extensions | |
macos: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest ] | |
py: [ "3.11", "3.12" ] | |
rust: [ "1.54.0", "stable", "nightly" ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.py }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.py }} | |
- name: Setup Rust ${{ matrix.rust }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Check versions and paths | |
run: | | |
python -V ; rustc -V | |
echo "PATH=$PATH" | |
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" | |
echo "LIBRARY_PATH=$LIBRARY_PATH" | |
PYTHON_LIB=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") | |
echo "PYTHON_LIB=$PYTHON_LIB" | |
echo "LIBRARY_PATH=$LIBRARY_PATH:$PYTHON_LIB" >> "$GITHUB_ENV" | |
- name: Remove Cargo.lock | |
if: ${{ matrix.rust == 'stable' || matrix.rust == 'nightly' }} | |
run: | | |
rm Cargo.lock | |
- name: Build and test | |
run: | | |
make test extensions | |
windows: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ windows-latest ] | |
py: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] | |
rust: [ "1.41.1", "stable" ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.py }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.py }} | |
- name: Setup Rust ${{ matrix.rust }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Check versions and paths | |
run: | | |
python -V | |
rustc -V | |
echo PATH=$env:path | |
- name: Remove Cargo.lock | |
if: ${{ matrix.rust == 'stable' || matrix.rust == 'nightly' }} | |
run: | | |
del Cargo.lock | |
- name: Build and test | |
run: | | |
make test |