Skip to content

Commit

Permalink
Added tests for python 3.13. More debug and fixes for releases CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gsleap committed Oct 16, 2024
1 parent 0172015 commit 6b3d7d2
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 18 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Publish to pypi
# Publish to crates.io
#
# This file is contains parts autogenerated by maturin v1.7.2
# This file contains parts autogenerated by maturin v1.7.2
#
# maturin generate-ci github --platform manylinux macos
#
Expand All @@ -24,8 +24,7 @@ permissions:

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
MWALIB_LINK_STATIC_CFITSIO: 1
CARGO_INCREMENTAL: 0

jobs:
build_linux:
Expand All @@ -49,7 +48,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --all-features --out dist -i 3.9 3.10 3.11 3.12
args: --release --all-features --out dist -i 3.9 3.10 3.11 3.12 3.13
manylinux: auto

- name: Upload linux wheels
Expand Down Expand Up @@ -86,13 +85,18 @@ jobs:
for TARGET in $TARGETS; do
echo "building target $TARGET"
export RUSTFLAGS="-C target-cpu=$TARGET"
# Build C objects
sudo MWALIB_LINK_STATIC_CFITSIO=1 cargo build --release --features cfitsio-static,examples
cargo build --release --features cfitsio-static,examples
# Create new release asset tarballs
# Get some debug
eval sudo mv target/release/libmwalib.${LIB_GLOB} include/mwalib.h .
eval sudo tar -acvf mwalib-${TAG}-${KERNEL}-${TARGET}.tar.gz \
ls -la target/release
ls -la include
ls -la .
eval mv target/release/libmwalib.${LIB_GLOB} include/mwalib.h .
eval tar -acvf mwalib-${TAG}-${KERNEL}-${TARGET}.tar.gz \
LICENSE LICENSE-cfitsio README.md CHANGELOG.md \
libmwalib.${LIB_GLOB} mwalib.h
done
Expand All @@ -108,8 +112,8 @@ jobs:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: macos-12
platform: # see https://github.com/actions/runner-images?tab=readme-ov-file#available-images for runner types
- runner: macos-14-large
target: x86_64
- runner: macos-14
target: aarch64
Expand All @@ -125,7 +129,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --all-features --out dist -i 3.9 3.10 3.11 3.12
args: --release --all-features --out dist -i 3.9 3.10 3.11 3.12 3.13

- name: Upload macos wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -163,8 +167,14 @@ jobs:
for TARGET in $TARGETS; do
echo "building target $TARGET"
export RUSTFLAGS="-C target-cpu=$TARGET"
# Build C objects
MWALIB_LINK_STATIC_CFITSIO=1 cargo build --release --features examples,cfitsio-static
cargo build --release --features examples,cfitsio-static
# Get some debug
ls -la target/release
ls -la include
ls -la .
# Create new release asset tarballs
eval mv target/release/libmwalib.${LIB_GLOB} include/mwalib.h .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run_python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
MWALIB_LINK_STATIC_CFITSIO: 1
CARGO_INCREMENTAL: 0

jobs:
test:
name: Test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macOS-14]
python-version: [3.9, "3.10", "3.11", "3.12"]
# see https://github.com/actions/runner-images?tab=readme-ov-file#available-images for runner types
os: [ubuntu-latest, macos-14, macos-14-large] # macos-14 is Arm64, macos-14-large is x86_64
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
exclude:
- os: macOS-14
python-version: 3.9
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
MWALIB_LINK_STATIC_CFITSIO: 1

jobs:
test:
name: Test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macOS-14]
# see https://github.com/actions/runner-images?tab=readme-ov-file#available-images for runner types
os: [ubuntu-latest, macos-14, macos-14-large] # macos-14 is Arm64, macos-14-large is x86_64
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

Changes in each release are listed below.

## 1.6.0 16-Oct-2024
## 1.6.0 17-Oct-2024

* Updated ndarray to 0.16
* Upgraded dependencies: clap to 0.4, pyo3 to 0.21
* Updated CI to use maturin actions for python wheel building
* Fixed test that was failing under Arm64
* Removed Python 3.8 support as it is now end of life
* Added tests for Python 3.13

## 1.5.0 20-Aug-2024

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only"
]
dependencies = ["numpy"]
Expand Down

0 comments on commit 6b3d7d2

Please sign in to comment.