-
Notifications
You must be signed in to change notification settings - Fork 40
53 lines (46 loc) · 1.68 KB
/
simd_pr_workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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