Completed, full pyo3 implementation with pytests #181
Workflow file for this run
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: MacOS Tests | |
on: [push, pull_request] | |
env: | |
RUST_BACKTRACE: 1 | |
jobs: | |
test_macos: | |
strategy: | |
matrix: | |
os: ["macOS-latest"] | |
include: | |
- os: macos-latest | |
python-version: [3.7, 3.8, 3.9, 3.10] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Build cfitsio | |
run: | | |
# Install dependencies | |
curl "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.49.tar.gz" -o cfitsio.tar.gz | |
tar -xf cfitsio.tar.gz | |
rm cfitsio.tar.gz | |
cd cfitsio-3.49 | |
# Enabling SSE2/SSSE3 could cause portability problems, but it's unlikely that anyone | |
# is using such a CPU... | |
# https://stackoverflow.com/questions/52858556/most-recent-processor-without-support-of-ssse3-instructions | |
# Disabling curl just means you cannot fits_open() using a URL. | |
CFLAGS="-O3" ./configure --prefix=/usr/local --enable-reentrant --enable-sse2 --enable-ssse3 --disable-curl | |
sudo make shared | |
sudo make install | |
cd .. | |
- name: Run tests | |
run: MWALIB_LINK_STATIC_CFITSIO=1 cargo test --release --verbose | |
- name: Minimum-specified Rust version works | |
run: | | |
MIN_RUST=$(grep -m1 "rust-version" Cargo.toml | sed 's|.*\"\(.*\)\"|\1|') | |
~/.cargo/bin/rustup install $MIN_RUST --profile minimal | |
cargo +${MIN_RUST} test | |
cargo +${MIN_RUST} test --all-features |