Skip to content

Commit

Permalink
fix macos ci install deps
Browse files Browse the repository at this point in the history
  • Loading branch information
d3v-null committed Nov 14, 2024
1 parent b6c5cf2 commit 7284ae5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/macos_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,23 @@ jobs:
uses: davidB/rust-cargo-make@v1
- name: Install Dependencies
run: |
# cargo make install_deps # doesn't work
brew install casacore/tap/casacore mwatelescope/tap/aoflagger
# cargo make install_deps
# doesn't work on macos, brew install ... says you need arch -arm64 brew ...
# but there's no way to distinguish between macos-13 and macos-14
# using uname -m or arch
# https://github.com/actions/runner-images/issues/9471#issuecomment-1992603303
for f in $(find /usr/local/bin -type l -print); do \
(readlink $f | grep -q -s "/Library") && echo Removing "$f" && rm -f "$f"; \
done
INSTALL="brew install"
[ "${{ matrix.os }}" == "macos-14" ] && INSTALL="arch -arm64 brew install"
$INSTALL mwatelescope/tap/aoflagger
echo "DYLD_FALLBACK_LIBRARY_PATH=$(brew --prefix)/lib/" >> $GITHUB_ENV
echo "AOFLAGGER_LIB=$(brew --prefix)/lib/" >> $GITHUB_ENV
echo "AOFLAGGER_INCLUDE_DIR=$(brew --prefix)/include/" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig/" >> $GITHUB_ENV
- name: Run tests
run: |
cargo make test_no_default
cargo make test_no_flag
cargo make test
env:
DYLD_FALLBACK_LIBRARY_PATH: /opt/homebrew/lib/
AOFLAGGER_LIB: /opt/homebrew/lib/
AOFLAGGER_INCLUDE_DIR: /opt/homebrew/include/
8 changes: 7 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,13 @@ dependencies = ["linux_install_aoflagger"]

[tasks.mac_install_deps]
script = """
brew install casacore/tap/casacore mwatelescope/tap/aoflagger
INSTALL="brew install"
# in github actions runners:
# - macos-13: uname -m => x86_64, arch => i386
# - macos-14: uname -m => x86_64, arch => i386
# but macos-14 should be arm64 ?
# in that case, we want INSTALL="arch -arm64 $INSTALL" apparently?
$INSTALL mwatelescope/tap/aoflagger
"""

[tasks.install_deps]
Expand Down

0 comments on commit 7284ae5

Please sign in to comment.