add simd.math (#70) #9
This file contains 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: SIMD PR Workflow | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- simd_for_upstream | |
paths: | |
- 'libcxx/test/std/experimental/simd/*' | |
- 'libcxx/include/experimental/__simd/*' | |
- 'libcxx/include/experimental/simd' | |
pull_request: | |
branches: | |
- simd_for_upstream | |
paths: | |
- 'libcxx/test/std/experimental/simd/*' | |
- 'libcxx/include/experimental/__simd/*' | |
- 'libcxx/include/experimental/simd' | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install ninja-build cmake python3 g++ | |
- name: Configure and build LLVM | |
run: | | |
mkdir build | |
cmake -G Ninja -S llvm -B build -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" -DLLVM_RUNTIME_TARGETS="x86_64-unknown-linux-gnu" | |
ninja -C build runtimes | |
- name: Build test dependencies | |
run: | | |
ninja -C build runtimes-test-depends | |
- name: Run SIMD tests and check results | |
run: | | |
output=$(build/bin/llvm-lit --param=std=c++17 -sv --show-unsupported --xunit-xml-output test-results.xml --time-tests build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/std/experimental/simd/) | |
echo "$output" | |
failures=$(cat test-results.xml | grep -oP 'failures="\K\d+') | |
if [ "$failures" -ne 0 ]; then | |
echo "There were $failures test failures" | |
exit 1 | |
fi |