Skip to content

Add almalinux:9 as a test platform #310

Add almalinux:9 as a test platform

Add almalinux:9 as a test platform #310

Workflow file for this run

# Name of the workflow
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main and stable branches
on:
push:
branches: [ main, stable ]
pull_request:
branches: [ main, stable ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Main building and testing
build-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Define the platforms to run on. Later determines the Docker image that'll be used
strategy:
matrix:
platform: [ c8-dev, u20-dev, almalinux:9, ubuntu:24.04 ]
compiler: [ gcc ]
include:
# On Alma 9 and Ubuntu 24 we also test clang
- platform: [ almalinux:9, ubuntu:24.04 ]
compiler: clang
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out our repository under $GITHUB_WORKSPACE, so our job can access it
- uses: actions/checkout@v2
with:
submodules: recursive
# Sets up useful environment variables
- name: Setup environment variables
run: |
if [[ ! $PLATFORM =~ (almalinux|ubuntu) ]]; then
echo "DIMAGE=hepsoftwarefoundation/$PLATFORM" >> $GITHUB_ENV
else
echo "DIMAGE=$PLATFORM" >> $GITHUB_ENV
fi
echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV
echo "COMPILER=$COMPILER" >> $GITHUB_ENV
env:
PLATFORM: ${{ matrix.platform }}
COMPILER: ${{ matrix.compiler }}
# Pulls the associated Docker image
- name: Docker pull
run: docker pull $DIMAGE
# Builds the code and runs the test
- name: Build and test
run: |
echo "Starting run for $PLATFORM, compiler suite $COMPILER"
if [[ $DIMAGE =~ (c8-dev|almalinux|ubuntu) ]]
then
docker run -e PLATFORM -e COMPILER -v $(pwd):/mnt $DIMAGE /mnt/.github/scripts/build-test.sh;
elif [[ $DIMAGE == u20-dev ]];
then
docker run -e PLATFORM -e COMPILER -e CXX=g++-9 -e CC=gcc-9 -v $(pwd):/mnt $DIMAGE /mnt/.github/scripts/build-test.sh;
else
echo "Unkown Docker Image: $DIMAGE";
fi