Adds out-of-process JIT execution in CppInterOp #133
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: OSX-arm | |
| 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: osx15-arm-clang-clang-repl-20 | |
| os: macos-15 | |
| compiler: clang | |
| clang-runtime: '20' | |
| cling: Off | |
| cppyy: Off | |
| llvm_enable_projects: "clang;compiler-rt" | |
| llvm_targets_to_build: "host" | |
| - name: osx15-arm-clang-clang-repl-19-cppyy | |
| os: macos-15 | |
| compiler: clang | |
| clang-runtime: '19' | |
| cling: Off | |
| cppyy: On | |
| llvm_enable_projects: "clang" | |
| llvm_targets_to_build: "host" | |
| - name: osx15-arm-clang-clang-repl-18-cppyy | |
| os: macos-15 | |
| compiler: clang | |
| clang-runtime: '18' | |
| cling: Off | |
| cppyy: On | |
| llvm_enable_projects: "clang" | |
| llvm_targets_to_build: "host" | |
| - name: osx15-arm-clang-clang-repl-17-cppyy | |
| os: macos-15 | |
| compiler: clang | |
| clang-runtime: '17' | |
| cling: Off | |
| cppyy: On | |
| llvm_enable_projects: "clang" | |
| llvm_targets_to_build: "host" | |
| - name: osx15-arm-clang-clang-repl-16 | |
| os: macos-15 | |
| compiler: clang | |
| clang-runtime: '16' | |
| cling: Off | |
| cppyy: Off | |
| llvm_enable_projects: "clang" | |
| llvm_targets_to_build: "host" | |
| - name: osx15-arm-clang-clang18-cling-cppyy | |
| os: macos-15 | |
| 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: v1-${{ 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 | |
| cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]') | |
| if [[ "${cling_on}" == "ON" ]]; then | |
| brew install llvm@15 | |
| brew remove llvm@18 | |
| brew cleanup | |
| #FIXME: Do not believe setting all these environment variables are necessary | |
| # They were set to avoid using Xcodes libc++ and to stop CppInterOp using llvm@18 in tests | |
| echo 'LDFLAGS="-L/opt/homebrew/opt/llvm@15/lib/ -L/opt/homebrew/opt/llvm@15/c++/"' >> $GITHUB_ENV | |
| echo 'CPPFLAGS="-I/opt/homebrew/opt/llvm@15/include"' >> $GITHUB_ENV | |
| echo 'CPATH="/opt/homebrew/include/"' >> $GITHUB_ENV | |
| echo 'LIBRARY_PATH="/opt/homebrew/lib/"' >> $GITHUB_ENV | |
| echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV | |
| echo "CXX=$(brew --prefix llvm@15)/bin/clang++" >> $GITHUB_ENV | |
| else | |
| echo "CC=$(brew --prefix llvm@18)/bin/clang" >> $GITHUB_ENV | |
| echo "CXX=$(brew --prefix llvm@18)/bin/clang++" >> $GITHUB_ENV | |
| fi | |
| fi | |
| echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV | |
| env: | |
| compiler: ${{ matrix.compiler }} | |
| - name: Install deps | |
| run: | | |
| brew update --force | |
| brew remove unxip | |
| # 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 |