-
Notifications
You must be signed in to change notification settings - Fork 14
242 lines (218 loc) · 8.81 KB
/
compile-all-vcpkg.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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# CI to compile in all components (Arccon/Arccore/Axlstar/Arcane) together using 'vcpkg'
name: compile-all-vcpkg
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- '**.css'
- '**.dox'
- '**.doxyfile'
- '**.geo'
- '**.goto'
- '**.html'
- '**.jpg'
- '**.js'
- '**.markdown'
- '**.md'
- '**.odg'
- '**.old'
- '**.png'
- '**.py'
- '**.samples'
- '**.svg'
- '**.webp'
- '**.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
job:
name: ${{ matrix.full_name }}-ci-direct
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
full_name: 'ubuntu-20.04'
package_name: 'ubuntu-20.04'
triplet: x64-linux-dynamic
vcpkg_os: ubuntu-20.04
cmake_specific_args : '-DARCCORE_BUILD_MODE=Debug -DCMAKE_BUILD_TYPE=Debug'
ctest_specific_args : '-I 1,140'
- os: ubuntu-22.04
full_name: 'ubuntu-22.04'
package_name: 'ubuntu-22.04'
triplet: x64-linux-dynamic
vcpkg_os: ubuntu-22.04
cmake_specific_args : '-DALIEN_BUILD_COMPONENT=all -DARCCORE_BUILD_MODE=Debug -DCMAKE_BUILD_TYPE=Debug'
ctest_specific_args : '-I 1,140'
- os: ubuntu-22.04
full_name: 'ubuntu-cxx20-22.04'
package_name: 'ubuntu-22.04'
triplet: x64-linux-dynamic
vcpkg_os: ubuntu-22.04
cmake_specific_args : '-DALIEN_BUILD_COMPONENT=all -DARCCORE_BUILD_MODE=Debug -DCMAKE_BUILD_TYPE=Debug -DARCCORE_CXX_STANDARD=20 -DARCANE_ENABLE_DOTNET_PYTHON_WRAPPER=ON'
ctest_specific_args : '-I 1,150'
- os: 'windows-2019'
full_name: 'windows-2019-msmpi'
package_name: 'windows-2019-msmpi'
triplet: x64-windows
vcpkg_os: windows-2019
cmake_specific_args : '-DCMAKE_BUILD_TYPE=Release'
ctest_specific_args : '-I 1,160'
- os: 'windows-2019'
full_name: 'windows-2019-intelmpi'
package_name: 'windows-2019-intelmpi'
triplet: x64-windows
vcpkg_os: windows-2019
cmake_specific_args : '-DCMAKE_BUILD_TYPE=Release'
ctest_specific_args : '-I 1,160'
- os: 'windows-2022'
full_name: 'windows-2022-intelmpi'
package_name: 'windows-2022-intelmpi'
triplet: x64-windows
vcpkg_os: windows-2022
cmake_specific_args : '-DCMAKE_BUILD_TYPE=Release'
ctest_specific_args : '-I 1,10'
- os: 'windows-2022'
full_name: 'windows-2022-cxx20-intelmpi'
package_name: 'windows-2022-intelmpi'
triplet: x64-windows
vcpkg_os: windows-2022
cmake_specific_args : '-DCMAKE_BUILD_TYPE=Release -DARCCORE_CXX_STANDARD=20'
ctest_specific_args : '-I 1,10'
env:
# Indique pour IntelMPI de ne pas faire d'attente active
I_MPI_WAIT_MODE: 1
# Pour indiquer a OpenMPI qu'on utilise plus de PE que de coeurs disponibles
OMPI_MCA_rmaps_base_oversubscribe : true
CCACHE_BASEDIR: ${{github.workspace}}
CCACHE_DIR: '${{ github.workspace }}/ccache'
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
CCACHE_MAXSIZE: 5G
# Indicates the CMake build directory where project files and binaries are being produced.
CMAKE_BUILD_DIR: ${{ github.workspace }}/builddir/
# Indicates the location of the vcpkg as a Git submodule of the project repository.
FRAMEWORKCI_ROOT_PATH: '${{ github.workspace }}/../../build_base'
VCPKG_ROOT: '${{ github.workspace }}/../../build_base/framework-ci/vcpkg'
VCPKG_BUILD_DIR: '${{ github.workspace }}/../../build_base/framework-ci/vcpkg'
BUILD_COMMANDS_ROOT: '${{ github.workspace }}/../../build_base/framework-ci/_build'
VCPKG_INSTALL_HASH_PACKAGE_NAME: '1.6.1-${{ matrix.package_name }}-${{ matrix.triplet }}'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
FRAMEWORKCI_BRANCH: main
steps:
- name: Checkout actions
uses: actions/checkout@v4
with:
submodules: true
- name: Checkout framework-ci
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/framework-ci
path: framework-ci
ref: ${{ env.FRAMEWORKCI_BRANCH }}
submodules: true
- name: Move framework-ci
shell: 'bash'
run: |
mkdir -p '${{ env.FRAMEWORKCI_ROOT_PATH }}'
ls -lart '${{ github.workspace }}/framework-ci'
cd '${{ github.workspace }}' && mv framework-ci '${{ env.FRAMEWORKCI_ROOT_PATH }}'
ls -lart '${{ env.FRAMEWORKCI_ROOT_PATH }}'
- name: Setup environment
shell: 'bash'
run: |
echo "${RUNNER_TEMP}/local_bin_dir/bin" >> $GITHUB_PATH
echo "${RUNNER_TEMP}/local_bin_dir/cmake/bin" >> $GITHUB_PATH
echo Path variable is: ${PATH}
echo CMake path is: `which cmake`
cmake --version
cmake -DNUGET_PASSWORD="${{ secrets.GITHUB_TOKEN }}" -P '${{ env.BUILD_COMMANDS_ROOT }}/Setup.cmake'
mkdir -p ${{ env.CCACHE_DIR }}
cp "${{ github.workspace }}/.github/compile-vcpkg-global.json" "${{ github.workspace }}/global.json"
- name: Setup .Net
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Install pnumpy
shell: 'bash'
run: |
pip3 install numpy
- name: Install pythonnet
shell: 'bash'
run: |
pip3 install pythonnet
pip3 install numpy
- name: Get cache for 'ccache' tool
uses: actions/cache@v4
with:
path: ${{env.CCACHE_DIR}}
key: framework-ccache1-${{matrix.full_name}}-${{ github.run_number }}
restore-keys: |
framework-ccache1-${{matrix.full_name}}
- name: 'Display environment after setup'
shell: 'bash'
continue-on-error: true
run: |
echo 'VCPKG_BUILD_DIR=${VCPKG_BUILD_DIR}'
echo 'Content of local_bin_dir'
ls -lart "${RUNNER_TEMP}/local_bin_dir"
echo 'Content of local_bin_dir/bin'
ls -lart "${RUNNER_TEMP}/local_bin_dir/bin"
echo 'Content of local_bin_dir/cmake'
ls -lart "${RUNNER_TEMP}/local_bin_dir/cmake"
echo Path variable is: ${PATH}
echo CMake path is: `which cmake`
echo Ninja path is: `which ninja`
echo CCache path is: `which ccache`
echo Dotnet path is: `which dotnet`
ccache -z
cmake --version
- name: 'Untar vcpkg bootstrap cache'
shell: 'bash'
run: |
cmake -DHASH_PACKAGE_NAME="${{ env.VCPKG_INSTALL_HASH_PACKAGE_NAME }}" -DVCPKG_BUILD_DIR='${{ env.VCPKG_BUILD_DIR }}' -P '${{ env.BUILD_COMMANDS_ROOT }}/vcpkg_cache/DoUntar.cmake'
ls -lart '${{ env.VCPKG_BUILD_DIR }}'
- name: Show content of workspace after cache has been restored
shell: bash
run: find $RUNNER_WORKSPACE
- uses: ilammy/msvc-dev-cmd@v1
- name: Configure build script
shell: bash
run: |
cmake -S "${{ github.workspace }}/_common/build_all" -B "${{ env.CMAKE_BUILD_DIR }}" -DCMAKE_VERBOSE_MAKEFILE=TRUE -DVCPKG_INSTALLED_DIR="${{ env.VCPKG_BUILD_DIR }}/installed" -DVCPKG_TARGET_TRIPLET='${{ matrix.triplet }}' -DBUILD_SHARED_LIBS=TRUE -DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.cmake_specific_args }} -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" -GNinja
- name: Dump Some Generated files
shell: bash
run: |
echo "Dump CMakeCache.txt"
cat "${{ env.CMAKE_BUILD_DIR }}/CMakeCache.txt"
echo "Dump arcane_core_config.h"
cat "${{ env.CMAKE_BUILD_DIR }}/arcane_core_config.h"
- name: Build arcane
shell: bash
run: |
cmake --build "${{ env.CMAKE_BUILD_DIR }}"
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target copy_dlls
- name: Get 'ccache' status
run: ccache -s -v
- name: Test arcane
shell: bash
run: |
cd "${{ env.CMAKE_BUILD_DIR }}" && ctest --output-on-failure ${{ matrix.ctest_specific_args }}
- name: Test Aleph kappa
if: matrix.os != 'windows-2022'
shell: bash
run: |
cd "${{ env.CMAKE_BUILD_DIR }}" && ctest --output-on-failure ${{ matrix.ctest_specific_args }} -R kappa
- name: Test Python wrapper
shell: bash
run: |
cd "${{ env.CMAKE_BUILD_DIR }}" && ctest --output-on-failure -V -R python_test