Skip to content

Change OS of CI to previous releases as latest one does not provide c… #89

Change OS of CI to previous releases as latest one does not provide c…

Change OS of CI to previous releases as latest one does not provide c… #89

Workflow file for this run

#This file is kept almost identical to test-linux.
#We use two files in order to get two distinct badges for Linux and macOS.
name: macOS
on:
- push
- pull_request
defaults:
run:
shell: bash
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
- 'nightly'
os:
# - ubuntu-latest
# - macOS-latest
- macos-13
arch:
- x64
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install libclang
run: |
if [ "$RUNNER_OS" = Linux ]; then
sudo apt-get install clang-13 libclang-13-dev
else #MacOS
#brew install llvm@13 #llvm@13 no more supported by brew
wget "https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz"
tar xJf clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz
rm clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz
ln -s clang+llvm-13.0.0-x86_64-apple-darwin clang-13
fi
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Build and test
env:
BODY: ${{github.event.pull_request.body}}
run: |
echo "$BODY"
if [ "$OSTYPE" != "darwin"* ]; then
rm -f /opt/hostedtoolcache/julia/1.6*/x64/lib/julia/libstdc++.so.6
fi
if [ "$RUNNER_OS" = Linux ]; then
cmake -DClang_DIR=/usr/lib/llvm-13/lib/cmake/clang -B build -S .
else #MacOS
#echo "ls clang-13/"
#ls clang-13/
#echo "ls clang-13/lib"
#ls clang-13/lib
#echo "ls clang-13/lib/cmake"
#ls clang-13/lib/cmake
#echo "ls clang-13/lib/cmake/clang"
#ls clang-13/lib/cmake/clang
#cmake -DClang_DIR=`pwd`/clang-13/lib/cmake/clang -DLLVM_DIR=`pwd`/clang-13/lib/cmake/llvm -B build -S .
cmake -DClang_DIR=`pwd`/clang-13/lib/cmake/clang -B build -S .
fi
cmake --build build --verbose -j `sysctl -n hw.logicalcpu`
PATH="`pwd`/build:$PATH"
export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)
cd test && ./runtests.jl