-
Notifications
You must be signed in to change notification settings - Fork 2
146 lines (141 loc) · 5.05 KB
/
build.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
name: build
on:
push:
schedule:
- cron: '0 0 * * 1'
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
jobs:
build:
name: ${{ join(matrix.config.*, '-') }}
runs-on: ${{ matrix.config.os }}
env:
AARCH64: ${{ matrix.config.cross == 'aarch64' }}
ABI_CHECKS: ${{ contains(matrix.config.checks, 'abi') }}
BUILD_32BIT: ${{ matrix.config.cross == 'i386' }}
BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }}
CC: ccache ${{ matrix.config.compiler }}
DEF_LIB: ${{ matrix.config.library }}
LIBABIGAIL_VERSION: libabigail-1.8
MINI: ${{ matrix.config.mini != '' }}
PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
REF_GIT_TAG: v21.11
RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-20.04
compiler: gcc
library: static
- os: ubuntu-20.04
compiler: gcc
library: shared
mini: mini
- os: ubuntu-20.04
compiler: gcc
library: shared
checks: abi+doc+tests
- os: ubuntu-20.04
compiler: clang
library: static
- os: ubuntu-20.04
compiler: clang
library: shared
checks: doc+tests
- os: ubuntu-20.04
compiler: gcc
library: static
cross: i386
- os: ubuntu-20.04
compiler: gcc
library: static
cross: aarch64
- os: ubuntu-20.04
compiler: gcc
library: shared
cross: aarch64
- os: ubuntu-20.04
compiler: gcc
library: static
cross: ppc64le
- os: ubuntu-20.04
compiler: gcc
library: shared
cross: ppc64le
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Generate cache keys
id: get_ref_keys
run: |
echo 'ccache=ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT
echo 'libabigail=libabigail-${{ env.LIBABIGAIL_VERSION }}-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
- name: Retrieve ccache cache
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
restore-keys: |
${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
- name: Retrieve libabigail cache
id: libabigail-cache
uses: actions/cache@v3
if: env.ABI_CHECKS == 'true'
with:
path: libabigail
key: ${{ steps.get_ref_keys.outputs.libabigail }}
- name: Retrieve ABI reference cache
uses: actions/cache@v3
if: env.ABI_CHECKS == 'true'
with:
path: reference
key: ${{ steps.get_ref_keys.outputs.abi }}
- name: Update APT cache
run: sudo apt update || true
- name: Install packages
run: sudo apt install -y ccache libnuma-dev python3-setuptools
python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev
libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev
libarchive-dev
- name: Install libabigail build dependencies if no cache is available
if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true'
run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev
libdw-dev
- name: Install i386 cross compiling packages
if: env.BUILD_32BIT == 'true'
run: sudo apt install -y gcc-multilib
- name: Install aarch64 cross compiling packages
if: env.AARCH64 == 'true'
run: sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
pkg-config-aarch64-linux-gnu
- name: Install ppc64le cross compiling packages
if: env.PPC64LE == 'true'
run: sudo apt install -y gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
pkg-config-powerpc-linux-gnu
- name: Install test tools packages
if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RUN_TESTS == 'true'
run: sudo apt install -y gdb
- name: Install doc generation packages
if: env.BUILD_DOCS == 'true'
run: sudo apt install -y doxygen graphviz python3-sphinx
python3-sphinx-rtd-theme
- name: Run setup
run: |
.ci/linux-setup.sh
# Workaround on $HOME permissions as EAL checks them for plugin loading
chmod o-w $HOME
- name: Build and test
run: .ci/linux-build.sh
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: meson-logs-${{ join(matrix.config.*, '-') }}
path: |
build/meson-logs/testlog.txt
build/.ninja_log
build/meson-logs/meson-log.txt
build/gdb.log