-
Notifications
You must be signed in to change notification settings - Fork 10
137 lines (118 loc) · 3.95 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
129
130
131
132
133
134
135
136
137
name: Centos7 CI (build dependencies)
on:
push:
branches:
- main
- develop
- release/*
- ci/*
jobs:
docker_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v32
with:
files: |
docker/centos7-system-deps
- name: Docker file push
id: docker_push
if: steps.changed-files.outputs.any_changed == 'true'
uses: elgohr/Publish-Docker-Github-Action@main
with:
name: antaresrte/rte-antares
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: docker
dockerfile: centos7-system-deps
cache: false
tags: centos7-system-deps
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/[email protected]
- 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: [ docker_publish, versions ]
container: 'antaresrte/rte-antares:centos7-system-deps'
steps:
- id: branch-name
uses: tj-actions/branch-names@v6
- uses: actions/[email protected]
with:
submodules: true
- name: Install dependencies
run: |
pip3 install wheel #Does not work in requirements
pip3 install -r requirements-tests.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: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.22.x'
- name: Configure
run: |
source /opt/rh/devtoolset-10/enable
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
export PATH=/usr/lib64/openmpi/bin:$PATH
cmake -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-10/enable
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
export PATH=/usr/lib64/openmpi/bin:$PATH
cmake --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}}