From e5584dac0952126a0ed390d62da89f85226015dc Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 12:28:34 +0300 Subject: [PATCH 01/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 483 ++++++++++++----------- 1 file changed, 244 insertions(+), 239 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 00977c2..1d7470f 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -13,29 +13,29 @@ on: jobs: # build dxapi - build-dxapi: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04, macos-11] - include: - - os: macos-11 - env_os: MACOS - steps: - - name: Check out repository code - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: Build Dxapi - run: make -C ./dxapi/. - env: - CC: clang - OS: ${{ matrix.env_os }} - - name: Archive artifacts - uses: actions/upload-artifact@v2 - with: - name: dxapi-${{ matrix.os }} - path: ./dxapi/bin/libdxapi-x64.a +# build-dxapi: +# runs-on: ${{ matrix.os }} +# strategy: +# matrix: +# os: [ubuntu-20.04, macos-11] +# include: +# - os: macos-11 +# env_os: MACOS +# steps: +# - name: Check out repository code +# uses: actions/checkout@v2 +# with: +# submodules: 'recursive' +# - name: Build Dxapi +# run: make -C ./dxapi/. +# env: +# CC: clang +# OS: ${{ matrix.env_os }} +# - name: Archive artifacts +# uses: actions/upload-artifact@v2 +# with: +# name: dxapi-${{ matrix.os }} +# path: ./dxapi/bin/libdxapi-x64.a build-windows-dxapi: runs-on: windows-2019 @@ -44,6 +44,11 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' + - uses: robinraju/release-downloader@v1.3 + with: + repository: "finos/TimeBase-CE" + tag: "6.1.7" + fileName: "timebase-windows-installer-20220506.jar" - name: Use MSBuild uses: microsoft/setup-msbuild@v1.1 - name: Build Solution @@ -55,61 +60,61 @@ jobs: path: ./dxapi/bin/dxapi-x64.lib # build tbapi python - build-linux: - runs-on: ubuntu-20.04 - needs: [build-dxapi] - strategy: - matrix: - py: ['3.6', '3.7', '3.8', '3.9', '3.10'] - include: - - py: '3.6' - py_env: '36' - - py: '3.7' - py_env: '37' - - py: '3.8' - py_env: '38' - - py: '3.9' - py_env: '39' - - py: '3.10' - py_env: '310' - steps: - - name: Check out repository code - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: Download dxapi-linux artifacts - uses: actions/download-artifact@v2 - with: - name: dxapi-ubuntu-20.04 - path: dxapi/bin - - name: install dev python 3.8, 3.9 - if: ${{ matrix.py == '3.8' || matrix.py == '3.9' }} - run: | - sudo apt-get update - sudo apt install -y python${{ matrix.py }}-dev - - name: install dev python 3.6, 3.7, 3.10 - if: ${{ matrix.py == '3.6' || matrix.py == '3.7' || matrix.py == '3.10' }} - run: | - sudo apt-get update - sudo apt-get install -yq software-properties-common - sudo add-apt-repository ppa:deadsnakes/ppa - sudo apt-get update - sudo apt-get install python${{ matrix.py }}-dev - - name: Build Tbapi python - run: | - make -C . - cp ./dfp/lib/linux/64/libDecimalNative.so ./bin/release/linux/x64/py${{ matrix.py_env }}/ - env: - CC: clang - PYTHON_VERSION: ${{ matrix.py_env }} - - name: Archive artifacts - uses: actions/upload-artifact@v2 - with: - name: tbapi-python-linux - path: | - ./bin/release/__init__.py - ./bin/release/linux/x64/py${{ matrix.py_env }}/_tbapi.so - ./bin/release/linux/x64/py${{ matrix.py_env }}/libDecimalNative.so +# build-linux: +# runs-on: ubuntu-20.04 +# needs: [build-dxapi] +# strategy: +# matrix: +# py: ['3.6', '3.7', '3.8', '3.9', '3.10'] +# include: +# - py: '3.6' +# py_env: '36' +# - py: '3.7' +# py_env: '37' +# - py: '3.8' +# py_env: '38' +# - py: '3.9' +# py_env: '39' +# - py: '3.10' +# py_env: '310' +# steps: +# - name: Check out repository code +# uses: actions/checkout@v2 +# with: +# submodules: 'recursive' +# - name: Download dxapi-linux artifacts +# uses: actions/download-artifact@v2 +# with: +# name: dxapi-ubuntu-20.04 +# path: dxapi/bin +# - name: install dev python 3.8, 3.9 +# if: ${{ matrix.py == '3.8' || matrix.py == '3.9' }} +# run: | +# sudo apt-get update +# sudo apt install -y python${{ matrix.py }}-dev +# - name: install dev python 3.6, 3.7, 3.10 +# if: ${{ matrix.py == '3.6' || matrix.py == '3.7' || matrix.py == '3.10' }} +# run: | +# sudo apt-get update +# sudo apt-get install -yq software-properties-common +# sudo add-apt-repository ppa:deadsnakes/ppa +# sudo apt-get update +# sudo apt-get install python${{ matrix.py }}-dev +# - name: Build Tbapi python +# run: | +# make -C . +# cp ./dfp/lib/linux/64/libDecimalNative.so ./bin/release/linux/x64/py${{ matrix.py_env }}/ +# env: +# CC: clang +# PYTHON_VERSION: ${{ matrix.py_env }} +# - name: Archive artifacts +# uses: actions/upload-artifact@v2 +# with: +# name: tbapi-python-linux +# path: | +# ./bin/release/__init__.py +# ./bin/release/linux/x64/py${{ matrix.py_env }}/_tbapi.so +# ./bin/release/linux/x64/py${{ matrix.py_env }}/libDecimalNative.so build-windows: runs-on: windows-2019 @@ -163,103 +168,103 @@ jobs: ./bin/release/windows/x64/py${{ matrix.py_env }}/_tbapi.pyd ./bin/release/windows/x64/py${{ matrix.py_env }}/DecimalNative.dll - build-macos: - runs-on: macos-11 - needs: [build-dxapi] - strategy: - matrix: - py: ['3.6', '3.7', '3.8', '3.9', '3.10'] - include: - - py: '3.6' - py_env: '36' - py_v: '3.6.15' - py_lib: 'python3.6m' - - py: '3.7' - py_env: '37' - py_v: '3.7.12' - py_lib: 'python3.7m' - - py: '3.8' - py_env: '38' - py_v: '3.8.12' - py_lib: 'python3.8' - - py: '3.9' - py_env: '39' - py_v: '3.9.10' - py_lib: 'python3.9' - - py: '3.10' - py_env: '310' - py_v: '3.10.2' - py_lib: 'python3.10' - steps: - - name: Check out repository code - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: Download dxapi-macos artifacts - uses: actions/download-artifact@v2 - with: - name: dxapi-macos-11 - path: dxapi/bin - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.py_v }} - - name: Install SWIG - run: | - cd swigwin - tar -xzvf swig-3.0.12.tar.gz - cd swig-3.0.12 - ./configure - make - make install - - name: Build tbapi python - run: | - make -C . - cp ./dfp/lib/osx/64/libDecimalNative.dylib ./bin/release/darwin/x64/py${{ matrix.py_env }}/ - otool -L ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so - install_name_tool -change /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib/lib${{ matrix.py_lib }}.dylib @rpath/lib${{ matrix.py_lib }}.dylib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so - otool -L ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so - install_name_tool -add_rpath /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so - install_name_tool -add_rpath /usr/local/opt/python@${{ matrix.py }}/Frameworks/Python.framework/Versions/${{ matrix.py }}/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so - install_name_tool -add_rpath /Library/Frameworks/Python.framework/Versions/${{ matrix.py }}/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so - otool -l ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so - env: - CC: clang - OS: MACOS - PYTHON_VERSION: ${{ matrix.py_env }} - PYTHON_MACOS_HEADERS_PATH: /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/include/${{ matrix.py_lib }} - PYTHON_MACOS_LIB_PATH: /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib - PYTHON_MACOS_LIB: ${{ matrix.py_lib }} - - name: Archive artifacts - uses: actions/upload-artifact@v2 - with: - name: tbapi-python-macos - path: | - ./bin/release/__init__.py - ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so - ./bin/release/darwin/x64/py${{ matrix.py_env }}/libDecimalNative.dylib +# build-macos: +# runs-on: macos-11 +# needs: [build-dxapi] +# strategy: +# matrix: +# py: ['3.6', '3.7', '3.8', '3.9', '3.10'] +# include: +# - py: '3.6' +# py_env: '36' +# py_v: '3.6.15' +# py_lib: 'python3.6m' +# - py: '3.7' +# py_env: '37' +# py_v: '3.7.12' +# py_lib: 'python3.7m' +# - py: '3.8' +# py_env: '38' +# py_v: '3.8.12' +# py_lib: 'python3.8' +# - py: '3.9' +# py_env: '39' +# py_v: '3.9.10' +# py_lib: 'python3.9' +# - py: '3.10' +# py_env: '310' +# py_v: '3.10.2' +# py_lib: 'python3.10' +# steps: +# - name: Check out repository code +# uses: actions/checkout@v2 +# with: +# submodules: 'recursive' +# - name: Download dxapi-macos artifacts +# uses: actions/download-artifact@v2 +# with: +# name: dxapi-macos-11 +# path: dxapi/bin +# - uses: actions/setup-python@v2 +# with: +# python-version: ${{ matrix.py_v }} +# - name: Install SWIG +# run: | +# cd swigwin +# tar -xzvf swig-3.0.12.tar.gz +# cd swig-3.0.12 +# ./configure +# make +# make install +# - name: Build tbapi python +# run: | +# make -C . +# cp ./dfp/lib/osx/64/libDecimalNative.dylib ./bin/release/darwin/x64/py${{ matrix.py_env }}/ +# otool -L ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so +# install_name_tool -change /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib/lib${{ matrix.py_lib }}.dylib @rpath/lib${{ matrix.py_lib }}.dylib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so +# otool -L ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so +# install_name_tool -add_rpath /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so +# install_name_tool -add_rpath /usr/local/opt/python@${{ matrix.py }}/Frameworks/Python.framework/Versions/${{ matrix.py }}/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so +# install_name_tool -add_rpath /Library/Frameworks/Python.framework/Versions/${{ matrix.py }}/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so +# otool -l ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so +# env: +# CC: clang +# OS: MACOS +# PYTHON_VERSION: ${{ matrix.py_env }} +# PYTHON_MACOS_HEADERS_PATH: /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/include/${{ matrix.py_lib }} +# PYTHON_MACOS_LIB_PATH: /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib +# PYTHON_MACOS_LIB: ${{ matrix.py_lib }} +# - name: Archive artifacts +# uses: actions/upload-artifact@v2 +# with: +# name: tbapi-python-macos +# path: | +# ./bin/release/__init__.py +# ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so +# ./bin/release/darwin/x64/py${{ matrix.py_env }}/libDecimalNative.dylib # Gather artifacts gather-artifacts: runs-on: ubuntu-20.04 - needs: [build-linux, build-macos, build-windows] + needs: [build-windows] # [build-linux, build-macos, build-windows] steps: - name: Check out repository code uses: actions/checkout@v2 - - name: Download tbapi-python-linux artifacts - uses: actions/download-artifact@v2 - with: - name: tbapi-python-linux - path: tbapi +# - name: Download tbapi-python-linux artifacts +# uses: actions/download-artifact@v2 +# with: +# name: tbapi-python-linux +# path: tbapi - name: Download tbapi-python-windows artifacts uses: actions/download-artifact@v2 with: name: tbapi-python-windows path: tbapi - - name: Download tbapi-python-windows artifacts - uses: actions/download-artifact@v2 - with: - name: tbapi-python-macos - path: tbapi +# - name: Download tbapi-python-macos artifacts +# uses: actions/download-artifact@v2 +# with: +# name: tbapi-python-macos +# path: tbapi - uses: actions/setup-python@v2 with: python-version: "3.10.2" @@ -280,47 +285,47 @@ jobs: ./tbapi # Tests - test-linux: - runs-on: ubuntu-20.04 - needs: [gather-artifacts] - strategy: - matrix: - py: ['3.6', '3.7', '3.8', '3.9', '3.10'] - services: - timebase: - image: finos/timebase-ce-server:6.1 - env: - JAVA_OPTS: "-DQuantServer.enableRemoteMonitoring=true -DTimeBase.version=5.0" - ports: - - 8011:8011 - steps: - - name: Check out repository code - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: Download tbapi-python artifacts - uses: actions/download-artifact@v2 - with: - name: tbapi-python - path: tests/tbapi - - uses: actions/setup-python@v2 - with: - python-version: '${{ matrix.py }}' - - name: Run tests - run: | - chmod -R 777 ./tests - cd ./tests - python -c "import tbapi; print(tbapi.version())" - python TestAll.py - env: - TIMEBASE_HOST: localhost - TIMEBASE_PORT: 8011 - - name: Archive artifacts - uses: actions/upload-artifact@v2 - with: - name: test-reports-tbapi-python-linux - path: | - ./tests/reports +# test-linux: +# runs-on: ubuntu-20.04 +# needs: [gather-artifacts] +# strategy: +# matrix: +# py: ['3.6', '3.7', '3.8', '3.9', '3.10'] +# services: +# timebase: +# image: finos/timebase-ce-server:6.1 +# env: +# JAVA_OPTS: "-DQuantServer.enableRemoteMonitoring=true -DTimeBase.version=5.0" +# ports: +# - 8011:8011 +# steps: +# - name: Check out repository code +# uses: actions/checkout@v2 +# with: +# submodules: 'recursive' +# - name: Download tbapi-python artifacts +# uses: actions/download-artifact@v2 +# with: +# name: tbapi-python +# path: tests/tbapi +# - uses: actions/setup-python@v2 +# with: +# python-version: '${{ matrix.py }}' +# - name: Run tests +# run: | +# chmod -R 777 ./tests +# cd ./tests +# python -c "import tbapi; print(tbapi.version())" +# python TestAll.py +# env: +# TIMEBASE_HOST: localhost +# TIMEBASE_PORT: 8011 +# - name: Archive artifacts +# uses: actions/upload-artifact@v2 +# with: +# name: test-reports-tbapi-python-linux +# path: | +# ./tests/reports test-windows-smoke: runs-on: windows-2019 @@ -347,38 +352,38 @@ jobs: cd ./tests python -c "import tbapi; print(tbapi.version())" - test-macos-smoke: - runs-on: macos-11 - needs: [gather-artifacts] - strategy: - matrix: - py: ['3.6', '3.7', '3.8', '3.9', '3.10'] - include: - - py: '3.6' - py_v: '3.6.15' - - py: '3.7' - py_v: '3.7.12' - - py: '3.8' - py_v: '3.8.12' - - py: '3.9' - py_v: '3.9.10' - - py: '3.10' - py_v: '3.10.2' - steps: - - name: Check out repository code - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: Download tbapi-python artifacts - uses: actions/download-artifact@v2 - with: - name: tbapi-python - path: tests/tbapi - - uses: actions/setup-python@v2 - with: - python-version: '${{ matrix.py_v }}' - - name: Run tests - run: | - chmod -R 777 ./tests - cd ./tests - python -c "import tbapi; print(tbapi.version())" +# test-macos-smoke: +# runs-on: macos-11 +# needs: [gather-artifacts] +# strategy: +# matrix: +# py: ['3.6', '3.7', '3.8', '3.9', '3.10'] +# include: +# - py: '3.6' +# py_v: '3.6.15' +# - py: '3.7' +# py_v: '3.7.12' +# - py: '3.8' +# py_v: '3.8.12' +# - py: '3.9' +# py_v: '3.9.10' +# - py: '3.10' +# py_v: '3.10.2' +# steps: +# - name: Check out repository code +# uses: actions/checkout@v2 +# with: +# submodules: 'recursive' +# - name: Download tbapi-python artifacts +# uses: actions/download-artifact@v2 +# with: +# name: tbapi-python +# path: tests/tbapi +# - uses: actions/setup-python@v2 +# with: +# python-version: '${{ matrix.py_v }}' +# - name: Run tests +# run: | +# chmod -R 777 ./tests +# cd ./tests +# python -c "import tbapi; print(tbapi.version())" From 8c187c8278b15be7e94e6efcd03ece8b9e282807 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 12:58:29 +0300 Subject: [PATCH 02/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 7 +++++++ tests/install/auto-install.xml | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/install/auto-install.xml diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 1d7470f..b80713e 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -49,6 +49,13 @@ jobs: repository: "finos/TimeBase-CE" tag: "6.1.7" fileName: "timebase-windows-installer-20220506.jar" + out-file-path: "tests/install" + - name: Start timebase + run: | + cd tests/install + java -jar timebase-windows-installer-20220506.jar auto-install.xml + cd Timebase/bin + tdbserver.cmd -home . - name: Use MSBuild uses: microsoft/setup-msbuild@v1.1 - name: Build Solution diff --git a/tests/install/auto-install.xml b/tests/install/auto-install.xml new file mode 100644 index 0000000..7b28cd4 --- /dev/null +++ b/tests/install/auto-install.xml @@ -0,0 +1,12 @@ + + + + + + c:/projects/github/TimeBaseClientPython/tests/install/Timebase + + + + + + From 91d8db75f3cd4647f2ffce1b422438c29675dcc7 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 13:03:01 +0300 Subject: [PATCH 03/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index b80713e..f165014 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -44,6 +44,10 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' + - name: Setup java + uses: actions/setup-java@v1 + with: + java-version: '11' - uses: robinraju/release-downloader@v1.3 with: repository: "finos/TimeBase-CE" From 64693b628f8e7b09f7a20d40470d8b1e692b5dfd Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 13:07:58 +0300 Subject: [PATCH 04/27] windows tests pipeline --- tests/install/auto-install.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/install/auto-install.xml b/tests/install/auto-install.xml index 7b28cd4..3c57d0d 100644 --- a/tests/install/auto-install.xml +++ b/tests/install/auto-install.xml @@ -3,7 +3,7 @@ - c:/projects/github/TimeBaseClientPython/tests/install/Timebase + D:/a/TimeBaseClientPython/TimeBaseClientPython/tests/install/Timebase From 33da1112030ff8717d9c52a565432a032a034033 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 13:20:01 +0300 Subject: [PATCH 05/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index f165014..9a6fe89 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -58,8 +58,12 @@ jobs: run: | cd tests/install java -jar timebase-windows-installer-20220506.jar auto-install.xml - cd Timebase/bin - tdbserver.cmd -home . + ls + cd Timebase + ls + cd bin + ls + ./tdbserver.cmd -home . - name: Use MSBuild uses: microsoft/setup-msbuild@v1.1 - name: Build Solution From 9f97319ad889871441360846d316b1f64bae7fa2 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 16:28:56 +0300 Subject: [PATCH 06/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 9a6fe89..3936016 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -63,7 +63,7 @@ jobs: ls cd bin ls - ./tdbserver.cmd -home . + Start-Process -FilePath "./tdbserver.cmd" -ArgumentList "-home ." - name: Use MSBuild uses: microsoft/setup-msbuild@v1.1 - name: Build Solution From 9ee5881727c0ec55653ac114ff186587ee2f766f Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 16:35:09 +0300 Subject: [PATCH 07/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 37 +++++++++++------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 3936016..cade545 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -44,26 +44,6 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' - - name: Setup java - uses: actions/setup-java@v1 - with: - java-version: '11' - - uses: robinraju/release-downloader@v1.3 - with: - repository: "finos/TimeBase-CE" - tag: "6.1.7" - fileName: "timebase-windows-installer-20220506.jar" - out-file-path: "tests/install" - - name: Start timebase - run: | - cd tests/install - java -jar timebase-windows-installer-20220506.jar auto-install.xml - ls - cd Timebase - ls - cd bin - ls - Start-Process -FilePath "./tdbserver.cmd" -ArgumentList "-home ." - name: Use MSBuild uses: microsoft/setup-msbuild@v1.1 - name: Build Solution @@ -353,6 +333,23 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' + - name: Setup java for TimeBase installer + uses: actions/setup-java@v1 + with: + java-version: '11' + - name: Download installer + uses: robinraju/release-downloader@v1.3 + with: + repository: "finos/TimeBase-CE" + tag: "6.1.7" + fileName: "timebase-windows-installer-20220506.jar" + out-file-path: "tests/install" + - name: Install and start TimeBase + run: | + cd tests/install + java -jar timebase-windows-installer-20220506.jar auto-install.xml + cd Timebase/bin + Start-Process -FilePath "./tdbserver.cmd" -ArgumentList "-home ." - name: Download tbapi-python artifacts uses: actions/download-artifact@v2 with: From 0c22e830ebff2e39aa45e334ff93701155053123 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 16:36:01 +0300 Subject: [PATCH 08/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index cade545..a6328d5 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -363,6 +363,10 @@ jobs: chmod -R 777 ./tests cd ./tests python -c "import tbapi; print(tbapi.version())" + python TestAll.py + env: + TIMEBASE_HOST: localhost + TIMEBASE_PORT: 8011 # test-macos-smoke: # runs-on: macos-11 From 8ecf9141e4522e6f4993df546645ca7850b401dd Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 17:00:17 +0300 Subject: [PATCH 09/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 321 ++++++++++-------- ...uto-install.xml => auto-install-macos.xml} | 0 tests/install/auto-install-windows.xml | 12 + 3 files changed, 193 insertions(+), 140 deletions(-) rename tests/install/{auto-install.xml => auto-install-macos.xml} (100%) create mode 100644 tests/install/auto-install-windows.xml diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index a6328d5..38df36e 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -13,29 +13,46 @@ on: jobs: # build dxapi -# build-dxapi: -# runs-on: ${{ matrix.os }} -# strategy: -# matrix: -# os: [ubuntu-20.04, macos-11] -# include: -# - os: macos-11 -# env_os: MACOS -# steps: -# - name: Check out repository code -# uses: actions/checkout@v2 -# with: -# submodules: 'recursive' -# - name: Build Dxapi -# run: make -C ./dxapi/. -# env: -# CC: clang -# OS: ${{ matrix.env_os }} -# - name: Archive artifacts -# uses: actions/upload-artifact@v2 -# with: -# name: dxapi-${{ matrix.os }} -# path: ./dxapi/bin/libdxapi-x64.a + build-dxapi: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-11] #todo [ubuntu-20.04, macos-11] + include: + - os: macos-11 + env_os: MACOS + steps: + - name: Check out repository code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: Setup java for TimeBase installer + uses: actions/setup-java@v1 + with: + java-version: '11' + - name: Download installer + uses: robinraju/release-downloader@v1.3 + with: + repository: "finos/TimeBase-CE" + tag: "6.1.7" + fileName: "timebase-linux-installer-20220506.jar" + out-file-path: "tests/install" + - name: Install and start TimeBase + run: | + cd tests/install + java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml + cd Timebase/bin + screen -dm ./tdbserver.sh -home . -port 8154 + - name: Build Dxapi + run: make -C ./dxapi/. + env: + CC: clang + OS: ${{ matrix.env_os }} + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: dxapi-${{ matrix.os }} + path: ./dxapi/bin/libdxapi-x64.a build-windows-dxapi: runs-on: windows-2019 @@ -163,85 +180,85 @@ jobs: ./bin/release/windows/x64/py${{ matrix.py_env }}/_tbapi.pyd ./bin/release/windows/x64/py${{ matrix.py_env }}/DecimalNative.dll -# build-macos: -# runs-on: macos-11 -# needs: [build-dxapi] -# strategy: -# matrix: -# py: ['3.6', '3.7', '3.8', '3.9', '3.10'] -# include: -# - py: '3.6' -# py_env: '36' -# py_v: '3.6.15' -# py_lib: 'python3.6m' -# - py: '3.7' -# py_env: '37' -# py_v: '3.7.12' -# py_lib: 'python3.7m' -# - py: '3.8' -# py_env: '38' -# py_v: '3.8.12' -# py_lib: 'python3.8' -# - py: '3.9' -# py_env: '39' -# py_v: '3.9.10' -# py_lib: 'python3.9' -# - py: '3.10' -# py_env: '310' -# py_v: '3.10.2' -# py_lib: 'python3.10' -# steps: -# - name: Check out repository code -# uses: actions/checkout@v2 -# with: -# submodules: 'recursive' -# - name: Download dxapi-macos artifacts -# uses: actions/download-artifact@v2 -# with: -# name: dxapi-macos-11 -# path: dxapi/bin -# - uses: actions/setup-python@v2 -# with: -# python-version: ${{ matrix.py_v }} -# - name: Install SWIG -# run: | -# cd swigwin -# tar -xzvf swig-3.0.12.tar.gz -# cd swig-3.0.12 -# ./configure -# make -# make install -# - name: Build tbapi python -# run: | -# make -C . -# cp ./dfp/lib/osx/64/libDecimalNative.dylib ./bin/release/darwin/x64/py${{ matrix.py_env }}/ -# otool -L ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so -# install_name_tool -change /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib/lib${{ matrix.py_lib }}.dylib @rpath/lib${{ matrix.py_lib }}.dylib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so -# otool -L ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so -# install_name_tool -add_rpath /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so -# install_name_tool -add_rpath /usr/local/opt/python@${{ matrix.py }}/Frameworks/Python.framework/Versions/${{ matrix.py }}/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so -# install_name_tool -add_rpath /Library/Frameworks/Python.framework/Versions/${{ matrix.py }}/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so -# otool -l ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so -# env: -# CC: clang -# OS: MACOS -# PYTHON_VERSION: ${{ matrix.py_env }} -# PYTHON_MACOS_HEADERS_PATH: /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/include/${{ matrix.py_lib }} -# PYTHON_MACOS_LIB_PATH: /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib -# PYTHON_MACOS_LIB: ${{ matrix.py_lib }} -# - name: Archive artifacts -# uses: actions/upload-artifact@v2 -# with: -# name: tbapi-python-macos -# path: | -# ./bin/release/__init__.py -# ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so -# ./bin/release/darwin/x64/py${{ matrix.py_env }}/libDecimalNative.dylib + build-macos: + runs-on: macos-11 + needs: [build-dxapi] + strategy: + matrix: + py: ['3.6', '3.7', '3.8', '3.9', '3.10'] + include: + - py: '3.6' + py_env: '36' + py_v: '3.6.15' + py_lib: 'python3.6m' + - py: '3.7' + py_env: '37' + py_v: '3.7.12' + py_lib: 'python3.7m' + - py: '3.8' + py_env: '38' + py_v: '3.8.12' + py_lib: 'python3.8' + - py: '3.9' + py_env: '39' + py_v: '3.9.10' + py_lib: 'python3.9' + - py: '3.10' + py_env: '310' + py_v: '3.10.2' + py_lib: 'python3.10' + steps: + - name: Check out repository code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: Download dxapi-macos artifacts + uses: actions/download-artifact@v2 + with: + name: dxapi-macos-11 + path: dxapi/bin + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.py_v }} + - name: Install SWIG + run: | + cd swigwin + tar -xzvf swig-3.0.12.tar.gz + cd swig-3.0.12 + ./configure + make + make install + - name: Build tbapi python + run: | + make -C . + cp ./dfp/lib/osx/64/libDecimalNative.dylib ./bin/release/darwin/x64/py${{ matrix.py_env }}/ + otool -L ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so + install_name_tool -change /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib/lib${{ matrix.py_lib }}.dylib @rpath/lib${{ matrix.py_lib }}.dylib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so + otool -L ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so + install_name_tool -add_rpath /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so + install_name_tool -add_rpath /usr/local/opt/python@${{ matrix.py }}/Frameworks/Python.framework/Versions/${{ matrix.py }}/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so + install_name_tool -add_rpath /Library/Frameworks/Python.framework/Versions/${{ matrix.py }}/lib ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so + otool -l ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so + env: + CC: clang + OS: MACOS + PYTHON_VERSION: ${{ matrix.py_env }} + PYTHON_MACOS_HEADERS_PATH: /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/include/${{ matrix.py_lib }} + PYTHON_MACOS_LIB_PATH: /Users/runner/hostedtoolcache/Python/${{ matrix.py_v }}/x64/lib + PYTHON_MACOS_LIB: ${{ matrix.py_lib }} + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: tbapi-python-macos + path: | + ./bin/release/__init__.py + ./bin/release/darwin/x64/py${{ matrix.py_env }}/_tbapi.so + ./bin/release/darwin/x64/py${{ matrix.py_env }}/libDecimalNative.dylib # Gather artifacts gather-artifacts: runs-on: ubuntu-20.04 - needs: [build-windows] # [build-linux, build-macos, build-windows] + needs: [build-macos, build-windows] #todo [build-linux, build-macos, build-windows] steps: - name: Check out repository code uses: actions/checkout@v2 @@ -255,11 +272,11 @@ jobs: with: name: tbapi-python-windows path: tbapi -# - name: Download tbapi-python-macos artifacts -# uses: actions/download-artifact@v2 -# with: -# name: tbapi-python-macos -# path: tbapi + - name: Download tbapi-python-macos artifacts + uses: actions/download-artifact@v2 + with: + name: tbapi-python-macos + path: tbapi - uses: actions/setup-python@v2 with: python-version: "3.10.2" @@ -322,7 +339,7 @@ jobs: # path: | # ./tests/reports - test-windows-smoke: + test-windows: runs-on: windows-2019 needs: [gather-artifacts] strategy: @@ -347,9 +364,10 @@ jobs: - name: Install and start TimeBase run: | cd tests/install - java -jar timebase-windows-installer-20220506.jar auto-install.xml + java -jar timebase-windows-installer-20220506.jar auto-install-windows.xml cd Timebase/bin Start-Process -FilePath "./tdbserver.cmd" -ArgumentList "-home ." + Start-Sleep 5 - name: Download tbapi-python artifacts uses: actions/download-artifact@v2 with: @@ -367,39 +385,62 @@ jobs: env: TIMEBASE_HOST: localhost TIMEBASE_PORT: 8011 + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: test-reports-tbapi-python-windows + path: | + ./tests/reports -# test-macos-smoke: -# runs-on: macos-11 -# needs: [gather-artifacts] -# strategy: -# matrix: -# py: ['3.6', '3.7', '3.8', '3.9', '3.10'] -# include: -# - py: '3.6' -# py_v: '3.6.15' -# - py: '3.7' -# py_v: '3.7.12' -# - py: '3.8' -# py_v: '3.8.12' -# - py: '3.9' -# py_v: '3.9.10' -# - py: '3.10' -# py_v: '3.10.2' -# steps: -# - name: Check out repository code -# uses: actions/checkout@v2 -# with: -# submodules: 'recursive' -# - name: Download tbapi-python artifacts -# uses: actions/download-artifact@v2 -# with: -# name: tbapi-python -# path: tests/tbapi -# - uses: actions/setup-python@v2 -# with: -# python-version: '${{ matrix.py_v }}' -# - name: Run tests -# run: | -# chmod -R 777 ./tests -# cd ./tests -# python -c "import tbapi; print(tbapi.version())" + test-macos-smoke: + runs-on: macos-11 + needs: [gather-artifacts] + strategy: + matrix: + py: ['3.6', '3.7', '3.8', '3.9', '3.10'] + include: + - py: '3.6' + py_v: '3.6.15' + - py: '3.7' + py_v: '3.7.12' + - py: '3.8' + py_v: '3.8.12' + - py: '3.9' + py_v: '3.9.10' + - py: '3.10' + py_v: '3.10.2' + steps: + - name: Check out repository code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: Setup java for TimeBase installer + uses: actions/setup-java@v1 + with: + java-version: '11' + - name: Download installer + uses: robinraju/release-downloader@v1.3 + with: + repository: "finos/TimeBase-CE" + tag: "6.1.7" + fileName: "timebase-linux-installer-20220506.jar" + out-file-path: "tests/install" + - name: Install and start TimeBase + run: | + cd tests/install + java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml + cd Timebase/bin + screen -dm ./tdbserver.sh -home . -port 8154 + - name: Download tbapi-python artifacts + uses: actions/download-artifact@v2 + with: + name: tbapi-python + path: tests/tbapi + - uses: actions/setup-python@v2 + with: + python-version: '${{ matrix.py_v }}' + - name: Run tests + run: | + chmod -R 777 ./tests + cd ./tests + python -c "import tbapi; print(tbapi.version())" diff --git a/tests/install/auto-install.xml b/tests/install/auto-install-macos.xml similarity index 100% rename from tests/install/auto-install.xml rename to tests/install/auto-install-macos.xml diff --git a/tests/install/auto-install-windows.xml b/tests/install/auto-install-windows.xml new file mode 100644 index 0000000..3c57d0d --- /dev/null +++ b/tests/install/auto-install-windows.xml @@ -0,0 +1,12 @@ + + + + + + D:/a/TimeBaseClientPython/TimeBaseClientPython/tests/install/Timebase + + + + + + From f324fe973dfb220a131a616925a1897faf85d0d2 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 17:02:27 +0300 Subject: [PATCH 10/27] windows tests pipeline --- tests/install/auto-install-macos.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/install/auto-install-macos.xml b/tests/install/auto-install-macos.xml index 3c57d0d..5095ce4 100644 --- a/tests/install/auto-install-macos.xml +++ b/tests/install/auto-install-macos.xml @@ -3,7 +3,7 @@ - D:/a/TimeBaseClientPython/TimeBaseClientPython/tests/install/Timebase + /Users/runner/work/TimeBaseClientPython/TimeBaseClientPython/tests/install/Timebase From 8203659d8ed7600a39462dc60ca3edfb3490cdcc Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 17:17:56 +0300 Subject: [PATCH 11/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 38df36e..324210b 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -26,23 +26,6 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' - - name: Setup java for TimeBase installer - uses: actions/setup-java@v1 - with: - java-version: '11' - - name: Download installer - uses: robinraju/release-downloader@v1.3 - with: - repository: "finos/TimeBase-CE" - tag: "6.1.7" - fileName: "timebase-linux-installer-20220506.jar" - out-file-path: "tests/install" - - name: Install and start TimeBase - run: | - cd tests/install - java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml - cd Timebase/bin - screen -dm ./tdbserver.sh -home . -port 8154 - name: Build Dxapi run: make -C ./dxapi/. env: @@ -444,3 +427,10 @@ jobs: chmod -R 777 ./tests cd ./tests python -c "import tbapi; print(tbapi.version())" + python TestAll.py + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: test-reports-tbapi-python-macos + path: | + ./tests/reports From 10a3e4dcd9295a10842ea95ebc60a6f6a44721d0 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 17:34:01 +0300 Subject: [PATCH 12/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 324210b..4eed9d0 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -379,6 +379,7 @@ jobs: runs-on: macos-11 needs: [gather-artifacts] strategy: + fail-fast: false matrix: py: ['3.6', '3.7', '3.8', '3.9', '3.10'] include: From c6312432b7f8a390788f7988d2944406c195d6ed Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 18:02:52 +0300 Subject: [PATCH 13/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 43 +++++++++++++++++------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 4eed9d0..f48b6bd 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -260,6 +260,12 @@ jobs: with: name: tbapi-python-macos path: tbapi + - name: Download installer + uses: robinraju/release-downloader@v1.3 + with: + repository: "finos/TimeBase-CE" + tag: "6.1.7" + fileName: "timebase-linux-installer-20220506.jar" - uses: actions/setup-python@v2 with: python-version: "3.10.2" @@ -278,6 +284,12 @@ jobs: name: tbapi-python path: | ./tbapi + - name: Archive artifacts installer (temp task) + uses: actions/upload-artifact@v2 + with: + name: linux-installer + path: | + ./timebase-linux-installer-20220506.jar # Tests # test-linux: @@ -318,7 +330,7 @@ jobs: # - name: Archive artifacts # uses: actions/upload-artifact@v2 # with: -# name: test-reports-tbapi-python-linux +# name: test-reports-tbapi-python-linux-${{ matrix.py }} # path: | # ./tests/reports @@ -371,7 +383,7 @@ jobs: - name: Archive artifacts uses: actions/upload-artifact@v2 with: - name: test-reports-tbapi-python-windows + name: test-reports-tbapi-python-windows-${{ matrix.py }} path: | ./tests/reports @@ -398,17 +410,22 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' - - name: Setup java for TimeBase installer - uses: actions/setup-java@v1 - with: - java-version: '11' - - name: Download installer - uses: robinraju/release-downloader@v1.3 +# - name: Setup java for TimeBase installer +# uses: actions/setup-java@v1 +# with: +# java-version: '11' +# - name: Download installer +# uses: robinraju/release-downloader@v1.3 +# with: +# repository: "finos/TimeBase-CE" +# tag: "6.1.7" +# fileName: "timebase-linux-installer-20220506.jar" +# out-file-path: "tests/install" + - name: Download linux-installer artifacts + uses: actions/download-artifact@v2 with: - repository: "finos/TimeBase-CE" - tag: "6.1.7" - fileName: "timebase-linux-installer-20220506.jar" - out-file-path: "tests/install" + name: linux-installer + path: tests/install - name: Install and start TimeBase run: | cd tests/install @@ -432,6 +449,6 @@ jobs: - name: Archive artifacts uses: actions/upload-artifact@v2 with: - name: test-reports-tbapi-python-macos + name: test-reports-tbapi-python-macos-${{ matrix.py }} path: | ./tests/reports From 196aba82df2d449c30980c0ab3ad22bbb5b3a144 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 18:54:17 +0300 Subject: [PATCH 14/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index f48b6bd..5dd895e 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -410,10 +410,10 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' -# - name: Setup java for TimeBase installer -# uses: actions/setup-java@v1 -# with: -# java-version: '11' + - name: Setup java for TimeBase installer + uses: actions/setup-java@v1 + with: + java-version: '11' # - name: Download installer # uses: robinraju/release-downloader@v1.3 # with: From 523113b8423e9c4bfb83f7c93a94100049395c20 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Tue, 10 May 2022 19:08:07 +0300 Subject: [PATCH 15/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 5dd895e..f1610be 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -431,7 +431,7 @@ jobs: cd tests/install java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml cd Timebase/bin - screen -dm ./tdbserver.sh -home . -port 8154 + screen -dm ./tdbserver.sh -home . -port 8011 - name: Download tbapi-python artifacts uses: actions/download-artifact@v2 with: From 67a8046f375771fe03e18be76c53a43ea2319347 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 10:22:31 +0300 Subject: [PATCH 16/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 46 +++++++++++++++++------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index f1610be..5605b19 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -291,6 +291,35 @@ jobs: path: | ./timebase-linux-installer-20220506.jar + download-installers: + runs-on: ubuntu-20.04 + needs: [ build-macos, build-windows ] #todo [build-linux, build-macos, build-windows] + steps: + - name: Download linux installer + uses: robinraju/release-downloader@v1.3 + with: + repository: "finos/TimeBase-CE" + tag: "6.1.7" + fileName: "timebase-linux-installer-20220506.jar" + - name: Download windows installer + uses: robinraju/release-downloader@v1.3 + with: + repository: "finos/TimeBase-CE" + tag: "6.1.7" + fileName: "timebase-windows-installer-20220506.jar" + - name: Archive artifacts installer + uses: actions/upload-artifact@v2 + with: + name: linux-installer + path: | + ./timebase-linux-installer-20220506.jar + - name: Archive artifacts installer + uses: actions/upload-artifact@v2 + with: + name: windows-installer + path: | + ./timebase-windows-installer-20220506.jar + # Tests # test-linux: # runs-on: ubuntu-20.04 @@ -349,13 +378,11 @@ jobs: uses: actions/setup-java@v1 with: java-version: '11' - - name: Download installer - uses: robinraju/release-downloader@v1.3 + - name: Download windows-installer artifacts + uses: actions/download-artifact@v2 with: - repository: "finos/TimeBase-CE" - tag: "6.1.7" - fileName: "timebase-windows-installer-20220506.jar" - out-file-path: "tests/install" + name: linux-installer + path: tests/install - name: Install and start TimeBase run: | cd tests/install @@ -414,13 +441,6 @@ jobs: uses: actions/setup-java@v1 with: java-version: '11' -# - name: Download installer -# uses: robinraju/release-downloader@v1.3 -# with: -# repository: "finos/TimeBase-CE" -# tag: "6.1.7" -# fileName: "timebase-linux-installer-20220506.jar" -# out-file-path: "tests/install" - name: Download linux-installer artifacts uses: actions/download-artifact@v2 with: From 401f8a69a61a4cd814f3acd1a1e20b0fb2fc7692 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 10:44:01 +0300 Subject: [PATCH 17/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 78 +++++++++++++++--------- 1 file changed, 48 insertions(+), 30 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 5605b19..f96344f 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -260,12 +260,6 @@ jobs: with: name: tbapi-python-macos path: tbapi - - name: Download installer - uses: robinraju/release-downloader@v1.3 - with: - repository: "finos/TimeBase-CE" - tag: "6.1.7" - fileName: "timebase-linux-installer-20220506.jar" - uses: actions/setup-python@v2 with: python-version: "3.10.2" @@ -291,34 +285,62 @@ jobs: path: | ./timebase-linux-installer-20220506.jar - download-installers: - runs-on: ubuntu-20.04 - needs: [ build-macos, build-windows ] #todo [build-linux, build-macos, build-windows] + install-windows-timebase: + runs-on: windows-2019 steps: - - name: Download linux installer - uses: robinraju/release-downloader@v1.3 + - name: Check out repository code + uses: actions/checkout@v2 with: - repository: "finos/TimeBase-CE" - tag: "6.1.7" - fileName: "timebase-linux-installer-20220506.jar" + submodules: 'recursive' - name: Download windows installer uses: robinraju/release-downloader@v1.3 with: repository: "finos/TimeBase-CE" tag: "6.1.7" fileName: "timebase-windows-installer-20220506.jar" + out-file-path: "tests/install" + - name: Setup java for TimeBase installer + uses: actions/setup-java@v1 + with: + java-version: '11' + - name: Install and start TimeBase + run: | + cd tests/install + java -jar timebase-windows-installer-20220506.jar auto-install-windows.xml - name: Archive artifacts installer uses: actions/upload-artifact@v2 with: - name: linux-installer + name: windows-timebase path: | - ./timebase-linux-installer-20220506.jar + ./tests/install/Timebase + + install-linux-timebase: + runs-on: windows-2019 + steps: + - name: Check out repository code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: Download linux installer + uses: robinraju/release-downloader@v1.3 + with: + repository: "finos/TimeBase-CE" + tag: "6.1.7" + fileName: "timebase-linux-installer-20220506.jar" + - name: Setup java for TimeBase installer + uses: actions/setup-java@v1 + with: + java-version: '11' + - name: Install and start TimeBase + run: | + cd tests/install + java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml - name: Archive artifacts installer uses: actions/upload-artifact@v2 with: - name: windows-installer + name: linux-timebase path: | - ./timebase-windows-installer-20220506.jar + ./tests/install/Timebase # Tests # test-linux: @@ -365,7 +387,7 @@ jobs: test-windows: runs-on: windows-2019 - needs: [gather-artifacts] + needs: [gather-artifacts, install-windows-timebase] strategy: matrix: py: ['3.6', '3.7', '3.8', '3.9', '3.10'] @@ -381,13 +403,11 @@ jobs: - name: Download windows-installer artifacts uses: actions/download-artifact@v2 with: - name: linux-installer - path: tests/install + name: windows-timebase + path: tests/install/Timebase - name: Install and start TimeBase run: | - cd tests/install - java -jar timebase-windows-installer-20220506.jar auto-install-windows.xml - cd Timebase/bin + cd tests/install/Timebase/bin Start-Process -FilePath "./tdbserver.cmd" -ArgumentList "-home ." Start-Sleep 5 - name: Download tbapi-python artifacts @@ -416,7 +436,7 @@ jobs: test-macos-smoke: runs-on: macos-11 - needs: [gather-artifacts] + needs: [gather-artifacts, download-installers] strategy: fail-fast: false matrix: @@ -444,13 +464,11 @@ jobs: - name: Download linux-installer artifacts uses: actions/download-artifact@v2 with: - name: linux-installer - path: tests/install + name: linux-timebase + path: tests/install/Timebase - name: Install and start TimeBase run: | - cd tests/install - java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml - cd Timebase/bin + cd tests/install/Timebase/bin screen -dm ./tdbserver.sh -home . -port 8011 - name: Download tbapi-python artifacts uses: actions/download-artifact@v2 From af493e132011343d6a3e0e21a3bdea6d7a60f9e3 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 10:44:52 +0300 Subject: [PATCH 18/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index f96344f..15076f3 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -434,9 +434,9 @@ jobs: path: | ./tests/reports - test-macos-smoke: + test-macos: runs-on: macos-11 - needs: [gather-artifacts, download-installers] + needs: [gather-artifacts, install-windows-timebase] strategy: fail-fast: false matrix: From cdcfbedb5ed2753c985bf72103b2820596ee923c Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 10:46:09 +0300 Subject: [PATCH 19/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 15076f3..13eb5bc 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -436,7 +436,7 @@ jobs: test-macos: runs-on: macos-11 - needs: [gather-artifacts, install-windows-timebase] + needs: [gather-artifacts, install-linux-timebase] strategy: fail-fast: false matrix: From 2e6865362224acae9b54778796e2aea38c97bd48 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 10:49:05 +0300 Subject: [PATCH 20/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 13eb5bc..5ef10f9 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -287,6 +287,7 @@ jobs: install-windows-timebase: runs-on: windows-2019 + needs: [build-windows] steps: - name: Check out repository code uses: actions/checkout@v2 @@ -315,7 +316,8 @@ jobs: ./tests/install/Timebase install-linux-timebase: - runs-on: windows-2019 + runs-on: ubuntu-20.04 + needs: [build-macos] # linux installer needs for macos tests steps: - name: Check out repository code uses: actions/checkout@v2 From 0e38a996ce9d186f565f4bb398380e8b63a56c8f Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 12:03:31 +0300 Subject: [PATCH 21/27] windows tests pipeline --- tests/install/auto-install-macos.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/install/auto-install-macos.xml b/tests/install/auto-install-macos.xml index 5095ce4..9c9603e 100644 --- a/tests/install/auto-install-macos.xml +++ b/tests/install/auto-install-macos.xml @@ -3,7 +3,7 @@ - /Users/runner/work/TimeBaseClientPython/TimeBaseClientPython/tests/install/Timebase + /home/runner/work/TimeBaseClientPython/TimeBaseClientPython/tests/install/Timebase From 3ff118c798bce4ef680be14e623342986c8e70a6 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 12:20:50 +0300 Subject: [PATCH 22/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 5ef10f9..bec454d 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -329,6 +329,7 @@ jobs: repository: "finos/TimeBase-CE" tag: "6.1.7" fileName: "timebase-linux-installer-20220506.jar" + out-file-path: "tests/install" - name: Setup java for TimeBase installer uses: actions/setup-java@v1 with: From a393a69908a6bfe4f4eeb0847371fcd36d9b65a9 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 12:42:46 +0300 Subject: [PATCH 23/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 75 +++++++++--------------- 1 file changed, 27 insertions(+), 48 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index bec454d..bcd72e8 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -278,58 +278,27 @@ jobs: name: tbapi-python path: | ./tbapi - - name: Archive artifacts installer (temp task) - uses: actions/upload-artifact@v2 - with: - name: linux-installer - path: | - ./timebase-linux-installer-20220506.jar - install-windows-timebase: - runs-on: windows-2019 - needs: [build-windows] + download-timebase-installer: + runs-on: ubuntu-20.04 + needs: [build-macos, build-windows] # linux installer needs for macos tests steps: - name: Check out repository code uses: actions/checkout@v2 with: submodules: 'recursive' - - name: Download windows installer + - name: Download linux installer uses: robinraju/release-downloader@v1.3 with: repository: "finos/TimeBase-CE" tag: "6.1.7" - fileName: "timebase-windows-installer-20220506.jar" - out-file-path: "tests/install" - - name: Setup java for TimeBase installer - uses: actions/setup-java@v1 - with: - java-version: '11' - - name: Install and start TimeBase - run: | - cd tests/install - java -jar timebase-windows-installer-20220506.jar auto-install-windows.xml - - name: Archive artifacts installer - uses: actions/upload-artifact@v2 - with: - name: windows-timebase - path: | - ./tests/install/Timebase - - install-linux-timebase: - runs-on: ubuntu-20.04 - needs: [build-macos] # linux installer needs for macos tests - steps: - - name: Check out repository code - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: Download linux installer + fileName: "timebase-linux-installer-20220506.jar" + - name: Download windows installer uses: robinraju/release-downloader@v1.3 with: repository: "finos/TimeBase-CE" tag: "6.1.7" - fileName: "timebase-linux-installer-20220506.jar" - out-file-path: "tests/install" + fileName: "timebase-windows-installer-20220506.jar" - name: Setup java for TimeBase installer uses: actions/setup-java@v1 with: @@ -338,12 +307,18 @@ jobs: run: | cd tests/install java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml + - name: Archive artifacts installer (temp task) + uses: actions/upload-artifact@v2 + with: + name: timebase-linux-installer + path: | + ./timebase-linux-installer-20220506.jar - name: Archive artifacts installer uses: actions/upload-artifact@v2 with: - name: linux-timebase + name: timebase-windows-installer path: | - ./tests/install/Timebase + ./timebase-windows-installer-20220506.jar # Tests # test-linux: @@ -390,7 +365,7 @@ jobs: test-windows: runs-on: windows-2019 - needs: [gather-artifacts, install-windows-timebase] + needs: [gather-artifacts, download-timebase-installer] strategy: matrix: py: ['3.6', '3.7', '3.8', '3.9', '3.10'] @@ -406,11 +381,13 @@ jobs: - name: Download windows-installer artifacts uses: actions/download-artifact@v2 with: - name: windows-timebase - path: tests/install/Timebase + name: timebase-windows-installer + path: tests/install - name: Install and start TimeBase run: | - cd tests/install/Timebase/bin + cd tests/install + java -jar timebase-windows-installer-20220506.jar auto-install-windows.xml + cd Timebase/bin Start-Process -FilePath "./tdbserver.cmd" -ArgumentList "-home ." Start-Sleep 5 - name: Download tbapi-python artifacts @@ -439,7 +416,7 @@ jobs: test-macos: runs-on: macos-11 - needs: [gather-artifacts, install-linux-timebase] + needs: [gather-artifacts, download-timebase-installer] strategy: fail-fast: false matrix: @@ -467,11 +444,13 @@ jobs: - name: Download linux-installer artifacts uses: actions/download-artifact@v2 with: - name: linux-timebase - path: tests/install/Timebase + name: timebase-linux-installer + path: tests/install - name: Install and start TimeBase run: | - cd tests/install/Timebase/bin + cd tests/install + java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml + cd Timebase/bin screen -dm ./tdbserver.sh -home . -port 8011 - name: Download tbapi-python artifacts uses: actions/download-artifact@v2 From 54c0ec597d42e76047d613805d1a4cacbf6ae41a Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 12:51:11 +0300 Subject: [PATCH 24/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 30 ++++++++++-------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index bcd72e8..32be8d0 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -10,7 +10,11 @@ on: types: [opened, synchronize] branches: - "*" - + +env: + TIMEBASE_INSTALLER_TAG: 6.1.7 + TIMEBASE_INSTALLER_VERSION: 20220506 + jobs: # build dxapi build-dxapi: @@ -291,34 +295,26 @@ jobs: uses: robinraju/release-downloader@v1.3 with: repository: "finos/TimeBase-CE" - tag: "6.1.7" - fileName: "timebase-linux-installer-20220506.jar" + tag: $TIMEBASE_INSTALLER_TAG + fileName: "timebase-linux-installer-$TIMEBASE_INSTALLER_VERSION.jar" - name: Download windows installer uses: robinraju/release-downloader@v1.3 with: repository: "finos/TimeBase-CE" - tag: "6.1.7" - fileName: "timebase-windows-installer-20220506.jar" - - name: Setup java for TimeBase installer - uses: actions/setup-java@v1 - with: - java-version: '11' - - name: Install and start TimeBase - run: | - cd tests/install - java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml + tag: $TIMEBASE_INSTALLER_TAG + fileName: "timebase-windows-installer-$TIMEBASE_INSTALLER_VERSION.jar" - name: Archive artifacts installer (temp task) uses: actions/upload-artifact@v2 with: name: timebase-linux-installer path: | - ./timebase-linux-installer-20220506.jar + ./timebase-linux-installer-$TIMEBASE_INSTALLER_VERSION.jar - name: Archive artifacts installer uses: actions/upload-artifact@v2 with: name: timebase-windows-installer path: | - ./timebase-windows-installer-20220506.jar + ./timebase-windows-installer-$TIMEBASE_INSTALLER_VERSION.jar # Tests # test-linux: @@ -386,7 +382,7 @@ jobs: - name: Install and start TimeBase run: | cd tests/install - java -jar timebase-windows-installer-20220506.jar auto-install-windows.xml + java -jar timebase-windows-installer-$TIMEBASE_INSTALLER_VERSION.jar auto-install-windows.xml cd Timebase/bin Start-Process -FilePath "./tdbserver.cmd" -ArgumentList "-home ." Start-Sleep 5 @@ -449,7 +445,7 @@ jobs: - name: Install and start TimeBase run: | cd tests/install - java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml + java -jar timebase-linux-installer-$TIMEBASE_INSTALLER_VERSION.jar auto-install-macos.xml cd Timebase/bin screen -dm ./tdbserver.sh -home . -port 8011 - name: Download tbapi-python artifacts From 2bf555bd714c8bbdae2dfdeae212a98dbdb2edd7 Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 13:00:12 +0300 Subject: [PATCH 25/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 32be8d0..4080edb 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -11,10 +11,6 @@ on: branches: - "*" -env: - TIMEBASE_INSTALLER_TAG: 6.1.7 - TIMEBASE_INSTALLER_VERSION: 20220506 - jobs: # build dxapi build-dxapi: @@ -295,26 +291,26 @@ jobs: uses: robinraju/release-downloader@v1.3 with: repository: "finos/TimeBase-CE" - tag: $TIMEBASE_INSTALLER_TAG - fileName: "timebase-linux-installer-$TIMEBASE_INSTALLER_VERSION.jar" + tag: "6.1.7" + fileName: "timebase-linux-installer-20220506.jar" - name: Download windows installer uses: robinraju/release-downloader@v1.3 with: repository: "finos/TimeBase-CE" - tag: $TIMEBASE_INSTALLER_TAG - fileName: "timebase-windows-installer-$TIMEBASE_INSTALLER_VERSION.jar" + tag: "6.1.7" + fileName: "timebase-windows-installer-20220506.jar" - name: Archive artifacts installer (temp task) uses: actions/upload-artifact@v2 with: name: timebase-linux-installer path: | - ./timebase-linux-installer-$TIMEBASE_INSTALLER_VERSION.jar + ./timebase-linux-installer-20220506.jar - name: Archive artifacts installer uses: actions/upload-artifact@v2 with: name: timebase-windows-installer path: | - ./timebase-windows-installer-$TIMEBASE_INSTALLER_VERSION.jar + ./timebase-windows-installer-20220506.jar # Tests # test-linux: @@ -382,7 +378,7 @@ jobs: - name: Install and start TimeBase run: | cd tests/install - java -jar timebase-windows-installer-$TIMEBASE_INSTALLER_VERSION.jar auto-install-windows.xml + java -jar timebase-windows-installer-20220506.jar auto-install-windows.xml cd Timebase/bin Start-Process -FilePath "./tdbserver.cmd" -ArgumentList "-home ." Start-Sleep 5 @@ -445,7 +441,7 @@ jobs: - name: Install and start TimeBase run: | cd tests/install - java -jar timebase-linux-installer-$TIMEBASE_INSTALLER_VERSION.jar auto-install-macos.xml + java -jar timebase-linux-installer-20220506.jar auto-install-macos.xml cd Timebase/bin screen -dm ./tdbserver.sh -home . -port 8011 - name: Download tbapi-python artifacts From e472576cd87f1ddf47c7fe913a1d9da5839a404b Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 13:12:42 +0300 Subject: [PATCH 26/27] windows tests pipeline --- tests/install/auto-install-macos.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/install/auto-install-macos.xml b/tests/install/auto-install-macos.xml index 9c9603e..5095ce4 100644 --- a/tests/install/auto-install-macos.xml +++ b/tests/install/auto-install-macos.xml @@ -3,7 +3,7 @@ - /home/runner/work/TimeBaseClientPython/TimeBaseClientPython/tests/install/Timebase + /Users/runner/work/TimeBaseClientPython/TimeBaseClientPython/tests/install/Timebase From 2ed6364994b0fcabd994eb83221456e3b35a326f Mon Sep 17 00:00:00 2001 From: Romkisel Date: Wed, 11 May 2022 13:27:17 +0300 Subject: [PATCH 27/27] windows tests pipeline --- .github/workflows/dxapi-python-build.yml | 206 +++++++++++------------ 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/.github/workflows/dxapi-python-build.yml b/.github/workflows/dxapi-python-build.yml index 4080edb..589d534 100644 --- a/.github/workflows/dxapi-python-build.yml +++ b/.github/workflows/dxapi-python-build.yml @@ -17,7 +17,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-11] #todo [ubuntu-20.04, macos-11] + os: [ubuntu-20.04, macos-11] include: - os: macos-11 env_os: MACOS @@ -55,61 +55,61 @@ jobs: path: ./dxapi/bin/dxapi-x64.lib # build tbapi python -# build-linux: -# runs-on: ubuntu-20.04 -# needs: [build-dxapi] -# strategy: -# matrix: -# py: ['3.6', '3.7', '3.8', '3.9', '3.10'] -# include: -# - py: '3.6' -# py_env: '36' -# - py: '3.7' -# py_env: '37' -# - py: '3.8' -# py_env: '38' -# - py: '3.9' -# py_env: '39' -# - py: '3.10' -# py_env: '310' -# steps: -# - name: Check out repository code -# uses: actions/checkout@v2 -# with: -# submodules: 'recursive' -# - name: Download dxapi-linux artifacts -# uses: actions/download-artifact@v2 -# with: -# name: dxapi-ubuntu-20.04 -# path: dxapi/bin -# - name: install dev python 3.8, 3.9 -# if: ${{ matrix.py == '3.8' || matrix.py == '3.9' }} -# run: | -# sudo apt-get update -# sudo apt install -y python${{ matrix.py }}-dev -# - name: install dev python 3.6, 3.7, 3.10 -# if: ${{ matrix.py == '3.6' || matrix.py == '3.7' || matrix.py == '3.10' }} -# run: | -# sudo apt-get update -# sudo apt-get install -yq software-properties-common -# sudo add-apt-repository ppa:deadsnakes/ppa -# sudo apt-get update -# sudo apt-get install python${{ matrix.py }}-dev -# - name: Build Tbapi python -# run: | -# make -C . -# cp ./dfp/lib/linux/64/libDecimalNative.so ./bin/release/linux/x64/py${{ matrix.py_env }}/ -# env: -# CC: clang -# PYTHON_VERSION: ${{ matrix.py_env }} -# - name: Archive artifacts -# uses: actions/upload-artifact@v2 -# with: -# name: tbapi-python-linux -# path: | -# ./bin/release/__init__.py -# ./bin/release/linux/x64/py${{ matrix.py_env }}/_tbapi.so -# ./bin/release/linux/x64/py${{ matrix.py_env }}/libDecimalNative.so + build-linux: + runs-on: ubuntu-20.04 + needs: [build-dxapi] + strategy: + matrix: + py: ['3.6', '3.7', '3.8', '3.9', '3.10'] + include: + - py: '3.6' + py_env: '36' + - py: '3.7' + py_env: '37' + - py: '3.8' + py_env: '38' + - py: '3.9' + py_env: '39' + - py: '3.10' + py_env: '310' + steps: + - name: Check out repository code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: Download dxapi-linux artifacts + uses: actions/download-artifact@v2 + with: + name: dxapi-ubuntu-20.04 + path: dxapi/bin + - name: install dev python 3.8, 3.9 + if: ${{ matrix.py == '3.8' || matrix.py == '3.9' }} + run: | + sudo apt-get update + sudo apt install -y python${{ matrix.py }}-dev + - name: install dev python 3.6, 3.7, 3.10 + if: ${{ matrix.py == '3.6' || matrix.py == '3.7' || matrix.py == '3.10' }} + run: | + sudo apt-get update + sudo apt-get install -yq software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.py }}-dev + - name: Build Tbapi python + run: | + make -C . + cp ./dfp/lib/linux/64/libDecimalNative.so ./bin/release/linux/x64/py${{ matrix.py_env }}/ + env: + CC: clang + PYTHON_VERSION: ${{ matrix.py_env }} + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: tbapi-python-linux + path: | + ./bin/release/__init__.py + ./bin/release/linux/x64/py${{ matrix.py_env }}/_tbapi.so + ./bin/release/linux/x64/py${{ matrix.py_env }}/libDecimalNative.so build-windows: runs-on: windows-2019 @@ -241,15 +241,15 @@ jobs: # Gather artifacts gather-artifacts: runs-on: ubuntu-20.04 - needs: [build-macos, build-windows] #todo [build-linux, build-macos, build-windows] + needs: [build-linux, build-macos, build-windows] steps: - name: Check out repository code uses: actions/checkout@v2 -# - name: Download tbapi-python-linux artifacts -# uses: actions/download-artifact@v2 -# with: -# name: tbapi-python-linux -# path: tbapi + - name: Download tbapi-python-linux artifacts + uses: actions/download-artifact@v2 + with: + name: tbapi-python-linux + path: tbapi - name: Download tbapi-python-windows artifacts uses: actions/download-artifact@v2 with: @@ -313,47 +313,47 @@ jobs: ./timebase-windows-installer-20220506.jar # Tests -# test-linux: -# runs-on: ubuntu-20.04 -# needs: [gather-artifacts] -# strategy: -# matrix: -# py: ['3.6', '3.7', '3.8', '3.9', '3.10'] -# services: -# timebase: -# image: finos/timebase-ce-server:6.1 -# env: -# JAVA_OPTS: "-DQuantServer.enableRemoteMonitoring=true -DTimeBase.version=5.0" -# ports: -# - 8011:8011 -# steps: -# - name: Check out repository code -# uses: actions/checkout@v2 -# with: -# submodules: 'recursive' -# - name: Download tbapi-python artifacts -# uses: actions/download-artifact@v2 -# with: -# name: tbapi-python -# path: tests/tbapi -# - uses: actions/setup-python@v2 -# with: -# python-version: '${{ matrix.py }}' -# - name: Run tests -# run: | -# chmod -R 777 ./tests -# cd ./tests -# python -c "import tbapi; print(tbapi.version())" -# python TestAll.py -# env: -# TIMEBASE_HOST: localhost -# TIMEBASE_PORT: 8011 -# - name: Archive artifacts -# uses: actions/upload-artifact@v2 -# with: -# name: test-reports-tbapi-python-linux-${{ matrix.py }} -# path: | -# ./tests/reports + test-linux: + runs-on: ubuntu-20.04 + needs: [gather-artifacts] + strategy: + matrix: + py: ['3.6', '3.7', '3.8', '3.9', '3.10'] + services: + timebase: + image: finos/timebase-ce-server:6.1 + env: + JAVA_OPTS: "-DQuantServer.enableRemoteMonitoring=true -DTimeBase.version=5.0" + ports: + - 8011:8011 + steps: + - name: Check out repository code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: Download tbapi-python artifacts + uses: actions/download-artifact@v2 + with: + name: tbapi-python + path: tests/tbapi + - uses: actions/setup-python@v2 + with: + python-version: '${{ matrix.py }}' + - name: Run tests + run: | + chmod -R 777 ./tests + cd ./tests + python -c "import tbapi; print(tbapi.version())" + python TestAll.py + env: + TIMEBASE_HOST: localhost + TIMEBASE_PORT: 8011 + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: test-reports-tbapi-python-linux-${{ matrix.py }} + path: | + ./tests/reports test-windows: runs-on: windows-2019