forked from dyninst/dyninst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
58 lines (51 loc) · 1.58 KB
/
action.yaml
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
name: Build Fedora single-config
inputs:
extra-cmake-flags:
required: false
compiler:
required: true
compiler-version:
required: false
build-type:
required: false
default: "RELWITHDEBINFO"
install-dir:
required: false
default: "/dyninst/install"
src-dir:
required: false
default: "/dyninst/src"
num-jobs:
required: false
default: 2
extra-libs:
required: false
runs:
using: "composite"
steps:
- name: Install extra libs
if: ${{ inputs.extra-libs != '' }}
shell: bash
run: |
set -ex
yum install -y ${{ inputs.extra-libs }}
- name: Compiler names
id: compiler-name
shell: bash
run: |
set -ex
case "${{ inputs.compiler }}" in
clang) cc=clang; cxx=clang++; ;;
gcc) cc=gcc; cxx=g++; ;;
esac
echo "value={ \"c\" : \"${cc}\", \"cxx\" : \"${cxx}\" }" >> $GITHUB_OUTPUT
- name: Build Dyninst (${{ fromJson(steps.compiler-name.outputs).c }}, ${{ inputs.build-type }} ${{ inputs.extra-cmake-flags }})
shell: bash
run: |
cmake_args="-DCMAKE_C_COMPILER=${{ fromJson(steps.compiler-name.outputs.value).c }} "
cmake_args+="-DCMAKE_CXX_COMPILER=${{ fromJson(steps.compiler-name.outputs.value).cxx }} "
cmake_args+="-DCMAKE_BUILD_TYPE=${{ inputs.build-type }} "
cmake_args+="${{ inputs.extra-cmake-flags }} "
src="${{ inputs.src-dir }}"
dest="${{ inputs.install-dir }}"
bash ${src}/docker/build.sh $src $dest -v -j ${{ inputs.num-jobs }} -c "${cmake_args}"