From fab37b1f96d4cfbe21c40cbcbfd27ff49ce5e5b5 Mon Sep 17 00:00:00 2001 From: tihmstar Date: Fri, 26 Jul 2024 13:14:20 +0200 Subject: [PATCH] fix macOS ci --- .github/workflows/main.yml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fd996e9..1e92856 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,12 +38,6 @@ jobs: cd $(brew --prefix openssl) sudo mkdir -p /usr/local/lib/pkgconfig/ sudo cp -r lib/pkgconfig/* /usr/local/lib/pkgconfig/ - - IFS=',' read -r -a deparray <<< "$MAC_DYNAMIC_LIBS"; for d in ${deparray[@]}; do - echo "moving library $d" - cd $(brew --prefix $d) - find . -name "*.dylib" -exec mv {} {}.bak \; - done cd $GITHUB_WORKSPACE else @@ -86,7 +80,26 @@ jobs: - name: autogen run: ./autogen.sh --enable-static --disable-shared - name: make - run: make -j || make + run: | + if [ "$RUNNER_OS" == "macOS" ]; then + IFS=',' read -r -a deparray <<< "$MAC_DYNAMIC_LIBS"; for d in ${deparray[@]}; do + echo "moving library $d" + cd $(brew --prefix $d) + find . -name "*.dylib" -exec mv {} {}.bak \; + done + cd $GITHUB_WORKSPACE + + make -j || make + + IFS=',' read -r -a deparray <<< "$MAC_DYNAMIC_LIBS"; for d in ${deparray[@]}; do + echo "restoring library $d" + cd $(brew --prefix $d) + find . -name "*.dylib.bak" | while read f; do o=$(echo $f | rev | cut -d '.' -f2- | rev); mv $f $o; done + done + cd $GITHUB_WORKSPACE + else + make -j || make + fi - name: make install run: make DESTDIR=$GITHUB_WORKSPACE/$BUILDROOT install - uses: actions/upload-artifact@v4