Skip to content

Reduce size of llvm cache by not build webassembly target for llvm<19 #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 49 additions & 85 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,111 +27,147 @@ jobs:
clang-runtime: '19'
cling: Off
cppyy: On
llvm_enable_projects: "clang;lld"
llvm_targets_to_build: "WebAssembly;host;NVPTX"
- name: ubu22-x86-gcc12-clang-repl-18
os: ubuntu-22.04
compiler: gcc-12
clang-runtime: '18'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu22-x86-gcc12-clang-repl-17
os: ubuntu-22.04
compiler: gcc-12
clang-runtime: '17'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu22-x86-gcc12-clang-repl-16
os: ubuntu-22.04
compiler: gcc-12
clang-runtime: '16'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu22-x86-gcc9-clang13-cling
os: ubuntu-22.04
compiler: gcc-9
clang-runtime: '13'
cling: On
cling-version: '1.0'
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: win2022-msvc-clang-repl-19
os: windows-2022
compiler: msvc
clang-runtime: '19'
cling: Off
cppyy: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: win2022-msvc-clang-repl-18
os: windows-2022
compiler: msvc
clang-runtime: '18'
cling: Off
cppyy: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: win2022-msvc-clang-repl-17
os: windows-2022
compiler: msvc
clang-runtime: '17'
cling: Off
cppyy: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: osx14-arm-clang-clang-repl-19
os: macos-14
compiler: clang
clang-runtime: '19'
cling: Off
cppyy: On
llvm_enable_projects: "clang;lld"
llvm_targets_to_build: "WebAssembly;host;NVPTX"
- name: osx14-arm-clang-clang-repl-18
os: macos-14
compiler: clang
clang-runtime: '18'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: osx14-arm-clang-clang-repl-17
os: macos-14
compiler: clang
clang-runtime: '17'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: osx14-arm-clang-clang-repl-16
os: macos-14
compiler: clang
clang-runtime: '16'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: osx14-arm-clang-clang13-cling
os: macos-14
compiler: clang
clang-runtime: '13'
cling: On
cling-version: '1.0'
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: osx13-x86-clang-clang-repl-19
os: macos-13
compiler: clang
clang-runtime: '19'
cling: Off
cppyy: On
llvm_enable_projects: "clang;lld"
llvm_targets_to_build: "WebAssembly;host;NVPTX"
- name: osx13-x86-clang-clang-repl-18
os: macos-13
compiler: clang
clang-runtime: '18'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: osx13-x86-clang-clang-repl-17
os: macos-13
compiler: clang
clang-runtime: '17'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: osx13-x86-clang-clang-repl-16
os: macos-13
compiler: clang
clang-runtime: '16'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: osx13-x86-clang-clang13-cling
os: macos-13
compiler: clang
clang-runtime: '13'
cling: On
cling-version: '1.0'
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -340,10 +376,10 @@ jobs:
mkdir build
if [[ "${cling_on}" == "ON" ]]; then
cd build
cmake -DLLVM_ENABLE_PROJECTS="clang;lld" \
cmake -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects }}" \
-DLLVM_EXTERNAL_PROJECTS=cling \
-DLLVM_EXTERNAL_CLING_SOURCE_DIR=../../cling \
-DLLVM_TARGETS_TO_BUILD="WebAssembly;host;NVPTX" \
-DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
Expand All @@ -354,7 +390,6 @@ jobs:
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_LIBXML2=OFF \
../llvm
cmake --build . --target lld --parallel ${{ env.ncpus }}
cmake --build . --target clang --parallel ${{ env.ncpus }}
cmake --build . --target cling --parallel ${{ env.ncpus }}
# Now build gtest.a and gtest_main for CppInterOp to run its tests.
Expand All @@ -367,8 +402,8 @@ jobs:
echo "Apply clang${{ matrix.clang-runtime }}-*.patch patches:"
fi
cd build
cmake -DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_TARGETS_TO_BUILD="WebAssembly;host;NVPTX" \
cmake -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" \
-DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
Expand All @@ -379,7 +414,11 @@ jobs:
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_LIBXML2=OFF \
../llvm
cmake --build . --target clang clang-repl lld --parallel ${{ env.ncpus }}
if [[ "${llvm_vers}" == "16" ]]||[[ "${llvm_vers}" == "17" ]]||[[ "${llvm_vers}" == "18" ]]; then
cmake --build . --target clang clang-repl --parallel ${{ env.ncpus }}
else
cmake --build . --target clang clang-repl lld --parallel ${{ env.ncpus }}
fi
fi
cd ../
rm -rf $(find . -maxdepth 1 ! -name "build" ! -name "llvm" ! -name "clang" ! -name ".")
Expand Down Expand Up @@ -411,10 +450,10 @@ jobs:
if ( "${{ matrix.cling }}" -imatch "On" )
{
cd build
cmake -DLLVM_ENABLE_PROJECTS="clang" `
cmake -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" `
-DLLVM_EXTERNAL_PROJECTS=cling `
-DLLVM_EXTERNAL_CLING_SOURCE_DIR="$env:CLING_DIR" `
-DLLVM_TARGETS_TO_BUILD="host;NVPTX" `
-DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" `
-DCMAKE_BUILD_TYPE=Release `
-DLLVM_ENABLE_ASSERTIONS=ON `
-DCLANG_ENABLE_STATIC_ANALYZER=OFF `
Expand Down Expand Up @@ -446,8 +485,8 @@ jobs:
}
cd build
echo "Apply clang${{ matrix.clang-runtime }}-*.patch patches:"
cmake -DLLVM_ENABLE_PROJECTS="clang" `
-DLLVM_TARGETS_TO_BUILD="host;NVPTX" `
cmake -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" `
-DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" `
-DCMAKE_BUILD_TYPE=Release `
-DLLVM_ENABLE_ASSERTIONS=ON `
-DCLANG_ENABLE_STATIC_ANALYZER=OFF `
Expand Down Expand Up @@ -1108,93 +1147,18 @@ jobs:
clang-runtime: '19'
cling: Off
micromamba_shell_init: bash
- name: ubu22-x86-gcc12-clang-repl-18-emscripten_wasm
os: ubuntu-22.04
compiler: gcc-12
clang-runtime: '18'
cling: Off
micromamba_shell_init: bash
- name: ubu22-x86-gcc12-clang-repl-17-emscripten_wasm
os: ubuntu-22.04
compiler: gcc-12
clang-runtime: '17'
cling: Off
micromamba_shell_init: bash
- name: ubu22-x86-gcc12-clang-repl-16-emscripten_wasm
os: ubuntu-22.04
compiler: gcc-12
clang-runtime: '16'
cling: Off
micromamba_shell_init: bash
- name: ubu22-x86-gcc9-clang13-cling-emscripten_wasm
os: ubuntu-22.04
compiler: gcc-9
clang-runtime: '13'
cling: On
cling-version: '1.0'
micromamba_shell_init: bash
- name: osx14-arm-clang-clang-repl-19-emscripten_wasm
os: macos-14
compiler: clang
clang-runtime: '19'
cling: Off
micromamba_shell_init: bash
- name: osx14-arm-clang-clang-repl-18-emscripten_wasm
os: macos-14
compiler: clang
clang-runtime: '18'
cling: Off
micromamba_shell_init: bash
- name: osx14-arm-clang-clang-repl-17-emscripten_wasm
os: macos-14
compiler: clang
clang-runtime: '17'
cling: Off
micromamba_shell_init: bash
- name: osx14-arm-clang-clang-repl-16-emscripten_wasm
os: macos-14
compiler: clang
clang-runtime: '16'
cling: Off
micromamba_shell_init: bash
- name: osx14-arm-clang-clang13-cling-emscripten_wasm
os: macos-14
compiler: clang
clang-runtime: '13'
cling: On
cling-version: '1.0'
micromamba_shell_init: bash
- name: osx13-x86-clang-clang-repl-19-emscripten_wasm
os: macos-13
compiler: clang
clang-runtime: '19'
cling: Off
micromamba_shell_init: bash
- name: osx13-x86-clang-clang-repl-18-emscripten_wasm
os: macos-13
compiler: clang
clang-runtime: '18'
cling: Off
micromamba_shell_init: bash
- name: osx13-x86-clang-clang-repl-17-emscripten_wasm
os: macos-13
compiler: clang
clang-runtime: '17'
cling: Off
micromamba_shell_init: bash
- name: osx13-x86-clang-clang-repl-16-emscripten_wasm
os: macos-13
compiler: clang
clang-runtime: '16'
cling: Off
micromamba_shell_init: bash
- name: osx13-x86-clang-clang13-cling-emscripten_wasm
os: macos-13
compiler: clang
clang-runtime: '13'
cling: On
cling-version: '1.0'
micromamba_shell_init: bash

steps:
- uses: actions/checkout@v4
Expand Down