CI, NFC: Update libomp installation approach on macOS in the GitHub action (#1094)

pull/1095/head
Koen Schmeets 2021-08-18 12:19:02 +02:00 committed by ruevs
parent 5edb2eebf6
commit 0a3504c30a
2 changed files with 6 additions and 4 deletions

View File

@ -14,13 +14,13 @@ CMAKE_GENERATOR="Unix Makefiles"
CMAKE_PREFIX_PATH="" CMAKE_PREFIX_PATH=""
if [ "$2" = "arm64" ]; then if [ "$2" = "arm64" ]; then
OSX_ARCHITECTURE="arm64" OSX_ARCHITECTURE="arm64"
CMAKE_PREFIX_PATH="/tmp/libomp-arm64/libomp/11.0.1" CMAKE_PREFIX_PATH=$(find /tmp/libomp-arm64/libomp -depth 1)
git apply cmake/libpng-macos-arm64.patch || echo "Could not apply patch, probably already patched..." git apply cmake/libpng-macos-arm64.patch || echo "Could not apply patch, probably already patched..."
mkdir build-arm64 || true mkdir build-arm64 || true
cd build-arm64 cd build-arm64
elif [ "$2" = "x86_64" ]; then elif [ "$2" = "x86_64" ]; then
OSX_ARCHITECTURE="x86_64" OSX_ARCHITECTURE="x86_64"
CMAKE_PREFIX_PATH="/tmp/libomp-x86_64/libomp/11.0.1" CMAKE_PREFIX_PATH=$(find /tmp/libomp-x86_64/libomp -depth 1)
mkdir build || true mkdir build || true
cd build cd build
else else

View File

@ -1,10 +1,12 @@
#!/bin/sh -xe #!/bin/sh -xe
if [ "$1" = "ci" ]; then if [ "$1" = "ci" ]; then
curl -L https://bintray.com/homebrew/bottles/download_file?file_path=libomp-11.0.1.arm64_big_sur.bottle.tar.gz --output /tmp/libomp-arm64.tar.gz armloc=$(brew fetch --bottle-tag=arm64_big_sur libomp | grep -i downloaded | grep tar.gz | cut -f2 -d:)
x64loc=$(brew fetch --bottle-tag=big_sur libomp | grep -i downloaded | grep tar.gz | cut -f2 -d:)
cp $armloc /tmp/libomp-arm64.tar.gz
mkdir /tmp/libomp-arm64 || true mkdir /tmp/libomp-arm64 || true
tar -xzvf /tmp/libomp-arm64.tar.gz -C /tmp/libomp-arm64 tar -xzvf /tmp/libomp-arm64.tar.gz -C /tmp/libomp-arm64
curl -L https://bintray.com/homebrew/bottles/download_file?file_path=libomp-11.0.1.big_sur.bottle.tar.gz --output /tmp/libomp-x86_64.tar.gz cp $x64loc /tmp/libomp-x86_64.tar.gz
mkdir /tmp/libomp-x86_64 || true mkdir /tmp/libomp-x86_64 || true
tar -xzvf /tmp/libomp-x86_64.tar.gz -C /tmp/libomp-x86_64 tar -xzvf /tmp/libomp-x86_64.tar.gz -C /tmp/libomp-x86_64
else else