-
Notifications
You must be signed in to change notification settings - Fork 14
61 lines (55 loc) · 2.02 KB
/
main.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
name: Build and tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- 'ubuntu:20.04'
- 'ubuntu:22.04'
- 'debian:buster'
- 'debian:bullseye'
- 'debian:bookworm'
- 'quay.io/centos/centos:stream8'
- 'oraclelinux:8'
- 'oraclelinux:9'
name: Build on ${{ matrix.image }}
container: ${{ matrix.image }}
steps:
# Dependencies ---------------------------------------------------------------------------
- name: Install dependencies (Ubuntu/Debian)
if: startsWith(matrix.image, 'ubuntu') || startsWith(matrix.image, 'debian')
run: |
apt-get update
apt-get -y install git gcc g++ cmake make libxml2-dev liblz4-dev libzstd-dev
env:
DEBIAN_FRONTEND: noninteractive
- name: Enable EPEL (CentOS)
if: contains(matrix.image, 'centos')
run: |
yum -y install epel-release
- name: Enable EPEL (Oracle Linux 8)
if: contains(matrix.image, 'oraclelinux:8')
run: |
dnf -y install oracle-epel-release-el8
- name: Enable EPEL (Oracle Linux 9)
if: contains(matrix.image, 'oraclelinux:9')
run: |
dnf -y install oracle-epel-release-el9
- name: Install dependencies (CentOS, Oracle Linux)
if: contains(matrix.image, 'centos') || contains(matrix.image, 'oraclelinux')
run: |
yum -y install git gcc gcc-c++ cmake make libxml2-devel lz4-devel libzstd-devel
# Checkout repository --------------------------------------------------------------------
- uses: actions/checkout@v2
# Build ----------------------------------------------------------------------------------
# Note: Unit tests are disabled on CentOS7 due to outdated GCC version
- name: Build the project
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=1
make && make install
- name: Run tests
run: cd build && make test