Introduce simpler DABC CI #128
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
# This is a basic workflow to help you get started with Actions | |
name: Build systems | |
# Controls when the action will run. Triggers the workflow on push | |
on: | |
push: | |
pull_request: | |
branches: | |
- master | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
name: "CC: ${{ matrix.compiler }} CMake ${{ matrix.cmake }}" | |
runs-on: ubuntu-22.04 | |
container: rootproject/root:latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [ Release ] | |
cmake: [ 3.13, latest ] | |
compiler: [ gcc-10, gcc-12, clang-11, clang-14 ] | |
steps: | |
- name: Install sudo package | |
run: apt update && apt install sudo | |
- name: Print env | |
run: | | |
echo github.event.action: ${{ github.event.action }} | |
echo github.event_name: ${{ github.event_name }} | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
- name: Get specific version CMake | |
uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: ${{ matrix.cmake }} | |
- name: Install compiler | |
id: install_cc | |
uses: rlalik/setup-cpp-compiler@master | |
with: | |
compiler: ${{ matrix.compiler }} | |
- name: Use compiler | |
shell: bash | |
env: | |
CC: ${{ steps.install_cc.outputs.cc }} | |
CXX: ${{ steps.install_cc.outputs.cxx }} | |
run: | | |
$CC --version | |
$CXX --version | |
- name: Configure | |
shell: bash | |
run: | | |
. /etc/profile | |
root-config --version | |
root-config --cflags | |
root-config --features | |
cmake --version | |
cmake \ | |
-S . \ | |
-B build \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DCMAKE_INSTALL_PREFIX:PATH=instdir \ | |
-DDABC_DIR=build | |
- name: Build | |
shell: bash | |
run: cmake --build build --config ${{ matrix.build_type }} |