-
Notifications
You must be signed in to change notification settings - Fork 5
247 lines (247 loc) · 14.7 KB
/
github-actions.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
242
243
244
245
246
247
name: github-actions
on: [push, pull_request]
jobs:
windows-2019:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Boost install
run: |
(New-Object System.Net.WebClient).DownloadFile("https://sourceforge.net/projects/boost/files/boost-binaries/1.86.0//boost_1_86_0-msvc-14.2-64.exe", "${{ runner.temp }}\boost.exe")
Start-Process -Wait -FilePath "${{ runner.temp }}\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=${{ runner.temp }}\boost-install"
- name: AVRO install
run: |
(New-Object System.Net.WebClient).DownloadFile("https://archive.apache.org/dist/avro/avro-1.11.3/cpp/avro-cpp-1.11.3.tar.gz", "${{ runner.temp }}\avro-cpp-1.11.3.tar.gz")
7z x ${{ runner.temp }}\avro-cpp-1.11.3.tar.gz -o${{ runner.temp }}
7z x ${{ runner.temp }}\avro-cpp-1.11.3.tar -o${{ runner.temp }}
((Get-Content -path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt -Raw) -replace 'install \(TARGETS avrocpp avrocpp_s','install (TARGETS avrocpp_s') | Set-Content -Path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt
((Get-Content -path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt -Raw) -replace 'install \(TARGETS avrogencpp RUNTIME DESTINATION bin\)','') | Set-Content -Path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt
cd ${{ runner.temp }}
mkdir avro-cpp-1.11.3-build
cd avro-cpp-1.11.3-build
cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-1.11.3-install ${{ runner.temp }}/avro-cpp-1.11.3
cmake --build . --config Release --target avrocpp_s -j2
cmake --install .
- name: CMake build and install
run: |
cd ${{ github.workspace }}/..
mkdir build
cd build
cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-1.11.3-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_ETP_SSL=FALSE ${{ github.workspace }}
cmake --build . --config Release -j2
windows-2019-with-fesapi:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Boost install
run: |
(New-Object System.Net.WebClient).DownloadFile("https://sourceforge.net/projects/boost/files/boost-binaries/1.86.0//boost_1_86_0-msvc-14.2-64.exe", "${{ runner.temp }}\boost.exe")
Start-Process -Wait -FilePath "${{ runner.temp }}\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=${{ runner.temp }}\boost-install"
- name: AVRO install
run: |
(New-Object System.Net.WebClient).DownloadFile("https://archive.apache.org/dist/avro/avro-1.11.3/cpp/avro-cpp-1.11.3.tar.gz", "${{ runner.temp }}\avro-cpp-1.11.3.tar.gz")
7z x ${{ runner.temp }}\avro-cpp-1.11.3.tar.gz -o${{ runner.temp }}
7z x ${{ runner.temp }}\avro-cpp-1.11.3.tar -o${{ runner.temp }}
((Get-Content -path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt -Raw) -replace 'install \(TARGETS avrocpp avrocpp_s','install (TARGETS avrocpp_s') | Set-Content -Path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt
((Get-Content -path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt -Raw) -replace 'install \(TARGETS avrogencpp RUNTIME DESTINATION bin\)','') | Set-Content -Path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt
cd ${{ runner.temp }}
mkdir avro-cpp-1.11.3-build
cd avro-cpp-1.11.3-build
cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-1.11.3-install ${{ runner.temp }}/avro-cpp-1.11.3
cmake --build . --config Release --target avrocpp_s -j2
cmake --install .
- name: FESAPI install
run: |
(New-Object System.Net.WebClient).DownloadFile("https://github.com/F2I-Consulting/fesapi/releases/download/v2.10.1.0/fesapi2_10_1_0-cpp-vs2019-x64-staticfHdf1143-staticZlib13.zip", "${{ runner.temp }}\fesapi.zip")
7z x ${{ runner.temp }}\fesapi.zip -o${{ runner.temp }}
- name: CMake build and install
run: |
cd ${{ github.workspace }}/..
mkdir build
cd build
cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-1.11.3-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi2_10_1_0-cpp-vs2019-x64-staticfHdf1143-staticZlib13 -DWITH_ETP_SSL=FALSE ${{ github.workspace }}
cmake --build . --config Release -j2
ubuntu-20:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: APT install
run: |
sudo apt update
sudo apt install -y libboost-all-dev
- name: AVRO INSTALL
run: |
curl https://archive.apache.org/dist/avro/avro-1.11.3/cpp/avro-cpp-1.11.3.tar.gz -o ${{ runner.temp }}/avro-cpp-1.11.3.tar.gz
cd ${{ runner.temp }}
tar xzf avro-cpp-1.11.3.tar.gz
sed -i 's/install (TARGETS avrocpp avrocpp_s/install (TARGETS avrocpp_s/' avro-cpp-1.11.3/CMakeLists.txt
sed -i 's/install (TARGETS avrogencpp RUNTIME DESTINATION bin)//' avro-cpp-1.11.3/CMakeLists.txt
mkdir avro-cpp-1.11.3-build
cd avro-cpp-1.11.3-build
cmake -Wno-dev -Wno-deprecated -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-1.11.3-install ${{ runner.temp }}/avro-cpp-1.11.3
cmake --build . -j2 --target avrocpp_s
cmake --install .
- name: CMake build and install
run: |
cd ${{ github.workspace }}/..
mkdir build
cd build
cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-1.11.3-install -DAVRO_USE_STATIC_LIBS=TRUE ${{ github.workspace }}
cmake --build . --config Release -j2
ubuntu-20-java11:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '11'
- name: APT install
run: |
sudo apt update
sudo apt install -y libboost-all-dev
- name: AVRO INSTALL
run: |
curl https://archive.apache.org/dist/avro/avro-1.11.3/cpp/avro-cpp-1.11.3.tar.gz -o ${{ runner.temp }}/avro-cpp-1.11.3.tar.gz
cd ${{ runner.temp }}
tar xzf avro-cpp-1.11.3.tar.gz
sed -i 's/install (TARGETS avrocpp avrocpp_s/install (TARGETS avrocpp_s/' avro-cpp-1.11.3/CMakeLists.txt
sed -i 's/install (TARGETS avrogencpp RUNTIME DESTINATION bin)//' avro-cpp-1.11.3/CMakeLists.txt
mkdir avro-cpp-1.11.3-build
cd avro-cpp-1.11.3-build
cmake -Wno-dev -Wno-deprecated -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-1.11.3-install ${{ runner.temp }}/avro-cpp-1.11.3
cmake --build . -j2 --target avrocpp_s
cmake --install .
- name: CMake build and install
run: |
cd ${{ github.workspace }}/..
mkdir build
cd build
cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-1.11.3-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_JAVA_WRAPPING=TRUE ${{ github.workspace }}
cmake --build . --config Release -j2
ubuntu-20-java11-with-fesapi:
runs-on: ubuntu-20.04
strategy:
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed.
matrix:
include: [
{ xcc_name: 'gcc 9', xcc_pkg: gcc-9, cc: gcc-9, cxx: g++-9 },
{ xcc_name: 'gcc 10', xcc_pkg: gcc-10, cc: gcc-10, cxx: g++-10 },
{ xcc_name: 'clang 9', xcc_pkg: clang-9, cc: clang-9, cxx: clang++-9 },
{ xcc_name: 'clang 10', xcc_pkg: clang-10, cc: clang-10, cxx: clang++-10 },
{ xcc_name: 'clang 11', xcc_pkg: clang-11, cc: clang-11, cxx: clang++-11 },
# { xcc_name: 'clang 12', xcc_pkg: clang-12, cc: clang, cxx: clang++ },
]
env:
XCC: $${{ matrix.xcc_name }} # Set environment variables
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '11'
- name: APT install
run: |
sudo apt update
sudo apt install -y ${{ matrix.xcc_pkg }} libhdf5-dev libminizip-dev libboost-all-dev
- name: FESAPI install
run: |
git clone --branch v2.10.1.0 --single-branch https://github.com/F2I-Consulting/fesapi.git ${{ runner.temp }}/fesapi-src
cd ${{ runner.temp }}
mkdir fesapi-build
cd fesapi-build
cmake -DMINIZIP_INCLUDE_DIR=/usr/include/minizip -DMINIZIP_LIBRARY_RELEASE=/usr/lib/x86_64-linux-gnu/libminizip.so.1.0.0 -DCMAKE_BUILD_TYPE=Release -DWITH_JAVA_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fesapi-install -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} ${{ runner.temp }}/fesapi-src
cmake --build . -j2
cmake --install .
- name: AVRO INSTALL
run: |
curl https://archive.apache.org/dist/avro/avro-1.11.3/cpp/avro-cpp-1.11.3.tar.gz -o ${{ runner.temp }}/avro-cpp-1.11.3.tar.gz
cd ${{ runner.temp }}
tar xzf avro-cpp-1.11.3.tar.gz
sed -i 's/install (TARGETS avrocpp avrocpp_s/install (TARGETS avrocpp_s/' avro-cpp-1.11.3/CMakeLists.txt
sed -i 's/install (TARGETS avrogencpp RUNTIME DESTINATION bin)//' avro-cpp-1.11.3/CMakeLists.txt
mkdir avro-cpp-1.11.3-build
cd avro-cpp-1.11.3-build
cmake -Wno-dev -Wno-deprecated -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-1.11.3-install -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} ${{ runner.temp }}/avro-cpp-1.11.3
cmake --build . -j2 --target avrocpp_s
cmake --install .
- name: CMake build and install
run: |
cd ${{ github.workspace }}/..
mkdir build
cd build
cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-1.11.3-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi-install -DFESAPI_JAR=${{ runner.temp }}/fesapi-install/lib/fesapiJava-2.10.1.0.jar -DWITH_JAVA_WRAPPING=TRUE ${{ github.workspace }} -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
cmake --build . --config Release -j2
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Stub `setup.py` check
# It will be generated during CMake run
# https://github.com/pypa/cibuildwheel/issues/1139
run: touch python/setup.py
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp38-manylinux_* cp39-manylinux_* cp310-manylinux_* cp311-manylinux_* cp312-manylinux_* cp313-manylinux_*
CIBW_ARCHS: auto64
CIBW_BEFORE_ALL: >
yum install -y wget gcc-c++ openssl-devel minizip-devel &&
yum search epel-release &&
yum info epel-release &&
yum install -y epel-release &&
yum --enablerepo=epel install -y cmake3 &&
cd / &&
wget https://archives.boost.io/release/1.70.0/source/boost_1_70_0.tar.gz &&
tar xf boost_1_70_0.tar.gz &&
cd boost_1_70_0 &&
./bootstrap.sh --prefix=/boost-install --with-libraries=filesystem,iostreams,program_options,regex,system &&
./b2 install &&
cd / &&
wget https://archive.apache.org/dist/avro/avro-1.11.3/cpp/avro-cpp-1.11.3.tar.gz &&
tar xf avro-cpp-1.11.3.tar.gz &&
sed -i 's/install (TARGETS avrocpp avrocpp_s/install (TARGETS avrocpp_s/' avro-cpp-1.11.3/CMakeLists.txt &&
sed -i 's/install (TARGETS avrogencpp RUNTIME DESTINATION bin)//' avro-cpp-1.11.3/CMakeLists.txt &&
mkdir avro-build &&
cd avro-build &&
cmake3 -Wno-dev -Wno-deprecated -DBoost_ROOT=/boost-install -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/avro-install /avro-cpp-1.11.3 &&
cmake3 --build . -j2 --target avrocpp_s --config Release &&
cmake3 --install . &&
cd / &&
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.3/src/hdf5-1.12.3.tar.gz &&
tar xf hdf5-1.12.3.tar.gz &&
mkdir hdf5-build &&
cd hdf5-build &&
cmake3 -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF -DHDF5_BUILD_EXAMPLES:BOOL=OFF -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX:STRING=/hdf5-install ../hdf5-1.12.3 &&
cmake3 --build . -j2 --config Release &&
cmake3 --install . &&
cd / &&
wget https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.10.1.0.zip &&
unzip v2.10.1.0.zip &&
mkdir fesapi-build &&
cd fesapi-build &&
cmake3 -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=/boost-install -DHDF5_ROOT=/hdf5-install -DHDF5_USE_STATIC_LIBRARIES=TRUE -DCMAKE_INSTALL_PREFIX:STRING=/fesapi-install /fesapi-2.10.1.0 &&
cmake3 --build . -j2 --config Release &&
cmake3 --install . &&
cd / &&
mkdir build &&
cd build &&
cmake3 -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=/boost-install -DAVRO_ROOT=/avro-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=/fesapi-install -DWITH_PYTHON_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX:STRING=/fetpapi-install {project} &&
cmake3 --build . -j2 --config Release &&
cmake3 --install .
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/fesapi-install/lib64:/fetpapi-install/lib64 &&
auditwheel repair -w {dest_dir} {wheel}
with:
package-dir: ./python
output-dir: wheelhouse
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl