Changed workflow to include matrix for multiple flavors of linux #159
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: [ "*" ] | |
env: | |
CMAKE_INFINIBAND_FLAG: | |
CMAKE_NUMACTL_FLAG: | |
jobs: | |
test: | |
name: build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
img: ["ubuntu:20.04", "ubuntu:22.04", "centos:8" ] | |
pkg: [ "On", "Off"] | |
infiniband: [ "On", "Off"] | |
numactl: [ "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: Disable Infiniband Flag | |
if: matrix.infiniband == 'Off' | |
run: echo "CMAKE_INFINIBAND_FLAG=-DWITH_VERBS=OFF" >> "$GITHUB_ENV" | |
- name: Disable numactl Flag | |
if: matrix.numactl == 'Off' | |
run: echo "CMAKE_NUMACTL_FLAG=-DWITH_NUMA=OFF" >> "$GITHUB_ENV" | |
- name: Configure | |
run: cmake -B ${{github.workspace}}/build $CMAKE_INFINIBAND_FLAG $CMAKE_NUMACTL_FLAG | |
- 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 |