Skip to content

Adds out-of-process JIT execution in CppInterOp #118

Adds out-of-process JIT execution in CppInterOp

Adds out-of-process JIT execution in CppInterOp #118

Workflow file for this run

name: OSX-x86
on:
pull_request:
branches: [main]
push:
branches: [main]
release:
types: [published]
schedule:
- cron: '30 20 * * *' # Warning: Timezone dep - 20:00 is 1:00
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: osx13-x86-clang-clang-repl-20
os: macos-13
compiler: clang
clang-runtime: '20'
cling: Off
cppyy: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx13-x86-clang-clang-repl-19-cppyy
os: macos-13
compiler: clang
clang-runtime: '19'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx13-x86-clang-clang-repl-18-cppyy
os: macos-13
compiler: clang
clang-runtime: '18'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx13-x86-clang-clang-repl-17-cppyy
os: macos-13
compiler: clang
clang-runtime: '17'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx13-x86-clang-clang-repl-16
os: macos-13
compiler: clang
clang-runtime: '16'
cling: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx13-x86-clang-clang18-cling-cppyy
os: macos-13
compiler: clang
clang-runtime: '18'
cling: On
cppyy: On
cling-version: '1.2'
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Save PR Info
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
echo ${{ github.repository }} > ./pr/REPO
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
if [[ "$cling_on" == "ON" ]]; then
export CLING_HASH=$(git ls-remote https://github.com/root-project/cling.git refs/tags/v${{ matrix.cling-version }} | tr '\t' '-')
export LLVM_HASH=$(git ls-remote https://github.com/root-project/llvm-project.git cling-llvm${{ matrix.clang-runtime}} | tr '\t' '-')
else
export CLING_HASH="Repl"
# May need to revert back to both having same llvm_hash, as below cause llvm to be rebuilt everytime commit is made to llvm/llvm-project for release a.x
# which could be quite often for new releases
export LLVM_HASH=$(git ls-remote https://github.com/llvm/llvm-project.git refs/heads/release/${{ matrix.clang-runtime}}.x | tr '\t' '-')
fi
echo "CLING_HASH=$CLING_HASH" >> $GITHUB_ENV
echo "LLVM_HASH=$LLVM_HASH" >> $GITHUB_ENV
- name: Restore Cache LLVM/Clang runtime build directory
uses: actions/cache/restore@v4
id: cache
with:
path: |
llvm-project
${{ matrix.cling=='On' && 'cling' || '' }}
key: ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}
- name: Setup default Build Type
run: |
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
echo "CODE_COVERAGE=0" >> $GITHUB_ENV
echo "ncpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
- name: Setup compiler
run: |
vers="${compiler#*-}"
if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then
brew install "gcc@$vers"
echo "CC=gcc-${vers}" >> $GITHUB_ENV
echo "CXX=g++-${vers}" >> $GITHUB_ENV
else
echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV
echo "CXX=$(brew --prefix llvm@15)/bin/clang++" >> $GITHUB_ENV
fi
echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
env:
compiler: ${{ matrix.compiler }}
- name: Install deps
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
brew update --force
brew remove swiftlint
# workaround for https://github.com/actions/setup-python/issues/577
for pkg in $(brew list | grep '^python@'); do
brew unlink "$pkg"
brew link --overwrite "$pkg"
done
brew upgrade openssl >/dev/null 2>&1
brew upgrade --force
brew install ninja
brew install eigen
brew install boost
brew install gnu-sed
pip install distro pytest
- uses: ./.github/actions/Build_LLVM
with:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
- name: Save Cache LLVM/Clang runtime build directory
uses: actions/cache/save@v4
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
with:
path: |
llvm-project
${{ matrix.cling=='On' && 'cling' || '' }}
key: ${{ steps.cache.outputs.cache-primary-key }}
- uses: ./.github/actions/Build_and_Test_CppInterOp
- uses: ./.github/actions/Build_and_Test_cppyy
- name: Show debug info
if: ${{ failure() }}
run: |
export
echo $GITHUB_ENV
- name: Setup tmate session
if: ${{ failure() && runner.debug }}
uses: mxschmitt/action-tmate@v3
# When debugging increase to a suitable value!
timeout-minutes: 30