| 1 |
name: CI |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
pull_request: |
| 6 |
schedule: |
| 7 |
- cron: '0 23 * * 5' # Every Friday at 23:00 |
| 8 |
|
| 9 |
jobs: |
| 10 |
build: |
| 11 |
runs-on: ubuntu-latest |
| 12 |
steps: |
| 13 |
|
| 14 |
# Looks like Github Actions leaks fds to child processes |
| 15 |
# https://github.com/actions/runner/issues/1188 |
| 16 |
- run: ls -l /proc/self/fd |
| 17 |
|
| 18 |
# Build and test in Ubuntu VM provided by Github CI |
| 19 |
- uses: actions/checkout@v2 |
| 20 |
with: |
| 21 |
fetch-depth: 0 # Make "git describe" work |
| 22 |
- run: sudo apt-get install -qq pandoc cppcheck |
| 23 |
- run: make |
| 24 |
- run: make test |
| 25 |
- run: git clean -dxff |
| 26 |
|
| 27 |
# And also build in a number of docker containers of older |
| 28 |
# distributions |
| 29 |
- name: Build and test in Debian Bullseye |
| 30 |
uses: addnab/docker-run-action@v3 |
| 31 |
with: |
| 32 |
image: debian:bullseye |
| 33 |
options: -v ${{ github.workspace }}:/work |
| 34 |
run: | |
| 35 |
set -ex |
| 36 |
apt-get -qq update > /dev/null < /dev/null |
| 37 |
apt-get -qq install make gcc golang git ca-certificates > /dev/null < /dev/null |
| 38 |
cd /work |
| 39 |
make |
| 40 |
make test |
| 41 |
- run: git clean -dxff |
| 42 |
|
| 43 |
- name: Build and test in Amazon Linux 2 |
| 44 |
uses: addnab/docker-run-action@v3 |
| 45 |
with: |
| 46 |
image: amazonlinux:2 |
| 47 |
options: -v ${{ github.workspace }}:/work |
| 48 |
run: | |
| 49 |
set -ex |
| 50 |
yum -y -q install make gcc golang git |
| 51 |
cd /work |
| 52 |
git config --global --add safe.directory /work # Fix for: fatal: detected dubious ownership in repository at '/work' |
| 53 |
make |
| 54 |
make test |
| 55 |
- run: git clean -dxff |
| 56 |
|
| 57 |
- name: Build in Oracle Linux 7 (similar to RHEL 7, CentOS 7) |
| 58 |
uses: addnab/docker-run-action@v3 |
| 59 |
with: |
| 60 |
image: oraclelinux:7 |
| 61 |
options: -v ${{ github.workspace }}:/work |
| 62 |
run: | |
| 63 |
set -ex |
| 64 |
yum -y -q install make gcc git |
| 65 |
cd /work |
| 66 |
make |
| 67 |
- run: git clean -dxff |
| 68 |
|
| 69 |
- name: Build in Oracle Linux 8 (similar to RHEL 8, CentOS 8) |
| 70 |
uses: addnab/docker-run-action@v3 |
| 71 |
with: |
| 72 |
image: oraclelinux:8 |
| 73 |
options: -v ${{ github.workspace }}:/work |
| 74 |
run: | |
| 75 |
set -ex |
| 76 |
dnf -y -q install make gcc git |
| 77 |
cd /work |
| 78 |
make |
| 79 |
- run: git clean -dxff |