Fix the number of pols being allocated as 4 instead of 1 #76
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 | |
# Do this on every push, but don't double up on tags | |
on: | |
push: | |
tags-ignore: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
test: | |
name: Test ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install Dependencies | |
run: | | |
# The automake included with MacOS is seemingly old. Updating it fixes | |
# some issues. | |
if [[ "$OSTYPE" != "linux-gnu"* ]]; then | |
brew install automake pkg-config | |
fi | |
curl "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.1.0.tar.gz" -o cfitsio.tar.gz | |
tar -xf cfitsio.tar.gz | |
rm cfitsio.tar.gz | |
cd cfitsio-* | |
./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 | |
run: cargo test | |
- name: Run tests, no default features | |
run: cargo test --no-default-features | |
- name: Run tests, all features | |
run: cargo test --all-features | |
- name: Run tests, no default features but cfitsio | |
run: cargo test --no-default-features --features=cfitsio | |
- name: Run tests, no default features but mwalib | |
run: cargo test --no-default-features --features=mwalib | |
- name: Run tests, no default features but ms | |
run: cargo test --no-default-features --features=ms | |
- name: Run tests, no default features but approx | |
run: cargo test --no-default-features --features=approx | |
- name: Run tests, no default features but mwalib and ms | |
run: cargo test --no-default-features --features=mwalib,ms | |
- name: Run tests, no default features but mwalib and approx | |
run: cargo test --no-default-features --features=mwalib,approx | |
- name: Run tests, no default features but ms and approx | |
run: cargo test --no-default-features --features=ms,approx | |
- name: Run tests, no default features but serde | |
run: cargo test --no-default-features --features=serde | |
- 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 --no-default-features | |
cargo +${MIN_RUST} test --all-features |