| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
name: "CI: docker based builds" |
| 5 |
on: [push, pull_request] |
| 6 |
|
| 7 |
jobs: |
| 8 |
job: |
| 9 |
runs-on: ubuntu-latest |
| 10 |
|
| 11 |
strategy: |
| 12 |
fail-fast: false |
| 13 |
matrix: |
| 14 |
include: |
| 15 |
|
| 16 |
- container: "debian:stable" |
| 17 |
env: |
| 18 |
CC: gcc |
| 19 |
VARIANT: i386 |
| 20 |
BUILD_32: 1 |
| 21 |
|
| 22 |
|
| 23 |
- container: "debian:testing" |
| 24 |
env: |
| 25 |
ARCH: arm64 |
| 26 |
CC: aarch64-linux-gnu-gcc |
| 27 |
VARIANT: cross-compile |
| 28 |
|
| 29 |
- container: "debian:testing" |
| 30 |
env: |
| 31 |
ARCH: ppc64el |
| 32 |
CC: powerpc64le-linux-gnu-gcc |
| 33 |
VARIANT: cross-compile |
| 34 |
|
| 35 |
- container: "debian:testing" |
| 36 |
env: |
| 37 |
ARCH: s390x |
| 38 |
CC: s390x-linux-gnu-gcc |
| 39 |
VARIANT: cross-compile |
| 40 |
|
| 41 |
|
| 42 |
- container: "alpine:latest" |
| 43 |
env: |
| 44 |
CC: gcc |
| 45 |
EXTRA_BUILD_OPTS: "-DBUILD_HTML_MANS=false -DBUILD_MANS=false" |
| 46 |
|
| 47 |
|
| 48 |
- container: "debian:stable" |
| 49 |
env: |
| 50 |
CC: gcc |
| 51 |
EXTRA_BUILD_OPTS: "-DUSE_CAP=false -DUSE_IDN=false -DBUILD_ARPING=false -DBUILD_CLOCKDIFF=false -DUSE_GETTEXT=false" |
| 52 |
|
| 53 |
|
| 54 |
- container: "opensuse/leap" |
| 55 |
env: |
| 56 |
CC: clang |
| 57 |
|
| 58 |
- container: "ubuntu:bionic" |
| 59 |
env: |
| 60 |
CC: clang |
| 61 |
EXTRA_BUILD_OPTS: "-DUSE_GETTEXT=false" |
| 62 |
|
| 63 |
|
| 64 |
SKIP_TESTS: true |
| 65 |
|
| 66 |
SKIP_DISC: true |
| 67 |
|
| 68 |
- container: "ubuntu:jammy" |
| 69 |
env: |
| 70 |
CC: gcc |
| 71 |
|
| 72 |
- container: "fedora:latest" |
| 73 |
env: |
| 74 |
CC: clang |
| 75 |
|
| 76 |
- container: "quay.io/centos/centos:stream9" |
| 77 |
env: |
| 78 |
CC: gcc |
| 79 |
|
| 80 |
- container: "rockylinux:9" |
| 81 |
env: |
| 82 |
CC: gcc |
| 83 |
|
| 84 |
- container: "rockylinux:8" |
| 85 |
env: |
| 86 |
CC: gcc |
| 87 |
|
| 88 |
- container: "debian:testing" |
| 89 |
env: |
| 90 |
CC: gcc |
| 91 |
EXTRA_BUILD_OPTS: "-DNO_SETCAP_OR_SUID=false" |
| 92 |
|
| 93 |
- container: "debian:stable" |
| 94 |
env: |
| 95 |
CC: gcc |
| 96 |
|
| 97 |
- container: "debian:oldstable" |
| 98 |
env: |
| 99 |
CC: clang |
| 100 |
|
| 101 |
|
| 102 |
SKIP_DISC: true |
| 103 |
|
| 104 |
container: |
| 105 |
image: ${{ matrix.container }} |
| 106 |
env: ${{ matrix.env }} |
| 107 |
options: --security-opt seccomp=unconfined |
| 108 |
|
| 109 |
steps: |
| 110 |
- name: Show OS |
| 111 |
run: cat /etc/os-release |
| 112 |
|
| 113 |
- name: Git checkout |
| 114 |
uses: actions/checkout@v1 |
| 115 |
|
| 116 |
- name: Fix permissions |
| 117 |
run: chown -Rv $(id -u):$(id -g) . |
| 118 |
|
| 119 |
- name: Install additional packages |
| 120 |
run: | |
| 121 |
export INSTALL=${{ matrix.container }} |
| 122 |
export DISTRO_VERSION="${INSTALL#*:}" |
| 123 |
INSTALL="${INSTALL#quay.io/centos/}" |
| 124 |
INSTALL="${INSTALL%%:*}" |
| 125 |
INSTALL="${INSTALL%%/*}" |
| 126 |
./ci/$INSTALL.sh |
| 127 |
if [ "$VARIANT" ]; then ./ci/$INSTALL.$VARIANT.sh; fi |
| 128 |
|
| 129 |
- name: Check dependencies |
| 130 |
run: ./build.sh dependencies |
| 131 |
|
| 132 |
- name: Check info |
| 133 |
run: ./build.sh info |
| 134 |
|
| 135 |
- name: Configure |
| 136 |
run: ./build.sh configure |
| 137 |
|
| 138 |
- name: Compile |
| 139 |
run: ./build.sh build |
| 140 |
|
| 141 |
- name: Show build log |
| 142 |
if: always() |
| 143 |
run: ./build.sh build-log |
| 144 |
|
| 145 |
- name: Check binaries |
| 146 |
run: ./build.sh check-binaries |
| 147 |
|
| 148 |
- name: Dist |
| 149 |
run: if [ ! "$SKIP_DISC" ]; then ./build.sh dist; else echo "meson dist skipped"; fi |
| 150 |
|
| 151 |
- name: Install |
| 152 |
run: ./build.sh install |
| 153 |
|
| 154 |
- name: Show install log |
| 155 |
if: always() |
| 156 |
run: ./build.sh install-log |
| 157 |
|
| 158 |
- name: Tests |
| 159 |
run: if [ ! "$SKIP_TESTS" ]; then ./build.sh test; else echo "tests skipped"; fi |
| 160 |
|
| 161 |
- name: Show test log |
| 162 |
if: always() |
| 163 |
run: ./build.sh test-log |