diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 3406027..0a8ece8 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -34,9 +34,22 @@ jobs: env: DEBIAN_FRONTEND: noninteractive - - name: Install cfitsio - run: ./.github/workflows/make_cfitsio.sh - shell: bash + - 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 .. + + sudo ldconfig - name: Install stable toolchain uses: actions-rs/toolchain@v1 @@ -49,10 +62,10 @@ jobs: - name: Install cargo-llvm-cov run: cargo install cargo-llvm-cov - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Generate test lcov coverage into coverage/ dir run: | diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index f6fec18..303444e 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -89,7 +89,7 @@ jobs: - name: install maturin run: | python -m pip install --upgrade pip - python -m pip install maturin # [patchelf] ? + python -m pip install maturin - name: build mwalib run: | diff --git a/.github/workflows/run_python_tests.yml b/.github/workflows/run_python_tests.yml index 41d10d4..27aee90 100644 --- a/.github/workflows/run_python_tests.yml +++ b/.github/workflows/run_python_tests.yml @@ -19,16 +19,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, macOS-14] python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] steps: - name: Checkout sources - uses: actions/checkout@v3 - - - name: Install cfitsio - run: ./.github/workflows/make_cfitsio.sh - shell: bash + uses: actions/checkout@v4 + - name: (macos) install automake and autoconf + if: ${{ startsWith(matrix.os, 'macOS') }} + run: | + brew install automake autoconf + - name: Install stable toolchain uses: actions-rs/toolchain@v1 with: @@ -36,6 +37,25 @@ jobs: toolchain: stable override: true + - 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: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: @@ -44,18 +64,15 @@ jobs: - name: Run rust tests to generate test data run: cargo test --features=cfitsio-static - - name: Run pytests + - name: Setup python environment and run pytests run: | - pip3 install --upgrade pip - python3 -m venv env - source env/bin/activate - - pip3 install maturin==1.3.2 - if [[ "$OSTYPE" == "darwin"* ]]; then - brew install automake - fi + pip3 install --upgrade pip + python3 -m venv env + source env/bin/activate + pip3 install --upgrade pip + pip3 install maturin==1.3.2 - maturin develop --features=python,cfitsio-static --strip + maturin develop --features=python,cfitsio-static --strip - pip install pytest - pytest + pip3 install pytest + pytest diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 0ff0c53..5f8bf00 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -19,14 +19,15 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, macOS-14] steps: - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install cfitsio - run: ./.github/workflows/make_cfitsio.sh - shell: bash + - name: (macos) install automake and autoconf + if: ${{ startsWith(matrix.os, 'macOS') }} + run: | + brew install automake autoconf - name: Install stable toolchain uses: actions-rs/toolchain@v1 @@ -34,13 +35,31 @@ jobs: profile: minimal toolchain: stable override: true + + - 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 + - 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 - cargo +${MIN_RUST} test --features cfitsio-static,examples \ No newline at end of file + 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 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e552164..d993553 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ Changes in each release are listed below. ## 1.3.0 12-Apr-2024 * Added 'EDA2' and 'SHAO' as new valid `ReceiverType`s to `Rfinput` struct. -* Release now include MacOS Arm architecture binaries. +* Release and tests now include MacOS 14 Arm64 architecture binaries. ## 1.2.3 12-Mar-2024