Skip to content

Commit

Permalink
Updated macos release to build cfitsio correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
gsleap committed Mar 28, 2021
1 parent 812375c commit e099ec5
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,29 @@ jobs:
toolchain: stable
override: true

- name: Install curl and cfitsio
- name: Build cfitsio
run: |
brew uninstall --ignore-dependencies curl
brew install curl-openssl cfitsio
# 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: Build mwalib release
run: MWALIB_LINK_STATIC_CFITSIO=1 cargo build --release

- name: Create release tarball
run: |
mv target/release/libmwalib.{a,dylib} include/mwalib.h .
tar -acvf mwalib-$(git describe --tags)-MacOSX.tar.gz LICENSE LICENSE-cfitsio CHANGELOG.md libmwalib.{a,dylib} mwalib.h
tar -acvf mwalib-$(git describe --tags)-macosx.tar.gz LICENSE LICENSE-cfitsio CHANGELOG.md libmwalib.{a,dylib} mwalib.h
- name: Upload tarball
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit e099ec5

Please sign in to comment.