Skip to content

Commit

Permalink
fix macos CI
Browse files Browse the repository at this point in the history
use use brew boost (currently 1.85) and numpy
use github gfortran-13

disable tLSQaips|tLSQFit for amd64
casacore#1352
  • Loading branch information
d3v-null committed May 20, 2024
1 parent eff9c5e commit ac1d9ce
Showing 1 changed file with 33 additions and 24 deletions.
57 changes: 33 additions & 24 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,57 +9,66 @@ on:

jobs:
osx:
runs-on: macos-12
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os:
- macos-13 # x68
- macos-14 # arm64

steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: install homebrew deps
run: brew install fftw hdf5 boost-python3 cfitsio wcslib wget gfortran gsl ninja

# See https://github.com/orgs/Homebrew/discussions/3895#discussioncomment-4130560
- name: ensure we use homebrew python
- name: install dependencies, set python environment
run: |
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
brew unlink python@3.11
brew link python@3.11
# Delete GitHub Python, See https://github.com/orgs/Homebrew/discussions/3895#discussioncomment-4130560
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -print -delete
- name: pip install numpy
run: pip3 install numpy
brew install fftw hdf5 boost-python3 numpy cfitsio wcslib gsl ninja
- name: get WSRT measures
run: wget ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar -O WSRT_Measures.ztar
# ensure we use homebrew python (needed for macos-13-x86, not macos-14-arm64)
export PATH=$(brew --prefix python)/bin:${PATH}
echo PATH=$PATH | tee -a $GITHUB_ENV
- name: make build folder
- name: set up build folder with WSRT measures
run: |
wget ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar -O WSRT_Measures.ztar
mkdir -p build
cd build
tar zxvf ../WSRT_Measures.ztar
rm ../WSRT_Measures.ztar
- name: configure
run: |
cd build
cmake \
-G Ninja \
-DBUILD_TESTING=ON \
-DCMAKE_Fortran_COMPILER=$(which gfortran-13) \
-DCMAKE_PREFIX_PATH=/usr/local/ \
-DUSE_OPENMP=OFF \
-DUSE_HDF5=ON \
-DBoost_NO_BOOST_CMAKE=True \
-DBUILD_TESTING=ON \
-DBUILD_PYTHON=OFF \
-DBUILD_PYTHON3=ON \
-DPython3_EXECUTABLE=`which python3.11` \
-DBoost_NO_BOOST_CMAKE=True \
-DCMAKE_Fortran_COMPILER=gfortran-13 \
-DDATA_DIR=. ..
-DPython3_EXECUTABLE=$(which python3) \
-DUSE_HDF5=ON \
-DUSE_OPENMP=OFF \
-DDATA_DIR=. \
..
- name: build
- name: make
run: cmake --build build

- name: run tests
run: |
cd build
CTEST_OUTPUT_ON_FAILURE=1 ctest -E tConvert
export ctest_args=""
# disable tests on amd64 https://github.com/casacore/casacore/issues/1352
if [[ "$(uname -m)" == "arm64" ]]; then
export ctest_args="-E tLSQaips|tLSQFit"
fi
CTEST_OUTPUT_ON_FAILURE=1 ctest $ctest_args
- name: install
run: cmake --build build --target install

0 comments on commit ac1d9ce

Please sign in to comment.