forked from powsybl/powsybl-metrix
-
Notifications
You must be signed in to change notification settings - Fork 1
131 lines (115 loc) · 4.33 KB
/
ci_centos7.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
name: CI-cpp-centos7
on: [push]
defaults:
run:
shell: bash
jobs:
linux:
name: Linux xprs=${{ matrix.xprs }}
runs-on: ubuntu-latest
container: 'centos:centos7'
strategy:
fail-fast: false
matrix:
xprs: [ON, OFF]
steps:
- name: Install Dependencies
run: |
yum update -y
yum install -y epel-release
yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils
yum install -y devtoolset-9
yum install -y python3 python3-pip
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.22.x'
- name: Checkout sources
uses: actions/checkout@v2
- name: Download Boost-release
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'ARnDOSrte/Boost'
file: 'boost_1_73_0.zip'
target: 'boost_1_73_0.zip'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Unzip Boost
run: unzip boost_1_73_0.zip
- name : Install Python Xpress
run: |
pip3 install xpress
echo "Quel est le répertoire courant : "
pwd
echo "On recule d'un répertoire et on regarde le contenu"
cd ..
ls
echo "On recule de deux répertoires et on regarde le contenu"
cd ..
ls
echo "On recule d'un répertoire et on regarde le contenu"
cd ..
ls
echo "on cherche xpress"
find . -type d -name "xpress"
echo "on part dans lib/python3.6/site-packages"
cd lib/python3.6/site-packages
ls
echo "On part dans lib64/python3.6"
cd ../../../
cd lib64/python3.6
ls
echo "On part dans lib64/python3.6/site-packages"
cd site-packages
ls
ls /home/runner/.local/lib/python3.10/site-packages/xpress
ls /home/runner/.local/lib/python3.10/site-packages/xpress/lib
cd /home/runner/.local/lib/python3.10/site-packages/xpress/lib
ln -s libxprs.so* libxprs.so
- name: Setup xpress env
if: ${{ matrix.xprs == 'ON' }}
run: |
echo "XPRESSDIR=/home/runner/.local/lib/python3.10/site-packages/xpress" >> $GITHUB_ENV
echo "XPRESS=/home/runner/.local/lib/python3.10/site-packages/xpress/license/community-xpauth.xpr" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/home/runner/.local/lib/python3.10/site-packages/xpress/lib" >> $GITHUB_ENV
- name: Configure 3rd parties
working-directory: metrix-simulator
run: |
source /opt/rh/devtoolset-9/enable
cmake -S external \
-B build-linux/external \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_XPRESS=${{ matrix.xprs }} \
-DXPRESS_ROOT="${{ env.XPRESSDIR }}"
- name: Build 3rd parties
working-directory: metrix-simulator
run: cmake --build build-linux/external --parallel 2
- name: Configure CMake
working-directory: metrix-simulator
run: |
cmake -S . \
-B build-linux \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=build-linux/install \
-DINSTALL_CMAKE_DIR=. \
-DUSE_ORTOOLS=ON \
-DUSE_XPRESS=${{ matrix.xprs }} \
-DXPRESS_ROOT="${{ env.XPRESSDIR }}"
- name: Build
working-directory: metrix-simulator
run: cmake --build build-linux --target install --parallel 2
- name: Tests
working-directory: metrix-simulator/build-linux
run: ctest -j8 --output-on-failure
- name: Prepare metrix install
id: metrix-install
working-directory: metrix-simulator/build-linux
run: |
[ ${{ matrix.xprs }} == "ON" ] && ARCHIVE_NAME=metrix_xprs || ARCHIVE_NAME=metrix
ARCHIVE_PATH="${{ github.workspace }}/metrix-simulator/build-linux/install"
echo "::set-output name=archive_name::$ARCHIVE_NAME"
echo "::set-output name=archive_path::$ARCHIVE_PATH"
- name: Upload metrix install artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.metrix-install.outputs.archive_name }}
path: ${{ steps.metrix-install.outputs.archive_path }}