-
Notifications
You must be signed in to change notification settings - Fork 4
195 lines (167 loc) · 7.5 KB
/
ci.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: CI
on: [push]
defaults:
run:
shell: bash
env:
DYNAWO_VERSION: 1.6.0
jobs:
build-linux:
runs-on: ubuntu-latest
container: dynawo/dynawo-ci:latest
env:
DYNAFLOW_LAUNCHER_BUILD_TYPE: Debug
DYNAFLOW_LAUNCHER_PROCESSORS_USED: 2
DYNAFLOW_LAUNCHER_FORCE_CXX11_ABI: "true"
DYNAFLOW_LAUNCHER_LOCALE: "en_GB"
DYNAFLOW_LAUNCHER_USE_DOXYGEN: "OFF"
DYNAFLOW_LAUNCHER_BUILD_TESTS: "OFF"
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Fetch Dynawo and Dynawo algorithms
run: |
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo/releases/download/nightly/Dynawo_headers_v$DYNAWO_VERSION.zip
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo-algorithms/releases/download/nightly/DynawoAlgorithms_headers_v$DYNAWO_VERSION.zip
- name: Unzip Dynawo and Dynawo algorithms
run: |
unzip -qq "Dynawo_headers_v${DYNAWO_VERSION}.zip"
unzip -qq "DynawoAlgorithms_headers_v${DYNAWO_VERSION}.zip"
- name: Dynawo and Dynawo algorithms versions
run: |
./dynawo/dynawo.sh version
./dynawo-algorithms/dynawo-algorithms.sh --version
- name: Build
run: |
source /etc/profile.d/00-modulepath.sh
source /etc/profile.d/modules.sh
source /usr/share/lmod/lmod/init/bash
module load mpi/mpich-x86_64
export DYNAWO_HOME=$(pwd)/dynawo
export DYNAWO_ALGORITHMS_HOME=$(pwd)/dynawo-algorithms
export DYNAFLOW_LAUNCHER_HOME=$(pwd)
scripts/envDFL.sh build-user
coverage:
runs-on: ubuntu-latest
container: dynawo/dynawo-ci:latest
env:
DYNAFLOW_LAUNCHER_BUILD_TYPE: Debug
DYNAFLOW_LAUNCHER_PROCESSORS_USED: 2
DYNAFLOW_LAUNCHER_FORCE_CXX11_ABI: "true"
DYNAFLOW_LAUNCHER_LOCALE: "en_GB"
DYNAFLOW_LAUNCHER_USE_DOXYGEN: "OFF"
DYNAFLOW_LAUNCHER_BUILD_TESTS: "ON"
DYNAFLOW_LAUNCHER_BROWSER_SHOW: "false"
steps:
- name: Install Sonar wrapper
working-directory: ${{ runner.workspace }}
env:
CONTAINER_WORKSPACE: ${{ runner.workspace }}
run: |
wget https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
unzip build-wrapper-linux-x86.zip
- name: Install Sonar scanner
working-directory: ${{ runner.workspace }}
env:
SONAR_SCANNER_VERSION: 4.6.0.2311
run: |
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip
unzip sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip
ln -s sonar-scanner-${SONAR_SCANNER_VERSION} sonar
rm sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip
dnf install -y java-11-openjdk
- name: Checkout sources
uses: actions/checkout@v3
- name: Fetch Dynawo and Dynawo algorithms
run: |
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo/releases/download/nightly/Dynawo_headers_v$DYNAWO_VERSION.zip
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo-algorithms/releases/download/nightly/DynawoAlgorithms_headers_v$DYNAWO_VERSION.zip
- name: Unzip Dynawo and Dynawo algorithms
run: |
unzip -qq "Dynawo_headers_v${DYNAWO_VERSION}.zip"
unzip -qq "DynawoAlgorithms_headers_v${DYNAWO_VERSION}.zip"
- name: Build
env:
CONTAINER_WORKSPACE: ${{ runner.workspace }}
run: |
source /etc/profile.d/00-modulepath.sh
source /etc/profile.d/modules.sh
source /usr/share/lmod/lmod/init/bash
module load mpi/mpich-x86_64
export DYNAWO_HOME=$(pwd)/dynawo
export DYNAWO_ALGORITHMS_HOME=$(pwd)/dynawo-algorithms
export DYNAFLOW_LAUNCHER_HOME=$(pwd)
$CONTAINER_WORKSPACE/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output scripts/envDFL.sh build-tests-coverage
- name: Sonarcloud
working-directory: ${{ runner.workspace }}/dynaflow-launcher
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
CONTAINER_WORKSPACE: ${{ runner.workspace }}
run: $CONTAINER_WORKSPACE/sonar/bin/sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.cfamily.threads=2
build-windows:
runs-on: windows-2019
steps:
- name: No LF to CRLF conversion
shell: cmd
run: git config --global core.autocrlf input
- name: Checkout sources
uses: actions/checkout@v3
- name: Download MS-MPI
shell: bash
run: |
curl -Os https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisdk.msi
curl -Os https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe
- name: Install MS-MPI
shell: cmd
run: |
msmpisdk.msi /passive
msmpisetup.exe /unattend
- name: Fetch Dynawo
shell: bash
run: curl -LOs https://github.com/${{ github.repository_owner }}/dynawo/releases/download/nightly/Dynawo_Windows_v$DYNAWO_VERSION.zip
- name: Unzip Dynawo
shell: cmd
run: 7z x Dynawo_Windows_v%DYNAWO_VERSION%.zip -o..\deploy
- name: Dynawo version
shell: cmd
run: ..\deploy\dynawo\dynawo version
- name: Fetch Dynawo-Algorithms
shell: bash
run: curl -LOs https://github.com/${{ github.repository_owner }}/dynawo-algorithms/releases/download/nightly/DynawoAlgorithms_Windows_v$DYNAWO_VERSION.zip
- name: Unzip Dynawo-Algorithms
shell: cmd
run: 7z x DynawoAlgorithms_Windows_v%DYNAWO_VERSION%.zip -o..\deploy
- name: Dynawo-Algorithms version
shell: cmd
run: ..\deploy\dynawo-algorithms\dynawo-algorithms version
# use a minimal PATH to avoid too long command lines and conflict with Strawberry pkg-config !
- name: Build and install
shell: cmd
env:
MSMPI_INC: C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
MSMPI_LIB32: C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\
MSMPI_LIB64: C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\
MSMPI_BIN: C:\Program Files\Microsoft MPI\Bin\
PATH: C:\Windows\system32;C:\Program Files\Git\cmd;C:\hostedtoolcache\windows\Python\3.7.9\x64
run: |
set PATH=%MSMPI_BIN%;%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call scripts\dynaflow-launcher verbose build
- name: Dynaflow-Launcher version
shell: cmd
env:
PATH: C:\Windows\system32;C:\Program Files\Git\cmd;C:\hostedtoolcache\windows\Python\3.7.9\x64
run: call ..\dfl-i\dynaflow-launcher verbose version
- name: Build and run unit tests
shell: cmd
env:
MSMPI_INC: C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
MSMPI_LIB32: C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\
MSMPI_LIB64: C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\
MSMPI_BIN: C:\Program Files\Microsoft MPI\Bin\
PATH: C:\Windows\system32;C:\Program Files\Git\cmd;C:\hostedtoolcache\windows\Python\3.7.9\x64
run: |
set PATH=%MSMPI_BIN%;%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call scripts\dynaflow-launcher verbose tests "^^[^^M]"