Bumped MSRV to 1.64, updated dependencies, fixed some clippy lints #275
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: Cross-platform tests | |
on: | |
push: | |
tags-ignore: | |
- '**' | |
branches: | |
- '**' | |
pull_request: | |
env: | |
RUST_BACKTRACE: 1 | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
test: | |
name: Test ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, macOS-14] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: (macos) install automake and autoconf | |
if: ${{ startsWith(matrix.os, 'macOS') }} | |
run: | | |
brew install automake autoconf | |
- name: Install stable minimal toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
- name: install cfitsio | |
env: | |
# TODO: CFITSIO_VERSION: 4.4.0 | |
CFITSIO_VERSION: 3.49 | |
run: | | |
cd /tmp | |
curl "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-${CFITSIO_VERSION}.tar.gz" -o cfitsio.tar.gz | |
tar -xf cfitsio.tar.gz | |
rm cfitsio.tar.gz | |
cd cfitsio-${CFITSIO_VERSION} | |
./configure --prefix=/usr/local --enable-reentrant --disable-curl | |
sudo make shared | |
sudo make install | |
cd .. | |
if [[ "$OSTYPE" == "linux-gnu"* ]]; then | |
sudo ldconfig | |
fi | |
- name: Run tests on latest stable rust | |
run: cargo test --release --features cfitsio-static,examples | |
- 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 --features cfitsio-static,examples |