forked from iputils/iputils
-
Notifications
You must be signed in to change notification settings - Fork 0
163 lines (129 loc) · 4.13 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
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2021-2024 Petr Vorel <[email protected]>
name: "CI: docker based builds"
on: [push, pull_request]
jobs:
job:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# 32bit build
- container: "debian:stable"
env:
CC: gcc
VARIANT: i386
BUILD_32: 1
# cross compilation builds
- container: "debian:testing"
env:
ARCH: arm64
CC: aarch64-linux-gnu-gcc
VARIANT: cross-compile
- container: "debian:testing"
env:
ARCH: ppc64el
CC: powerpc64le-linux-gnu-gcc
VARIANT: cross-compile
- container: "debian:testing"
env:
ARCH: s390x
CC: s390x-linux-gnu-gcc
VARIANT: cross-compile
# musl (native)
- container: "alpine:latest"
env:
CC: gcc
EXTRA_BUILD_OPTS: "-DBUILD_HTML_MANS=false -DBUILD_MANS=false"
# some non-default options
- container: "debian:stable"
env:
CC: gcc
EXTRA_BUILD_OPTS: "-DUSE_CAP=false -DUSE_IDN=false -DBUILD_ARPING=false -DBUILD_CLOCKDIFF=false -DUSE_GETTEXT=false"
# other builds
- container: "opensuse/leap"
env:
CC: clang
- container: "ubuntu:bionic"
env:
CC: clang
EXTRA_BUILD_OPTS: "-DUSE_GETTEXT=false"
# meson 0.45.1 is too old
# meson error: not using Unicode-compatible locale (ANSI_X3.4-1968)
SKIP_TESTS: true
# meson: error: unrecognized arguments: -C builddir
SKIP_DISC: true
- container: "ubuntu:jammy"
env:
CC: gcc
- container: "fedora:latest"
env:
CC: clang
- container: "quay.io/centos/centos:stream9"
env:
CC: gcc
- container: "rockylinux:9"
env:
CC: gcc
- container: "rockylinux:8"
env:
CC: gcc
- container: "debian:testing"
env:
CC: gcc
EXTRA_BUILD_OPTS: "-DNO_SETCAP_OR_SUID=false"
- container: "debian:stable"
env:
CC: gcc
- container: "debian:oldstable"
env:
CC: clang
# meson 0.56.2 is too old
# meson dist: error: argument --formats: invalid choice: 'xztar,gztar,zip' (choose from 'gztar', 'xztar', 'zip')
SKIP_DISC: true
container:
image: ${{ matrix.container }}
env: ${{ matrix.env }}
options: --security-opt seccomp=unconfined
steps:
- name: Show OS
run: cat /etc/os-release
- name: Git checkout
uses: actions/checkout@v1
- name: Fix permissions
run: chown -Rv $(id -u):$(id -g) .
- name: Install additional packages
run: |
export INSTALL=${{ matrix.container }}
export DISTRO_VERSION="${INSTALL#*:}"
INSTALL="${INSTALL#quay.io/centos/}"
INSTALL="${INSTALL%%:*}"
INSTALL="${INSTALL%%/*}"
./ci/$INSTALL.sh
if [ "$VARIANT" ]; then ./ci/$INSTALL.$VARIANT.sh; fi
- name: Check dependencies
run: ./build.sh dependencies
- name: Check info
run: ./build.sh info
- name: Configure
run: ./build.sh configure
- name: Compile
run: ./build.sh build
- name: Show build log
if: always()
run: ./build.sh build-log
- name: Check binaries
run: ./build.sh check-binaries
- name: Dist
run: if [ ! "$SKIP_DISC" ]; then ./build.sh dist; else echo "meson dist skipped"; fi
- name: Install
run: ./build.sh install
- name: Show install log
if: always()
run: ./build.sh install-log
- name: Tests
run: if [ ! "$SKIP_TESTS" ]; then ./build.sh test; else echo "tests skipped"; fi
- name: Show test log
if: always()
run: ./build.sh test-log