-
Notifications
You must be signed in to change notification settings - Fork 13
121 lines (105 loc) · 3.82 KB
/
qemu.yaml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Exotic architectures
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
build_job:
runs-on: ubuntu-24.04
name: Build on ${{ matrix.target.arch }} / ${{ matrix.config.name }} / date-polyfill ${{ matrix.target.date-polyfill}}
strategy:
matrix:
target:
# - { arch: armv7, date-polyfill: 'ON' }
- { arch: aarch64, date-polyfill: 'ON' }
- { arch: aarch64, date-polyfill: 'OFF'}
- { arch: riscv64, date-polyfill: 'ON' }
- { arch: s390x, date-polyfill: 'ON' }
- { arch: s390x, date-polyfill: 'OFF' }
- { arch: ppc64le, date-polyfill: 'ON' }
- { arch: ppc64le, date-polyfill: 'OFF' }
config:
- { name: Debug }
- { name: Release }
steps:
- name: Install binfmt-support
run: |
sudo apt-get update
sudo apt-get install binfmt-support
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYY-MM-DD_HH-mm-ss-SSS"
- name: Cache builds
uses: actions/cache@v4
with:
key: ${{matrix.target.arch}}_${{matrix.config.name}}_${{matrix.target.date-polyfill}}_ccache-${{ steps.date.outputs.time }}
path: ${{ github.workspace }}/.ccache
restore-keys: |
${{matrix.target.arch}}_${{matrix.config.name}}_${{matrix.target.date-polyfill}}_ccache-
- name: Set up Alpine Linux for ${{ matrix.target.arch }}
uses: jirutka/setup-alpine@v1
id: alpine-target
with:
branch: v3.20
arch: ${{ matrix.target.arch }}
packages: >
ccache
cmake
date-dev
doctest-dev
g++
git
linux-headers
make
musl-dev
samurai
tzdata
shell-name: alpine.sh
- name: Checkout code
uses: actions/checkout@v4
- name: Configuring sparrow
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
run: cmake -G Ninja -Bbuild
-DCMAKE_BUILD_TYPE:STRING=${{matrix.config.name}}
-DUSE_DATE_POLYFILL=${{matrix.target.date-polyfill}}
-DBUILD_TESTS:BOOL=ON
-DBUILD_EXAMPLES:BOOL=ON
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-B build
shell: alpine.sh {0}
- name: Building sparrow library
run: cmake --build build --config ${{matrix.config.name}} --target sparrow
shell: alpine.sh {0}
- name: Building sparrow tests
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
run: cmake --build build --config ${{matrix.config.name}} --target test_sparrow_lib
shell: alpine.sh {0}
- name: Running sparrow examples
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
run: cmake --build build --config ${{matrix.config.name}} --target run_examples
shell: alpine.sh {0}
- name: Running sparrow tests
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
run: cmake --build build --config ${{matrix.config.name}} --target run_tests_with_junit_report
shell: alpine.sh {0}
- name: CCache stat
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
run: ccache --show-stats
shell: alpine.sh {0}
- name: Upload test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test_sparrow_lib_report_Linux_${{matrix.target.arch}}_${{matrix.config.name}}_date-polyfill_${{matrix.target.date-polyfill}}
path: ./**/test*.xml
if-no-files-found: error