Changed workflow to include matrix for multiple flavors of linux #154
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] | |
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 install | |
run: make -C ${{github.workspace}}/build install | |
- name: run tests | |
run: | | |
cd ${{github.workspace}}/build | |
ctest --output-on-failure | |
deb: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
img: [ "ubuntu:20.04", "ubuntu:22.04", "centos:8" ] | |
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: build deb | |
run: make -C ${{github.workspace}}/build package | |
- name: install deb | |
if: startsWith(matrix.img, 'ubuntu:') | |
run: apt install -y ${{github.workspace}}/build/xdd-*.deb | |
- name: install rpm | |
if: matrix.img == 'centos:8' | |
run: yum install -y ${{github.workspace}}/build/xdd-*.rpm | |
- name: run tests | |
run: | | |
cd ${{github.workspace}}/build | |
ctest --output-on-failure |