As the branch field has a default value "master", this default not only applies when the dialog box for starting the manual workflow is presented. But even if the prefilled branch field is cleared, the default value also gets substituted when submitting. In this case, when the commit and branch fields are mutually exclusive, we can't easily have a default. Instead change the uses of the fields, ignoring the branch field if the commit field is filled. If the dawidd6/action-download-artifact action would support specifying either a commit or a branch in the same field, like actions/checkout does, we wouldn't need this distinction at all; this request is tracked upstream at https://github.com/dawidd6/action-download-artifact/issues/242.
106 lines
3.7 KiB
YAML
106 lines
3.7 KiB
YAML
name: Run libcxx/libcxxabi/libunwind tests
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
commit:
|
|
description: 'Commit to extract from'
|
|
type: string
|
|
branch:
|
|
description: 'Branch to extract from'
|
|
type: string
|
|
default: 'master'
|
|
pipeline_type:
|
|
description: 'Pipeline type'
|
|
required: true
|
|
default: 'push'
|
|
type: choice
|
|
options:
|
|
- push
|
|
- schedule
|
|
|
|
jobs:
|
|
prepare:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
LLVM_VERSION: ${{steps.get-parameters.outputs.LLVM_VERSION}}
|
|
steps:
|
|
- name: Download build parameters
|
|
uses: dawidd6/action-download-artifact@v6
|
|
with:
|
|
workflow: build.yml
|
|
workflow_conclusion: success
|
|
commit: ${{inputs.commit}}
|
|
branch: ${{inputs.commit == '' && inputs.branch || ''}}
|
|
event: ${{inputs.pipeline_type}}
|
|
name: parameters
|
|
- name: Get build parameters
|
|
id: get-parameters
|
|
run: |
|
|
cat parameters.txt >> $GITHUB_OUTPUT
|
|
cat $GITHUB_OUTPUT
|
|
|
|
test-libcxx:
|
|
needs: [prepare]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { arch: x86_64, target_arch: i686 }
|
|
- { arch: x86_64, target_arch: x86_64 }
|
|
- { arch: aarch64, target_arch: armv7 }
|
|
- { arch: aarch64, target_arch: aarch64 }
|
|
runs-on: ${{startsWith(matrix.arch, 'a') && 'windows-11-arm' || 'windows-latest'}}
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
choco install ninja
|
|
- name: Download toolchain
|
|
uses: dawidd6/action-download-artifact@v6
|
|
with:
|
|
workflow: build.yml
|
|
workflow_conclusion: success
|
|
commit: ${{inputs.commit}}
|
|
branch: ${{inputs.commit == '' && inputs.branch || ''}}
|
|
event: ${{inputs.pipeline_type}}
|
|
name: windows-ucrt-${{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
|
|
- uses: actions/checkout@v4
|
|
- name: Checkout llvm-project
|
|
env:
|
|
LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}}
|
|
run: |
|
|
bash -c "CHECKOUT_ONLY=1 ./build-llvm.sh"
|
|
- name: Build and test libcxx
|
|
run: |
|
|
cd llvm-project
|
|
mkdir build
|
|
cd build
|
|
cmake ../runtimes `
|
|
-G Ninja `
|
|
-DCMAKE_BUILD_TYPE=Release `
|
|
-DPython3_EXECUTABLE="$Env:PYTHON_EXE" `
|
|
-DLIBCXX_ENABLE_WERROR=YES `
|
|
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" `
|
|
-DLIBCXX_CXX_ABI=libcxxabi `
|
|
-DCMAKE_C_COMPILER=${{matrix.target_arch}}-w64-mingw32-clang `
|
|
-DCMAKE_CXX_COMPILER=${{matrix.target_arch}}-w64-mingw32-clang++ `
|
|
-DCMAKE_CXX_COMPILER_TARGET=${{matrix.target_arch}}-w64-windows-gnu `
|
|
-DLIBCXXABI_ENABLE_SHARED=NO `
|
|
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=YES `
|
|
-DLIBCXX_USE_COMPILER_RT=YES `
|
|
-DLIBCXXABI_USE_COMPILER_RT=YES `
|
|
-DLIBUNWIND_USE_COMPILER_RT=YES `
|
|
-DLIBCXXABI_USE_LLVM_UNWINDER=YES `
|
|
-DLIBCXX_EXTRA_SITE_DEFINES="__USE_MINGW_ANSI_STDIO=${{startsWith(matrix.arch, 'a') && '0' || '1'}}" `
|
|
-DCMAKE_INSTALL_MESSAGE=NEVER `
|
|
-DLLVM_LIT_ARGS="-v --time-tests"
|
|
ninja
|
|
ninja check-runtimes
|