Skip to content

Commit 8a4f2c0

Browse files
authored
Shared library build ci
1 parent dc2a59f commit 8a4f2c0

File tree

5 files changed

+24
-78
lines changed

5 files changed

+24
-78
lines changed

.github/workflows/Windows.yml

Lines changed: 24 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,13 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
include:
24-
- name: win2025-msvc-clang-repl-19
24+
- name: win2025-shared-lib
2525
os: windows-2025
26-
compiler: msvc
27-
clang-runtime: '19'
28-
cling: Off
29-
llvm_enable_projects: "clang"
30-
llvm_targets_to_build: "host;NVPTX"
31-
- name: win2025-msvc-clang-repl-18
32-
os: windows-2025
33-
compiler: msvc
26+
compiler: clang
3427
clang-runtime: '18'
3528
cling: Off
3629
llvm_enable_projects: "clang"
3730
llvm_targets_to_build: "host;NVPTX"
38-
- name: win2025-msvc-clang-repl-17
39-
os: windows-2025
40-
compiler: msvc
41-
clang-runtime: '17'
42-
cling: Off
43-
llvm_enable_projects: "clang"
44-
llvm_targets_to_build: "host;NVPTX"
4531

4632
steps:
4733
- uses: actions/checkout@v4
@@ -87,7 +73,7 @@ jobs:
8773
path: |
8874
llvm-project
8975
${{ matrix.cling=='On' && 'cling' || '' }}
90-
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' }}
76+
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' }}-shared-lib
9177
lookup-only: true
9278

9379
- name: Setup default Build Type on Windows
@@ -107,10 +93,10 @@ jobs:
10793
choco install llvm --version=$ver --no-progress -my
10894
clang --version
10995
#
110-
$env:CC="clang"
111-
$env:CXX="clang++"
112-
echo "CC=clang" >> $env:GITHUB_ENV
113-
echo "CXX=clang++" >> $env:GITHUB_ENV
96+
$env:CC="clang-cl"
97+
$env:CXX="clang-cl"
98+
echo "CC=clang-cl" >> $env:GITHUB_ENV
99+
echo "CXX=clang-cl" >> $env:GITHUB_ENV
114100
}
115101
elseif ( "${{ matrix.compiler }}" -imatch "msvc" )
116102
{
@@ -153,7 +139,7 @@ jobs:
153139
if ( "${{ matrix.cling }}" -imatch "On" )
154140
{
155141
cd build
156-
cmake -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" `
142+
cmake -G Ninja -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" `
157143
-DLLVM_EXTERNAL_PROJECTS=cling `
158144
-DLLVM_EXTERNAL_CLING_SOURCE_DIR="$env:CLING_DIR" `
159145
-DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" `
@@ -166,6 +152,9 @@ jobs:
166152
-DLLVM_ENABLE_ZSTD=OFF `
167153
-DLLVM_ENABLE_TERMINFO=OFF `
168154
-DLLVM_ENABLE_LIBXML2=OFF `
155+
-DLLVM_BUILD_LLVM_DYLIB_VIS=On `
156+
-DLLVM_LINK_LLVM_DYLIB=On `
157+
-DCLANG_LINK_CLANG_DYLIB=On `
169158
..\llvm
170159
cmake --build . --config Release --target clang --parallel ${{ env.ncpus }}
171160
cmake --build . --config Release --target cling --parallel ${{ env.ncpus }}
@@ -188,7 +177,7 @@ jobs:
188177
}
189178
cd build
190179
echo "Apply clang${{ matrix.clang-runtime }}-*.patch patches:"
191-
cmake -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" `
180+
cmake -G Ninja -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" `
192181
-DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" `
193182
-DCMAKE_BUILD_TYPE=Release `
194183
-DLLVM_ENABLE_ASSERTIONS=ON `
@@ -199,6 +188,9 @@ jobs:
199188
-DLLVM_ENABLE_ZSTD=OFF `
200189
-DLLVM_ENABLE_TERMINFO=OFF `
201190
-DLLVM_ENABLE_LIBXML2=OFF `
191+
-DLLVM_BUILD_LLVM_DYLIB_VIS=On `
192+
-DLLVM_LINK_LLVM_DYLIB=On `
193+
-DCLANG_LINK_CLANG_DYLIB=On `
202194
..\llvm
203195
cmake --build . --config Release --target clang clang-repl --parallel ${{ env.ncpus }}
204196
}
@@ -238,24 +230,12 @@ jobs:
238230
fail-fast: false
239231
matrix:
240232
include:
241-
- name: win2025-msvc-clang-repl-19
242-
os: windows-2025
243-
compiler: msvc
244-
clang-runtime: '19'
245-
cling: Off
246-
cppyy: Off
247-
- name: win2025-msvc-clang-repl-18
233+
- name: win2025-shared-lib
248234
os: windows-2025
249-
compiler: msvc
235+
compiler: clang
250236
clang-runtime: '18'
251237
cling: Off
252238
cppyy: Off
253-
- name: win2025-msvc-clang-repl-17
254-
os: windows-2025
255-
compiler: msvc
256-
clang-runtime: '17'
257-
cling: Off
258-
cppyy: Off
259239

