Skip to content

Changed workflow to include matrix for multiple flavors of linux #171

Changed workflow to include matrix for multiple flavors of linux

Changed workflow to include matrix for multiple flavors of linux #171

Workflow file for this run

name: XDD CI
on:
push:
branches: [ "xdd-2.0" ]
pull_request:
branches: [ "*" ]
jobs:
test:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
img: ["ubuntu:20.04", "ubuntu:22.04", "centos:8" ]
pkg: [ "On", "Off"]
fail-fast: true
container:
image: ${{ matrix.img }}
steps:
- uses: actions/checkout@v3
- name: Ubuntu Prerequisites
if: startsWith(matrix.img, 'ubuntu:')
run: contrib/CI/ubuntu.sh
- name: CentOS 8 Prerequisites
if: matrix.img == 'centos:8'
run: contrib/CI/centos8.sh
- name: Configure
run: cmake -B ${{github.workspace}}/build
- name: Make
run: make -C ${{github.workspace}}/build
- name: Make Package
if: matrix.pkg == 'On'
run: make -C ${{github.workspace}}/build package
- name: Install
if: matrix.pkg == 'Off'
run: make -C ${{github.workspace}}/build install
- name: Install Deb
if: matrix.pkg == 'On' && startsWith(matrix.img, 'ubuntu:')
run: apt install -y ${{github.workspace}}/build/xdd-*.deb
- name: Install RPM
if: matrix.pkg == 'On' && startsWith(matrix.img, 'centos:')
run: yum install -y ${{github.workspace}}/build/xdd-*.rpm
- name: Run Tests
run: |
cd ${{github.workspace}}/build
ctest --output-on-failure