-
Notifications
You must be signed in to change notification settings - Fork 10
128 lines (107 loc) · 3.94 KB
/
centos7-system-deps-build.yml
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Centos7 CI (build dependencies)
on:
push:
branches:
- main
- develop
- release/*
- ci/*
jobs:
versions:
runs-on: ubuntu-latest
outputs:
antares-version: ${{steps.antares-version.outputs.result}}
antares-xpansion-version: ${{steps.antares-xpansion-version.outputs.result}}
antares-deps-version: ${{steps.antares-deps-version.outputs.result}}
steps:
- uses: actions/checkout@v3
- name: Read antares-solver version
id: antares-version
uses: ./.github/actions/read-json-value
with:
path: 'antares-version.json'
key: 'antares_version'
- name: Read antares-xpansion version
id: antares-xpansion-version
uses: ./.github/actions/read-json-value
with:
path: 'antares-version.json'
key: 'antares_xpansion_version'
- name: Read antares-deps version
id: antares-deps-version
uses: ./.github/actions/read-json-value
with:
path: 'antares-version.json'
key: 'antares_deps_version'
build:
runs-on: ubuntu-latest
needs: versions
container: 'centos:7'
steps:
- id: branch-name
uses: tj-actions/branch-names@v6
- name: Set up Python
run: |
yum update -y
yum install -y python3 python3-pip
pip3 install --upgrade pip
- name: Install libraries
run: |
yum install -y wget git epel-release redhat-lsb-core gcc gcc-c++ make centos-release-scl scl-utils
yum install -y jsoncpp-devel gtest-devel openmpi-devel doxygen graphviz boost-program-options
yum install -y cmake3 devtoolset-9 environment-modules rpm-build zlib-devel
yum install -y rh-git227-git
yum install -y libuuid-devel
- name: Clone
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b ${{ steps.branch-name.outputs.current_branch }} .
git submodule update --init
- name: Install dependencies
run: |
pip3 install -r requirements-tests.txt
pip3 install -r requirements-ui.txt
- name: Compile Boost
uses: ./.github/workflows/compile-boost
with:
prefix: "../rte-antares-deps-Release/"
- name: Compile tbb
uses: ./.github/workflows/compile-tbb
with:
cmake: 'cmake3'
- name: Configure
run: |
source /opt/rh/devtoolset-9/enable
#git 2.x must be enabled for Coin compilation with CMake ExternalProject_Add
source /opt/rh/rh-git227/enable
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
export PATH=/usr/lib64/openmpi/bin:$PATH
cmake3 -B _build -S . \
-DDEPS_INSTALL_DIR=rte-antares-deps-Release \
-DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON -DALLOW_RUN_AS_ROOT=ON
- name: Build
run: |
source /opt/rh/devtoolset-9/enable
source /opt/rh/rh-git227/enable
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
export PATH=/usr/lib64/openmpi/bin:$PATH
cmake3 --build _build --config Release -j2 --target install
- name: Running unit tests
run: |
source /etc/profile.d/modules.sh
module load mpi
cd _build
ctest3 -C Release --output-on-failure -L "unit|benders|lpnamer|medium"
- name: .tar.gz creation
run: |
cd _build
cpack3 -G TGZ
- name: Installer .rpm creation
run: |
cd _build
cpack3 -G RPM
- id: create-single-file
name: Single file .tar.gz creation
uses: ./.github/workflows/single-file-creation-tgz
with:
antares-xpansion-version: ${{needs.version.outputs.antares-xpansion-version}}