Skip to content

Commit cd25ad3

Browse files
Automatic ETP session resume when disconnection occurs outside of a transaction
1 parent 66ac4b1 commit cd25ad3

21 files changed

Lines changed: 399 additions & 155 deletions

.github/workflows/github-actions.yml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: github-actions
22
on: [push, pull_request]
33
jobs:
4-
windows-2019:
5-
runs-on: windows-2019
4+
windows-2022:
5+
runs-on: windows-2022
66
steps:
77
- uses: actions/checkout@v4
88
- name: Boost install
99
run: |
10-
(New-Object System.Net.WebClient).DownloadFile("https://archives.boost.io/release/1.87.0/binaries/boost_1_87_0-msvc-14.2-64.exe", "${{ runner.temp }}\boost.exe")
10+
(New-Object System.Net.WebClient).DownloadFile("https://archives.boost.io/release/1.88.0/binaries/boost_1_88_0-msvc-14.2-64.exe", "${{ runner.temp }}\boost.exe")
1111
Start-Process -Wait -FilePath "${{ runner.temp }}\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=${{ runner.temp }}\boost-install"
1212
- name: AVRO install
1313
run: |
@@ -19,23 +19,23 @@ jobs:
1919
cd ${{ runner.temp }}
2020
mkdir avro-cpp-build
2121
cd avro-cpp-build
22-
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-install ${{ runner.temp }}/avro-cpp-1.11.3
22+
cmake -G"Visual Studio 17 2022" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-install ${{ runner.temp }}/avro-cpp-1.11.3
2323
cmake --build . --config Release --target avrocpp_s -j2
2424
cmake --install .
2525
- name: CMake build and install
2626
run: |
2727
cd ${{ github.workspace }}/..
2828
mkdir build
2929
cd build
30-
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-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_ETP_SSL=FALSE ${{ github.workspace }}
30+
cmake -G"Visual Studio 17 2022" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_ETP_SSL=FALSE ${{ github.workspace }}
3131
cmake --build . --config Release -j2
32-
windows-2019-with-fesapi:
33-
runs-on: windows-2019
32+
windows-2022-with-fesapi:
33+
runs-on: windows-2022
3434
steps:
3535
- uses: actions/checkout@v4
3636
- name: Boost install
3737
run: |
38-
(New-Object System.Net.WebClient).DownloadFile("https://archives.boost.io/release/1.87.0/binaries/boost_1_87_0-msvc-14.2-64.exe", "${{ runner.temp }}\boost.exe")
38+
(New-Object System.Net.WebClient).DownloadFile("https://archives.boost.io/release/1.88.0/binaries/boost_1_88_0-msvc-14.2-64.exe", "${{ runner.temp }}\boost.exe")
3939
Start-Process -Wait -FilePath "${{ runner.temp }}\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=${{ runner.temp }}\boost-install"
4040
- name: AVRO install
4141
run: |
@@ -47,19 +47,19 @@ jobs:
4747
cd ${{ runner.temp }}
4848
mkdir avro-cpp-build
4949
cd avro-cpp-build
50-
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-install ${{ runner.temp }}/avro-cpp-1.11.3
50+
cmake -G"Visual Studio 17 2022" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-install ${{ runner.temp }}/avro-cpp-1.11.3
5151
cmake --build . --config Release --target avrocpp_s -j2
5252
cmake --install .
5353
- name: FESAPI install
5454
run: |
55-
(New-Object System.Net.WebClient).DownloadFile("https://github.com/F2I-Consulting/fesapi/releases/download/v2.12.1.0/fesapi2_12_1_0-cpp-vs2019-x64.zip", "${{ runner.temp }}\fesapi.zip")
55+
(New-Object System.Net.WebClient).DownloadFile("https://github.com/F2I-Consulting/fesapi/releases/download/v2.13.0.0/fesapi2_13_0_0-cpp-vs2019-x64.zip", "${{ runner.temp }}\fesapi.zip")
5656
7z x ${{ runner.temp }}\fesapi.zip -o${{ runner.temp }}
5757
- name: CMake build and install
5858
run: |
5959
cd ${{ github.workspace }}/..
6060
mkdir build
6161
cd build
62-
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-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi2_12_1_0-cpp-vs2019-x64 -DWITH_ETP_SSL=FALSE ${{ github.workspace }}
62+
cmake -G"Visual Studio 17 2022" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi2_13_0_0-cpp-vs2019-x64 -DWITH_ETP_SSL=FALSE ${{ github.workspace }}
6363
cmake --build . --config Release -j2
6464
ubuntu-22:
6565
runs-on: ubuntu-22.04
@@ -148,13 +148,16 @@ jobs:
148148
sudo apt install -y ${{ matrix.xcc_pkg }} libhdf5-dev libminizip-dev libboost-all-dev
149149
- name: FESAPI install
150150
run: |
151-
git clone --branch v2.12.1.0 --single-branch https://github.com/F2I-Consulting/fesapi.git ${{ runner.temp }}/fesapi-src
151+
git clone --branch v2.13.0.0 --single-branch https://github.com/F2I-Consulting/fesapi.git ${{ runner.temp }}/fesapi-src
152152
cd ${{ runner.temp }}
153153
mkdir fesapi-build
154154
cd fesapi-build
155155
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
156156
cmake --build . -j2
157157
cmake --install .
158+
mkdir -p ${{ runner.temp }}/fesapi-install/include/fesapi
159+
cd ${{ runner.temp }}/fesapi-src/src
160+
find . -name "*.h" -exec cp --parents \{\} ${{ runner.temp }}/fesapi-install/include/fesapi/ \;
158161
- name: AVRO INSTALL
159162
run: |
160163
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
@@ -172,7 +175,7 @@ jobs:
172175
cd ${{ github.workspace }}/..
173176
mkdir build
174177
cd build
175-
cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi-install -DFESAPI_JAR=${{ runner.temp }}/fesapi-install/lib/fesapiJava-2.12.1.0.jar -DWITH_JAVA_WRAPPING=TRUE ${{ github.workspace }} -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
178+
cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi-install -DFESAPI_JAR=${{ runner.temp }}/fesapi-install/lib/fesapiJava-2.13.0.0.jar -DWITH_JAVA_WRAPPING=TRUE ${{ github.workspace }} -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
176179
cmake --build . --config Release -j2
177180
build_wheels_windows:
178181
name: Build wheels on windows-latest
@@ -191,12 +194,12 @@ jobs:
191194
CIBW_BEFORE_ALL: >
192195
%VCPKG_INSTALLATION_ROOT%\vcpkg install boost-uuid minizip hdf5[zlib] &&
193196
cd ${{ runner.temp }} &&
194-
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.12.1.0.tar.gz', '${{ runner.temp }}\fesapi-2.12.1.0.tar.gz')" &&
195-
7z x ${{ runner.temp }}\fesapi-2.12.1.0.tar.gz -o${{ runner.temp }} &&
196-
7z x ${{ runner.temp }}\fesapi-2.12.1.0.tar -o${{ runner.temp }} &&
197+
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.13.0.0.tar.gz', '${{ runner.temp }}\fesapi-2.13.0.0.tar.gz')" &&
198+
7z x ${{ runner.temp }}\fesapi-2.13.0.0.tar.gz -o${{ runner.temp }} &&
199+
7z x ${{ runner.temp }}\fesapi-2.13.0.0.tar -o${{ runner.temp }} &&
197200
mkdir fesapi-build &&
198201
cd fesapi-build &&
199-
cmake -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -G"Visual Studio 17 2022" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fesapi-install ${{ runner.temp }}\fesapi-2.12.1.0 &&
202+
cmake -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -G"Visual Studio 17 2022" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fesapi-install ${{ runner.temp }}\fesapi-2.13.0.0 &&
200203
cmake --build . --config Release -j2 &&
201204
cmake --build . --config Release --target INSTALL &&
202205
%VCPKG_INSTALLATION_ROOT%\vcpkg install openssl boost-beast avro-cpp &&
@@ -239,11 +242,11 @@ jobs:
239242
yum install -y epel-release &&
240243
yum --enablerepo=epel install -y minizip1.2-devel hdf5-devel cmake3 &&
241244
cd / &&
242-
wget https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.12.1.0.zip &&
243-
unzip v2.12.1.0.zip &&
245+
wget https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.13.0.0.zip &&
246+
unzip v2.13.0.0.zip &&
244247
mkdir fesapi-build &&
245248
cd fesapi-build &&
246-
cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:STRING=/fesapi-install /fesapi-2.12.1.0 &&
249+
cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:STRING=/fesapi-install /fesapi-2.13.0.0 &&
247250
cmake3 --build . -j2 --config Release &&
248251
cmake3 --install . &&
249252
cd / &&
@@ -292,9 +295,9 @@ jobs:
292295
# Dont use brew for dependencies https://github.com/pypa/cibuildwheel/issues/1251#issuecomment-1234553537
293296
CIBW_BEFORE_ALL: >
294297
cd ${{ github.workspace }}/.. &&
295-
wget --no-verbose https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz &&
296-
tar xf boost_1_87_0.tar.gz &&
297-
cd boost_1_87_0 &&
298+
wget --no-verbose https://archives.boost.io/release/1.88.0/source/boost_1_88_0.tar.gz &&
299+
tar xf boost_1_88_0.tar.gz &&
300+
cd boost_1_88_0 &&
298301
./bootstrap.sh --prefix=${{ github.workspace }}/../boost-install --with-libraries=filesystem,iostreams,program_options,regex,system &&
299302
./b2 -d0 install &&
300303
git clone https://github.com/F2I-Consulting/Minizip.git ${{ github.workspace }}/../minizip &&
@@ -312,11 +315,11 @@ jobs:
312315
cmake --build . -j2 --config Release &&
313316
cmake --install . &&
314317
cd ${{ github.workspace }}/.. &&
315-
wget --no-verbose https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.12.1.0.zip &&
316-
unzip v2.12.1.0.zip &&
318+
wget --no-verbose https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.13.0.0.zip &&
319+
unzip v2.13.0.0.zip &&
317320
mkdir fesapi-build &&
318321
cd fesapi-build &&
319-
cmake -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=${{ github.workspace }}/../boost-install -DMINIZIP_ROOT=${{ github.workspace }}/../minizip-install -DHDF5_ROOT=${{ github.workspace }}/../hdf5-install -DHDF5_USE_STATIC_LIBRARIES=TRUE -DCMAKE_INSTALL_PREFIX:STRING=${{ github.workspace }}/../fesapi-install ${{ github.workspace }}/../fesapi-2.12.1.0 &&
322+
cmake -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=${{ github.workspace }}/../boost-install -DMINIZIP_ROOT=${{ github.workspace }}/../minizip-install -DHDF5_ROOT=${{ github.workspace }}/../hdf5-install -DHDF5_USE_STATIC_LIBRARIES=TRUE -DCMAKE_INSTALL_PREFIX:STRING=${{ github.workspace }}/../fesapi-install ${{ github.workspace }}/../fesapi-2.13.0.0 &&
320323
cmake --build . -j2 --config Release &&
321324
cmake --install . &&
322325
cd ${{ github.workspace }}/.. &&

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ set (FETPAPI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
1515

1616
# version mechanism
1717
set (Fetpapi_VERSION_MAJOR 0)
18-
set (Fetpapi_VERSION_MINOR 3)
19-
set (Fetpapi_VERSION_PATCH 2)
18+
set (Fetpapi_VERSION_MINOR 4)
19+
set (Fetpapi_VERSION_PATCH 0)
2020
set (Fetpapi_VERSION_TWEAK 0)
2121

2222
set (Fetpapi_VERSION ${Fetpapi_VERSION_MAJOR}.${Fetpapi_VERSION_MINOR}.${Fetpapi_VERSION_PATCH}.${Fetpapi_VERSION_TWEAK})

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Download (build and install if necessary) third party libraries:
1313
- BOOST : All versions from version 1.66 should be ok but you may experience some [min/max build issues](https://github.com/boostorg/beast/issues/1980) using version 1.72 or 1.73.
1414
- AVRO : https://avro.apache.org/releases.html#Download (starting from version 1.9.0 [except 1.11.1](https://issues.apache.org/jira/browse/AVRO-3601), build it with the above boost library.)
15-
- (OPTIONALLY) OpenSSL : version 1.1 is known to work.
15+
- (OPTIONALLY) OpenSSL : version 3.4 is known to work.
1616
- (OPTIONALLY) [FESAPI](https://github.com/F2I-Consulting/fesapi/releases) : All versions from version 2.7.0.0 should be ok but a minimal version of 2.11.0.0 is recommended to automatically recognize FESAPI CMake Variables using CMake find Module and build silently the EtpClient example.
1717

1818
# Configure the build

cmake/fetpapiCsWithFesapi.csproj.template

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>F2iConsulting.Fetpapi</RootNamespace>
1212
<AssemblyName>${CS_LIBRARY_NAME}</AssemblyName>
13+
<!-- Minimal TargetFrameworkVersion according to SWIG
1314
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
15+
-->
16+
<!-- TargetFrameworkVersion which is ok for a lot of softwares and for Github Runner image -->
17+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1418
<FileAlignment>512</FileAlignment>
1519
<TargetFrameworkProfile />
1620
</PropertyGroup>

cmake/fetpapiCsWithoutFesapi.csproj.template

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>F2iConsulting.Fetpapi</RootNamespace>
1212
<AssemblyName>${CS_LIBRARY_NAME}</AssemblyName>
13+
<!-- Minimal TargetFrameworkVersion according to SWIG
1314
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
15+
-->
16+
<!-- TargetFrameworkVersion which is ok for a lot of softwares and for Github Runner image -->
17+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1418
<FileAlignment>512</FileAlignment>
1519
<TargetFrameworkProfile />
1620
</PropertyGroup>

cmake/pyproject.toml.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ readme = "README.md"
1616
classifiers=[
1717
'Development Status :: 5 - Production/Stable',
1818
'Intended Audience :: Developers',
19-
'License :: OSI Approved :: Apache Software License',
2019
'Operating System :: Microsoft :: Windows',
2120
'Operating System :: POSIX :: Linux',
2221
'Operating System :: MacOS',
@@ -29,9 +28,10 @@ classifiers=[
2928
'Programming Language :: Python :: 3.12',
3029
'Topic :: Software Development',
3130
'Topic :: Software Development :: Libraries',
32-
'Topic :: Software Development :: Libraries :: Application Frameworks ',
31+
'Topic :: Software Development :: Libraries :: Application Frameworks',
3332
'Topic :: File Formats',
3433
]
34+
license = {text = "Apache-2.0"}
3535
keywords = [
3636
"energistics",
3737
"resqml",

cmake/swigEtp1_2Include.i.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ namespace ETP_NS
21332133
* Run the websocket and then the ETP session.
21342134
* Everything related to this session (including the completion handlers) will operate on the same unique thread in a single event loop.
21352135
*/
2136-
bool run();
2136+
void run();
21372137
};
21382138

21392139
class InitializationParameters

0 commit comments

Comments
 (0)