-
Notifications
You must be signed in to change notification settings - Fork 23
98 lines (89 loc) · 2.73 KB
/
Copy pathbuild.yaml
File metadata and controls
98 lines (89 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0
name: Build
on:
workflow_call:
inputs:
container_image:
required: true
type: string
ref:
required: true
type: string
env:
CMAKE_BUILD_OPTS: --parallel $(nproc)
CMAKE_EXTRA_OPTS: -DCMAKE_BUILD_TYPE=Release
CCACHE_DIR: ${{ github.workspace }}/.ccache
permissions:
contents: read
packages: write
jobs:
source:
name: "Build Source [${{ matrix.distro }}]"
runs-on: ubuntu-latest
container:
image: ${{ inputs.container_image }}/dev-${{ matrix.image_name }}:${{ inputs.ref }}
options: --user root
strategy:
fail-fast: false
matrix:
include:
- distro: fedora
image_name: fedora
cmake_extra_opts: >-
-DVILLAS_COMPILE_WARNING_AS_ERROR=ON
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- distro: fedora-minimal
image_name: fedora-minimal
cmake_extra_opts: >-
-DVILLAS_COMPILE_WARNING_AS_ERROR=ON
-DWITH_API=OFF
-DWITH_CLIENTS=OFF
-DWITH_CONFIG=OFF
-DWITH_DOC=OFF
-DWITH_FPGA=OFF
-DWITH_GRAPHVIZ=OFF
-DWITH_HOOKS=OFF
-DWITH_LUA=OFF
-DWITH_OPENMP=OFF
-DWITH_PLUGINS=OFF
-DWITH_SRC=OFF
-DWITH_TESTS=OFF
-DWITH_TOOLS=OFF
-DWITH_WEB=OFF
-DCMAKE_MODULE_PATH=/usr/local/lib64/cmake
-DCMAKE_PREFIX_PATH=/usr/local
- distro: debian
image_name: debian
- distro: rocky
image_name: rocky
- distro: rocky9
image_name: rocky9
- distro: ubuntu
image_name: ubuntu
steps:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ inputs.ref }}
allow-unsafe-pr-checkout: true
fetch-depth: 0
submodules: recursive
- name: Setup ccache
if: matrix.distro == 'fedora'
uses: actions/cache@v6
with:
path: ${{ github.workspace }}/.ccache
key: ccache-fedora-${{ inputs.ref }}
restore-keys: ccache-fedora-
- name: Configure
run: cmake -S . -B build ${{ matrix.cmake_extra_opts || env.CMAKE_EXTRA_OPTS }}
- name: Build
run: cmake --build build ${{ env.CMAKE_BUILD_OPTS }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v7
with:
name: build-${{ matrix.distro }}
path: build/
retention-days: 7