Adds out-of-process JIT execution in CppInterOp #126
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: Ubuntu-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: ubu22-arm-gcc12-clang-repl-20-coverage | |
| os: ubuntu-22.04-arm | |
| compiler: gcc-12 | |
| clang-runtime: '20' | |
| cling: Off | |
| cppyy: Off | |
| llvm_enable_projects: "clang;compiler-rt" | |
| llvm_targets_to_build: "host;NVPTX" | |
| coverage: true | |
| - name: ubu24-arm-gcc12-clang-repl-20 | |
| os: ubuntu-24.04-arm | |
| compiler: gcc-12 | |
| clang-runtime: '20' | |
| cling: Off | |
| cppyy: Off | |
| llvm_enable_projects: "clang" | |
| llvm_targets_to_build: "host;NVPTX" | |
| - name: ubu24-arm-gcc12-clang-repl-19-cppyy | |
| os: ubuntu-24.04-arm | |
| compiler: gcc-12 | |
| clang-runtime: '19' | |
| cling: Off | |
| cppyy: On | |
| llvm_enable_projects: "clang" | |
| llvm_targets_to_build: "host;NVPTX" | |
| - name: ubu24-arm-gcc12-clang-repl-18-cppyy | |
| os: ubuntu-24.04-arm | |
| compiler: gcc-12 | |
| clang-runtime: '18' | |
| cling: Off | |
| cppyy: On | |
| llvm_enable_projects: "clang" | |
| llvm_targets_to_build: "host;NVPTX" | |
| - name: ubu24-arm-gcc12-clang-repl-17-cppyy | |
| os: ubuntu-24.04-arm | |
| compiler: gcc-12 | |
| clang-runtime: '17' | |
| cling: Off | |
| cppyy: On | |
| llvm_enable_projects: "clang" | |
| llvm_targets_to_build: "host;NVPTX" | |
| - name: ubu24-arm-gcc12-clang-repl-16 | |
| os: ubuntu-24.04-arm | |
| compiler: gcc-12 | |
| clang-runtime: '16' | |
| cling: Off | |
| cppyy: Off | |
| llvm_enable_projects: "clang" | |
| llvm_targets_to_build: "host;NVPTX" | |
| - name: ubu24-arm-gcc9-clang18-cling-cppyy | |
| os: ubuntu-24.04-arm | |
| compiler: gcc-9 | |
| clang-runtime: '18' | |
| cling: On | |
| cppyy: Off | |
| 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=$(nproc --all)" >> $GITHUB_ENV | |
| - name: Setup compiler | |
| run: | | |
| # https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html | |
| vers="${compiler#*-}" | |
| os_codename="`cat /etc/os-release | grep UBUNTU_CODENAME | cut -d = -f 2`" | |
| ##sudo apt update | |
| if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then | |
| sudo apt install -y gcc-${vers} g++-${vers} lld | |
| echo "CC=gcc-${vers}" >> $GITHUB_ENV | |
| echo "CXX=g++-${vers}" >> $GITHUB_ENV | |
| else | |
| if ! sudo apt install -y clang-${vers}; then | |
| curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
| echo "deb https://apt.llvm.org/${os_codename}/ llvm-toolchain-${os_codename}-${vers} main" | sudo tee -a /etc/apt/sources.list | |
| sudo apt-get update | |
| sudo apt-get install -y clang-${vers} | |
| fi | |
| echo "CC=clang-${vers}" >> $GITHUB_ENV | |
| echo "CXX=clang++-${vers}" >> $GITHUB_ENV | |
| fi | |
| env: | |
| compiler: ${{ matrix.compiler }} | |
| - name: Install deps | |
| run: | | |
| # Install deps | |
| sudo apt-get update | |
| sudo apt-get install valgrind ninja-build | |
| sudo apt-get install git g++ debhelper devscripts gnupg python3 doxygen graphviz python3-sphinx | |
| sudo apt-get install -y libc6-dbg | |
| sudo apt-get install valgrind | |
| sudo apt autoremove | |
| sudo apt clean | |
| # Install libraries used by the cppyy test suite | |
| sudo apt install libeigen3-dev | |
| sudo apt install libboost-all-dev | |
| - 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 }} | |
| - name: Setup code coverage | |
| if: ${{ success() && (matrix.coverage == true) }} | |
| run: | | |
| sudo apt install lcov | |
| echo "CODE_COVERAGE=1" >> $GITHUB_ENV | |
| echo "BUILD_TYPE=Debug" >> $GITHUB_ENV | |
| - uses: ./.github/actions/Build_and_Test_CppInterOp | |
| - name: Prepare code coverage report | |
| if: ${{ success() && (matrix.coverage == true) }} | |
| run: | | |
| # Create lcov report | |
| # capture coverage info | |
| vers="${CC#*-}" | |
| lcov --directory build/ --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-${vers} | |
| lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' ${{ github.workspace }}'/llvm-project/*' ${{ github.workspace }}'/unittests/*' --output-file coverage.info | |
| # output coverage data for debugging (optional) | |
| lcov --list coverage.info | |
| - name: Upload to codecov.io | |
| if: ${{ success() && (matrix.coverage == true) }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.info | |
| fail_ci_if_error: true | |
| verbose: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - 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 |