github: Test building and running the OpenMP tests on Windows

These tests should pass with the latest version from git (but
don't pass with the current pinned 15.0.0 version).
This commit is contained in:
Martin Storsjö committed 2022-11-29 22:40:47 +02:00
1 parent 01597c1d72
commit 6a37ec900b
1 file changed
+66
+66
View File
@@ -276,6 +276,72 @@ jobs:
./run-tests.sh /llvm-mingw
./run-lldb-tests.sh /llvm-mingw
# Run the OpenMP tests with the cross-built i686/x86_64 toolchains from above.
# This also forces testing the bundled python executables.
test-openmp:
# Some tests fail here on the 15.x release branch, but it should pass
# with versions from git main. Therefore, only include this in scheduled
# builds for now.
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
needs: [linux-cross]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- { arch: i686, asmflag: }
- { arch: x86_64, asmflag: -m64 }
steps:
- uses: actions/download-artifact@v3
with:
name: windows-${{matrix.arch}}-toolchain
- name: Unpack toolchain
run: |
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
echo "c:\llvm-mingw\python\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
echo "PYTHON_EXE=c:/llvm-mingw/python/bin/python3.exe" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Fetch version
if: github.event_name == 'schedule'
run: |
cat c:\llvm-mingw\versions | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- uses: actions/checkout@v3
- name: Checkout llvm-project
run: |
bash -c "CHECKOUT_ONLY=1 ./build-llvm.sh"
- name: Build test executables
run: |
cd llvm-project
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 "TOOLS=$PWD\bin" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Build and test OpenMP
run: |
cd llvm-project
mkdir build-openmp
cd build-openmp
cmake ../openmp `
-G Ninja `
-DCMAKE_BUILD_TYPE=Release `
-DPython3_EXECUTABLE="$Env:PYTHON_EXE" `
-DPYTHON_EXECUTABLE="$Env:PYTHON_EXE" `
-DOPENMP_LLVM_TOOLS_DIR="$Env:TOOLS" `
-DCMAKE_C_COMPILER=clang `
-DCMAKE_CXX_COMPILER=clang++ `
-DCMAKE_ASM_MASM_COMPILER=llvm-ml `
-DLIBOMP_ASMFLAGS=${{matrix.asmflag}}
ninja
ninja check-openmp
# Test cross-building ffmpeg for all 4 targeted architectures from linux.
# This is done only on scheduled builds, with a toolchain with assertions
# enabled, to catch code generation bugs that might trigger asserts, to