|
| 1 | +name: Run compiler-rt tests |
| 2 | +on: |
| 3 | + push: |
| 4 | + |
| 5 | +jobs: |
| 6 | + llvm-mingw: |
| 7 | + runs-on: windows-latest |
| 8 | + strategy: |
| 9 | + fail-fast: false |
| 10 | + matrix: |
| 11 | + arch: |
| 12 | + - x86_64 |
| 13 | + - i686 |
| 14 | + steps: |
| 15 | + - name: Install dependencies |
| 16 | + run: | |
| 17 | + choco install -y ninja |
| 18 | + - name: Install llvm-mingw |
| 19 | + run: | |
| 20 | + curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/nightly/llvm-mingw-nightly-ucrt-${{matrix.arch}}.zip |
| 21 | + powershell Expand-Archive llvm-mingw*.zip -DestinationPath . |
| 22 | + del llvm-mingw*.zip |
| 23 | + mv llvm-mingw* c:\llvm-mingw |
| 24 | + echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append |
| 25 | + - name: Configure Git core.autocrlf |
| 26 | + run: | |
| 27 | + git config --global core.autocrlf false |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + - name: Build test executables |
| 30 | + run: | |
| 31 | + mkdir build-tools |
| 32 | + cd build-tools |
| 33 | + cmake ../llvm ` |
| 34 | + -G Ninja ` |
| 35 | + -DCMAKE_BUILD_TYPE=Release ` |
| 36 | + -DLLVM_TARGETS_TO_BUILD=X86 ` |
| 37 | + -DCMAKE_C_COMPILER=clang ` |
| 38 | + -DCMAKE_CXX_COMPILER=clang++ |
| 39 | + ninja not FileCheck llvm-config KillTheDoctor count split-file |
| 40 | + echo "LLVM_CONFIG=$PWD\bin\llvm-config.exe" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append |
| 41 | + echo "CMAKE_DIR=$PWD\lib\cmake\llvm" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append |
| 42 | + - name: Build and test compiler-rt |
| 43 | + # Skipping libfuzzer; all tests fail since the clang mingw driver |
| 44 | + # doesn't support -fsanitize=fuzzer. |
| 45 | + # Skipping ORC; the tests rely on llvm-jitlink being available, |
| 46 | + # which requires building a large part of LLVM among the test |
| 47 | + # tools above, and jitlink requires an MSVC toolchain to be available. |
| 48 | + run: | |
| 49 | + mkdir build-compiler-rt |
| 50 | + cd build-compiler-rt |
| 51 | + cmake ../compiler-rt ` |
| 52 | + -G Ninja ` |
| 53 | + -DCMAKE_BUILD_TYPE=Release ` |
| 54 | + -DCMAKE_C_COMPILER=clang ` |
| 55 | + -DCMAKE_CXX_COMPILER=clang++ ` |
| 56 | + -DCMAKE_C_COMPILER_TARGET=${{matrix.arch}}-w64-windows-gnu ` |
| 57 | + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=TRUE ` |
| 58 | + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=TRUE ` |
| 59 | + -DLLVM_CONFIG_PATH="$Env:LLVM_CONFIG" ` |
| 60 | + -DLLVM_CMAKE_DIR="$Env:CMAKE_DIR" ` |
| 61 | + -DSANITIZER_CXX_ABI=libc++ ` |
| 62 | + -DCOMPILER_RT_INCLUDE_TESTS=ON ` |
| 63 | + -DCOMPILER_RT_BUILD_LIBFUZZER=OFF ` |
| 64 | + -DCOMPILER_RT_BUILD_ORC=OFF ` |
| 65 | + -DLLVM_LIT_ARGS="-v --time-tests" |
| 66 | + ninja |
| 67 | + ninja check-compiler-rt |
0 commit comments