260240
steps:
261241
- uses: actions/checkout@v4
@@ -309,10 +289,10 @@ jobs:
309289
choco install llvm --version=$ver --no-progress -my
310290
clang --version
311291
#
312-
$env:CC="clang"
313-
$env:CXX="clang++"
314-
echo "CC=clang" >> $env:GITHUB_ENV
315-
echo "CXX=clang++" >> $env:GITHUB_ENV
292+
$env:CC="clang-cl"
293+
$env:CXX="clang-cl"
294+
echo "CC=clang-cl" >> $env:GITHUB_ENV
295+
echo "CXX=clang-cl" >> $env:GITHUB_ENV
316296
}
317297
elseif ( "${{ matrix.compiler }}" -imatch "msvc" )
318298
{
@@ -330,7 +310,7 @@ jobs:
330310
path: |
331311
llvm-project
332312
${{ matrix.cling=='On' && 'cling' || '' }}
333-
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' }}
313+
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' }}-shared-lib
334314

335315
- name: Build and Test/Install CppInterOp on Windows systems
336316
run: |
@@ -382,7 +362,7 @@ jobs:
382362
echo "CPPINTEROP_BUILD_DIR=$env:CPPINTEROP_BUILD_DIR" >> $env:GITHUB_ENV
383363
if ( "${{ matrix.cling }}" -imatch "On" )
384364
{
385-
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
365+
cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
386366
-DUSE_CLING=ON `
387367
-DUSE_REPL=OFF `
388368
-DCling_DIR="$env:LLVM_BUILD_DIR\tools\cling" `
@@ -392,7 +372,7 @@ jobs:
392372
}
393373
else
394374
{
395-
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
375+
cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
396376
-DLLVM_DIR="$env:LLVM_BUILD_DIR\lib\cmake\llvm" `
397377
-DLLVM_ENABLE_WERROR=On `
398378
-DClang_DIR="$env:LLVM_BUILD_DIR\lib\cmake\clang" -DCODE_COVERAGE=${{ env.CODE_COVERAGE }} -DCMAKE_INSTALL_PREFIX="$env:CPPINTEROP_DIR" ..\

unittests/CppInterOp/CUDATest.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,12 @@ TEST(DISABLED_CUDATest, Sanity) {
4646
#else
4747
TEST(CUDATest, Sanity) {
4848
#endif // CLANG_VERSION_MAJOR < 16
49-
#ifdef _WIN32
50-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
51-
#endif
5249
if (!HasCudaSDK())
5350
GTEST_SKIP() << "Skipping CUDA tests as CUDA SDK not found";
5451
EXPECT_TRUE(Cpp::CreateInterpreter({}, {"--cuda"}));
5552
}
5653

5754
TEST(CUDATest, CUDAH) {
58-
#ifdef _WIN32
59-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
60-
#endif
6155
if (!HasCudaSDK())
6256
GTEST_SKIP() << "Skipping CUDA tests as CUDA SDK not found";
6357

@@ -67,9 +61,6 @@ TEST(CUDATest, CUDAH) {
6761
}
6862

6963
TEST(CUDATest, CUDARuntime) {
70-
#ifdef _WIN32
71-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
72-
#endif
7364
if (!HasCudaRuntime())
7465
GTEST_SKIP() << "Skipping CUDA tests as CUDA runtime not found";
7566

unittests/CppInterOp/FunctionReflectionTest.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,6 @@ TEST(FunctionReflectionTest, IsStaticMethod) {
800800
TEST(FunctionReflectionTest, GetFunctionAddress) {
801801
if (llvm::sys::RunningOnValgrind())
802802
GTEST_SKIP() << "XFAIL due to Valgrind report";
803-
#ifdef _WIN32
804-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
805-
#endif
806803
std::vector<Decl*> Decls, SubDecls;
807804
std::string code = "int f1(int i) { return i * i; }";
808805

@@ -1129,9 +1126,6 @@ TEST(FunctionReflectionTest, GetFunctionArgDefault) {
11291126
TEST(FunctionReflectionTest, Construct) {
11301127
if (llvm::sys::RunningOnValgrind())
11311128
GTEST_SKIP() << "XFAIL due to Valgrind report";
1132-
#ifdef _WIN32
1133-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
1134-
#endif
11351129

11361130
Cpp::CreateInterpreter();
11371131

@@ -1170,10 +1164,6 @@ TEST(FunctionReflectionTest, Destruct) {
11701164
if (llvm::sys::RunningOnValgrind())
11711165
GTEST_SKIP() << "XFAIL due to Valgrind report";
11721166

1173-
#ifdef _WIN32
1174-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
1175-
#endif
1176-
11771167
Cpp::CreateInterpreter();
11781168

11791169
Interp->declare(R"(

unittests/CppInterOp/InterpreterTest.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ TEST(InterpreterTest, DebugFlag) {
5757
}
5858

5959
TEST(InterpreterTest, Evaluate) {
60-
#ifdef _WIN32
61-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
62-
#endif
6360
if (llvm::sys::RunningOnValgrind())
6461
GTEST_SKIP() << "XFAIL due to Valgrind report";
6562
// EXPECT_TRUE(Cpp::Evaluate(I, "") == 0);
@@ -76,9 +73,6 @@ TEST(InterpreterTest, Evaluate) {
7673
}
7774

7875
TEST(InterpreterTest, Process) {
79-
#ifdef _WIN32
80-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
81-
#endif
8276
if (llvm::sys::RunningOnValgrind())
8377
GTEST_SKIP() << "XFAIL due to Valgrind report";
8478
Cpp::CreateInterpreter();
@@ -128,9 +122,6 @@ TEST(InterpreterTest, DetectResourceDir) {
128122
#else
129123
TEST(InterpreterTest, DISABLED_DetectResourceDir) {
130124
#endif // LLVM_BINARY_DIR
131-
#ifdef _WIN32
132-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
133-
#endif
134125
Cpp::CreateInterpreter();
135126
EXPECT_STRNE(Cpp::DetectResourceDir().c_str(), Cpp::GetResourceDir());
136127
llvm::SmallString<256> Clang(LLVM_BINARY_DIR);
@@ -140,9 +131,6 @@ TEST(InterpreterTest, DISABLED_DetectResourceDir) {
140131
}
141132

142133
TEST(InterpreterTest, DetectSystemCompilerIncludePaths) {
143-
#ifdef _WIN32
144-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
145-
#endif
146134
std::vector<std::string> includes;
147135
Cpp::DetectSystemCompilerIncludePaths(includes);
148136
EXPECT_FALSE(includes.empty());

unittests/CppInterOp/JitTest.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ static int printf_jit(const char* format, ...) {
1414
TEST(JitTest, InsertOrReplaceJitSymbol) {
1515
if (llvm::sys::RunningOnValgrind())
1616
GTEST_SKIP() << "XFAIL due to Valgrind report";
17-
#ifdef _WIN32
18-
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
19-
#endif
2017
std::vector<Decl*> Decls;
2118
std::string code = R"(
2219
extern "C" int printf(const char*,...);

0 commit comments

Comments
 (0)