WIP: Only build openmp and its tests, use a recent llvm-mingw nightly #79
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: Build and Test OpenMP | |
| on: | |
| push: | |
| paths: | |
| ## - 'clang/lib/AST/*OpenMP*' | |
| # - 'clang/lib/Sema/*OpenMP*' | |
| # - 'clang/lib/CodeGen/*OpenMP*' | |
| # - 'openmp/**' | |
| # - '.github/workflows/openmp-build-and-test.yaml' | |
| # pull_request: | |
| # paths: | |
| # - 'clang/lib/AST/*OpenMP*' | |
| # - 'clang/lib/Sema/*OpenMP*' | |
| # - 'clang/lib/CodeGen/*OpenMP*' | |
| # - 'openmp/**' | |
| # - '.github/workflows/openmp-build-and-test.yaml' | |
| permissions: | |
| contents: read # Default everything to read-only | |
| jobs: | |
| llvm-mingw: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { arch: i686, asmflag: } | |
| - { arch: x86_64, asmflag: -m64 } | |
| - { arch: aarch64 } | |
| runs-on: ${{startsWith(matrix.arch, 'a') && 'windows-11-arm' || 'windows-latest'}} | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| choco install -y ninja | |
| - uses: actions/checkout@v4 | |
| - name: Install llvm-mingw | |
| run: | | |
| curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/nightly/llvm-mingw-nightly-ucrt-${{matrix.arch}}.zip | |
| powershell Expand-Archive llvm-mingw*.zip -DestinationPath . | |
| del llvm-mingw*.zip | |
| mv llvm-mingw* c:\llvm-mingw | |
| echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Build test executables | |
| run: | | |
| mkdir build-tools | |
| cd build-tools | |
| cmake ../llvm ` | |
| -G Ninja ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| -DLLVM_TARGETS_TO_BUILD=X86 ` | |
| -DCMAKE_C_COMPILER=clang ` | |
| -DCMAKE_CXX_COMPILER=clang++ | |
| ninja not FileCheck | |
| echo "LLVM_TOOLS=$PWD\bin" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Build and test OpenMP | |
| run: | | |
| cd openmp | |
| mkdir build | |
| cd build | |
| cmake .. ` | |
| -G Ninja ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| -DOPENMP_LLVM_TOOLS_DIR="$Env:LLVM_TOOLS" ` | |
| -DCMAKE_C_COMPILER=clang ` | |
| -DCMAKE_CXX_COMPILER=clang++ ` | |
| -DCMAKE_ASM_MASM_COMPILER=llvm-ml ` | |
| -DLLVM_LIT_ARGS="-v --time-tests --show-unsupported" ` | |
| -DLIBOMP_ASMFLAGS=${{matrix.asmflag}} | |
| ninja | |
| ninja check-openmp |