-
Notifications
You must be signed in to change notification settings - Fork 266
180 lines (175 loc) · 5.83 KB
/
ci.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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: CI
on:
push:
branches-ignore:
- 'ci/**'
- '!ci/gha**'
pull_request:
branches:
- 'master'
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
clang-qemu:
strategy:
fail-fast: false
matrix:
include:
- version: 17
cross: armv7
arch_deb: armhf
arch_gnu_abi: eabihf
arch_gnu: arm
distro: ubuntu-22.04
- version: 17
cross: aarch64
arch_gnu: aarch64
arch_deb: arm64
distro: ubuntu-22.04
- version: 17
cross: armel
arch_gnu_abi: eabi
arch_deb: armel
arch_gnu: arm
distro: ubuntu-22.04
- version: 17
cross: riscv64
arch_gnu: riscv64
arch_deb: riscv64
distro: ubuntu-22.04
- version: 17
cross: s390x
arch_gnu: s390x
arch_deb: s390x
distro: ubuntu-22.04
- version: 17
cross: ppc64el
arch_deb: ppc64el
arch_gnu: powerpc64le
distro: ubuntu-22.04
# - version: 16
# cross: mips64el # needs newer Ubuntu (23.04+)
# arch_deb: mips64el
# arch_gnu: mips64el
# arch_gnu_abi: abi64
# distro: ubuntu-22.04
runs-on: ${{ matrix.distro }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- run: sudo apt-get update
- name: CPU Information
run: cat /proc/cpuinfo
- name: Install APT Dependencies
run: |
sudo add-apt-repository ppa:savoury1/virtualisation
sudo add-apt-repository ppa:savoury1/display
sudo apt-get update -y
sudo apt-get -yq install ninja-build parallel \
binfmt-support clang-${{ matrix.version }} clang++-${{ matrix.version }} \
qemu-user-static python3-pip libc6-${{ matrix.arch_deb }}-cross libstdc++-12-dev-${{ matrix.arch_deb }}-cross \
binutils-${{ matrix.arch_gnu }}-linux-gnu${{ matrix.arch_gnu_abi }}
sudo python3 -m pip install meson==0.55.0
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.distro }}-${{ matrix.cross }}
- name: add ccache to the build path
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
- name: Configure
run: |
meson setup --cross-file=docker/cross-files/${{ matrix.cross }}-clang-${{ matrix.version }}-ccache.cross build \
|| (cat build/meson-logs/meson-log.txt ; false)
- name: Build
run: ninja -C build -v
- name: Test
run: meson test -C build --print-errorlogs --print-errorlogs $(meson test -C build --list | grep -v emul)
clang:
strategy:
fail-fast: false
matrix:
include:
- version: "7"
distro: ubuntu-20.04
arch_flags: -march=native
# clang-8 is tested on Semaphore-CI https://nemequ.semaphoreci.com/projects/simde
- version: "9"
distro: ubuntu-20.04
arch_flags: -march=native
# clang-10 is tested on Semaphore-CI https://nemequ.semaphoreci.com/projects/simde
- version: "11"
distro: ubuntu-22.04
arch_flags: -march=native
- version: "12"
distro: ubuntu-20.04
arch_flags: -march=native
- version: "12"
distro: ubuntu-20.04
arch_flags: -ffast-math
ccache: 'true'
- version: "13"
distro: ubuntu-22.04
arch_flags: -march=native
- version: "13"
distro: ubuntu-22.04
arch_flags: -ffast-math
ccache: 'true'
- version: "14"
distro: ubuntu-22.04
arch_flags: -march=native
- version: "14"
distro: ubuntu-22.04
arch_flags: -ffast-math
ccache: 'true'
- version: "15"
distro: ubuntu-22.04
arch_flags: -march=native
- version: "15"
distro: ubuntu-22.04
arch_flags: -ffast-math
ccache: 'true'
- version: "17"
distro: ubuntu-22.04
arch_flags: -march=native -Wno-unsafe-buffer-usage
- version: "17"
distro: ubuntu-22.04
arch_flags: -ffast-math -Wno-unsafe-buffer-usage
ccache: 'true'
runs-on: ${{ matrix.distro }}
env:
CFLAGS: ${{ matrix.arch_flags }} -Wall -Weverything -Werror -fno-lax-vector-conversions
CXXFLAGS: ${{ matrix.arch_flags }} -Wall -Weverything -Werror -fno-lax-vector-conversions
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: CPU Information
run: cat /proc/cpuinfo
- name: Install APT Dependencies
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:savoury1/display
sudo apt-get update
sudo apt-get -yq install gcovr ninja-build python3-pip clang-${{ matrix.version }}
sudo python3 -m pip install meson==0.55.0
sudo rm /usr/bin/gcc /usr/bin/g++ /usr/bin/cc /usr/bin/c++
sudo ln -s $(command -v clang-${{ matrix.version }}) /usr/bin/cc
sudo ln -s $(command -v clang-${{ matrix.version }}) /usr/bin/c++
- name: ccache
uses: hendrikmuhs/[email protected]
if: ${{ matrix.ccache == 'true' }}
with:
key: ${{ github.job }}-${{ matrix.version }}-${{ matrix.distro }}-${{ matrix.arch_flags }}
- name: add ccache to the build path
if: ${{ matrix.ccache == 'true' }}
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
- name: Configure
run: meson setup build
- name: Build
run: meson compile -C build --verbose
- name: Test
run: meson test -C build --print-errorlogs $(meson test -C build --list | grep -v emul)