-
-
Notifications
You must be signed in to change notification settings - Fork 45
79 lines (70 loc) · 2.69 KB
/
unittests_linux.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Unit tests Linux
on:
push:
branches:
- develop
- master
pull_request:
schedule:
- cron: '0 0 1 * *'
jobs:
Linux:
name: Ubuntu 20.04
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
compiler: [clang++, g++, libc++, arm-linux-gnueabihf-g++]
configuration: [error_code, status_code]
env:
NAME: Linux-${{ matrix.configuration }}-${{ matrix.compiler }}
CXX: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v4
- name: CMake tests Linux
shell: bash
run: |
sudo apt-get update
if [ "${{ matrix.compiler }}" = "libc++" ]; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -;
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main";
sudo apt update;
sudo apt install clang-11 libc++-11-dev libc++abi-11-dev libomp-11-dev;
export CMAKE_CONFIGURE_OPTIONS="-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-linux-libc++.cmake";
fi
if [ "${{ matrix.configuration }}" = "status_code" ]; then
export CMAKE_CONFIGURE_OPTIONS="$CMAKE_CONFIGURE_OPTIONS;-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON";
fi
if [ "${{ matrix.compiler }}" = "arm-linux-gnueabihf-g++" ]; then
sudo apt install g++-arm-linux-gnueabihf;
ctest -S .ci.cmake -VV --timeout 900 -DCTEST_DISABLE_TESTING=1 "-DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS;-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-linux-arm.cmake;-DLLFIO_FORCE_OPENSSL_OFF=On";
else
ctest -S .ci.cmake -VV --timeout 900 "-DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS";
fi
- name: Upload Prebuilt Binaries
uses: actions/upload-artifact@v4
with:
name: Linux ${{ matrix.configuration }} ${{ matrix.compiler }} prebuilt binaries
path: llfio-v2.0-binaries-linux-*.tgz
- name: Upload Test Results
if: ${{ matrix.compiler != 'arm-linux-gnueabihf-g++' }}
uses: actions/upload-artifact@v4
with:
name: Linux ${{ matrix.configuration }} ${{ matrix.compiler }} test results
path: prebuilt/merged_junit_results.xml
publish-test-results:
name: "Publish Unit Tests Results"
needs: [Linux]
runs-on: ubuntu-latest
if: success() || failure()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Unit Test Results
github_token: ${{ secrets.GITHUB_TOKEN }}
files: '**/merged_junit_results.xml'