Skip to content

Commit

Permalink
Add a key4hep-build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Dec 13, 2023
1 parent 939ee16 commit b4bbea8
Showing 1 changed file with 67 additions and 5 deletions.
72 changes: 67 additions & 5 deletions .github/workflows/key4hep-build.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,75 @@
name: Key4hep build

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

build_commands: &build_commands |
source ${{ matrix.release }}/setup.sh
mkdir build
cd build
cmake .. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=../install -G Ninja
ninja install
ctest -j $(nproc) --output-on-failure

build_strategy: &build_strategy
strategy:
fail-fast: false
matrix:
release: ["sw.hsf.org/key4hep",
"sw-nightlies.hsf.org/key4hep"]

jobs:
test:
job1:
runs-on: ubuntu-latest
container:
image: ghcr.io/key4hep-images/alma9-build:latest

<<: *build_strategy

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up CVMFS
uses: cvmfs-contrib/github-action-cvmfs@v3

- name: Setup environment and build
run: *build_commands

job2:
runs-on: ubuntu-latest
container:
image: ghcr.io/key4hep-images/ubuntu22-build:latest

<<: *build_strategy

steps:
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3
- uses: key4hep/key4hep-actions/key4hep-build-test@main
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up CVMFS
uses: cvmfs-contrib/github-action-cvmfs@v3

- name: Setup environment and build
run: *build_commands


job3:
runs-on: ubuntu-latest
container:
image: ghcr.io/key4hep-images/centos7-build:latest

<<: *build_strategy

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up CVMFS
uses: cvmfs-contrib/github-action-cvmfs@v3

- name: Setup environment and build
run: *build_commands

0 comments on commit b4bbea8

Please sign in to comment.