Skip to content

iotdb 每日发布 #483

iotdb 每日发布

iotdb 每日发布 #483

Workflow file for this run

# Build iotdb-rel/0.13, iotdb-rel/1.0, master, iot-benchmark
# Everyday
name: iotdb 每日发布
on:
# push:
# branches:
# - master
schedule:
- cron: "0 12 * * *"
workflow_dispatch:
jobs:
collect:
runs-on: ubuntu-latest
outputs:
date: ${{steps.sys-info.outputs.date}}
steps:
- name: collect common info
shell: bash
id: sys-info
run: echo "::set-output name=date::$(date +"%Y-%m-%d")"
#----start----
create-release-java8:
needs: collect
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- name: Create release java-8
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.collect.outputs.date }}-java8-apache-iotdb
release_name: ${{ needs.collect.outputs.date }} java8 apache iotdb
body: java 8
draft: false
prerelease: false
#----end----
#----start----
create-release-java11:
runs-on: ubuntu-latest
needs: collect
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- name: Create release java-11
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.collect.outputs.date }}-java11-apache-iotdb
release_name: ${{ needs.collect.outputs.date }} java11 apache iotdb
body: java 11
draft: false
prerelease: false
#----end----
#----start----
build-in-win:
needs: [ collect,create-release-java8,create-release-java11 ]
strategy:
fail-fast: false
max-parallel: 20
matrix:
iotdb_version: [ rel/0.13,rel/1.1,rel/1.2,master ]
java_version: [ 8,11 ]
os: [ windows-2022 ]
runs-on: ${{ matrix.os }}
steps:
- name: Set java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java_version }}
- name: download & unpack & install -> boost
shell: cmd
run: |
C:\msys64\usr\bin\wget.exe -O ${{ github.workspace }}/boost_1_78_0-bin.7z https://github.com/xiaoyekanren/iotdb-daily-build-dependence/releases/download/release-depend-bin/boost_1_78_0-bin.7z
7z x ${{ github.workspace }}/boost_1_78_0-bin.7z -o${{ github.workspace }}/boost_1_78_0
# C:\msys64\usr\bin\wget.exe -O ${{ github.workspace }}/boost_1_78_0.zip https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip
# 7z x ${{ github.workspace }}/boost_1_78_0.zip -o${{ github.workspace }}/boost_1_78_0
# cd ${{ github.workspace }}/boost_1_78_0/boost_1_78_0
# .\bootstrap.bat
# .\b2
# echo "::set-output name=include::$(git branch |grep ^*|cut -d ' ' -f 2)"
# echo "::set-output name=library::$(git branch |grep ^*|cut -d ' ' -f 2)"
- name: download & unpack flex&bison
shell: cmd
run: |
C:\msys64\usr\bin\wget.exe -O ${{ github.workspace }}/win_flex_bison-latest.zip https://jaist.dl.sourceforge.net/project/winflexbison/win_flex_bison-latest.zip
7z x ${{ github.workspace }}/win_flex_bison-latest.zip -o${{ github.workspace }}/win_flex_bison-latest
- name: install openssl
run: |
choco install openssl
- name: Checkout apache/iotdb
uses: actions/checkout@v2
with:
path: iotdb
repository: 'apache/iotdb'
ref: ${{ matrix.iotdb_version }}
fetch-depth: 0
- name: Collect IoTDB info
id: iotdb-info
shell: bash
run: |
cd iotdb
echo "::set-output name=commit::$(git rev-parse --short HEAD)"
echo "::set-output name=branch::$(git branch |grep ^*|cut -d ' ' -f 2)"
echo "::set-output name=version::$(cat pom.xml | grep -e '^ <version>' | sed 's# ##g' | sed 's#<version>##g' | sed 's#</version>##g')"
# To distinguish master and rel/1.0 branches, add temporary variables
echo "::set-output name=matrix_version::$(echo ${{ matrix.iotdb_version }} | sed "s:/::")"
if [ "${{ matrix.java_version }}" = "8" ]; then
echo "upload_url=${{ needs.create-release-java8.outputs.upload_url }}" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.java_version }}" = "11" ]; then
echo "upload_url=${{ needs.create-release-java11.outputs.upload_url }}" >> "$GITHUB_OUTPUT"
else
echo "Found unknown jdk version. exit."
exit 1
fi
if [ "${{ matrix.iotdb_version }}" = "master" ]; then
echo "server_dir=iotdb-core/datanode" >> "$GITHUB_OUTPUT"
echo "cpp_dir=iotdb-client/client-cpp" >> "$GITHUB_OUTPUT"
echo "cmake_root_dir=${{ github.workspace }}\iotdb\iotdb-client\compile-tools\thrift\target\cmake-3.23.1-windows-x86_64" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.iotdb_version }}" = "rel/1.2" ]; then
echo "server_dir=iotdb-core/datanode" >> "$GITHUB_OUTPUT"
echo "cpp_dir=iotdb-client/client-cpp" >> "$GITHUB_OUTPUT"
echo "cmake_root_dir=${{ github.workspace }}\iotdb\iotdb-client\compile-tools\thrift\target\cmake-3.23.1-windows-x86_64" >> "$GITHUB_OUTPUT"
else
echo "server_dir=server" >> "$GITHUB_OUTPUT"
echo "cpp_dir=client-cpp" >> "$GITHUB_OUTPUT"
echo "cmake_root_dir=${{ github.workspace }}\iotdb\compile-tools\thrift\target\cmake-3.23.1-windows-x86_64" >> "$GITHUB_OUTPUT"
fi
# build client-cpp
- name: Build client-cpp
if: ${{ matrix.os == 'windows-2022' }}
shell: cmd
env:
boost-include-dir: ${{ github.workspace }}\boost_1_78_0\boost_1_78_0
boost-library.dir: ${{ github.workspace }}\boost_1_78_0\boost_1_78_0\stage\lib
cmake-url: https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-windows-x86_64.zip
run: |
cd ${{ github.workspace }}\iotdb
set Path=%Path%;${{ github.workspace }}\win_flex_bison-latest
set Path
mvn package -Dcmake.generator="Visual Studio 17 2022" -P compile-cpp -pl ${{ steps.iotdb-info.outputs.server_dir }},${{ steps.iotdb-info.outputs.cpp_dir }},example/client-cpp-example -am -DskipTests -Dboost.include.dir="%boost-include-dir%" -Dboost.library.dir="%boost-library.dir%" -Dcmake.url="%cmake-url%" -Dcmake.root.dir="${{ steps.iotdb-info.outputs.cmake_root_dir }}"
#
# upload client-cpp
- name: apache-iotdb-client-cpp-x86_64-${{ matrix.os }}-${{ steps.iotdb-info.outputs.branch }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.commit }}.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.iotdb-info.outputs.upload_url }}
asset_path: ${{ github.workspace }}/iotdb/${{ steps.iotdb-info.outputs.cpp_dir }}/target/client-cpp-${{ steps.iotdb-info.outputs.version }}-cpp-windows-x86_64.zip
asset_name: apache-iotdb-client-cpp-x86_64-${{ matrix.os }}-${{ steps.iotdb-info.outputs.branch }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.commit }}.zip
asset_content_type: application/zip
#
# build client-cpp-example
- name: compress client-cpp-example
shell: bash
run: |
cd iotdb/example/client-cpp-example/target
7z a client-cpp-example-${{ steps.iotdb-info.outputs.version }}-cpp-windows-x86_64.zip client CMakeLists.txt SessionExample.cpp
#
# upload client-cpp-example
- name: Upload apache-iotdb-client-cpp-example-x86_64-${{ matrix.os }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.matrix_version }}-${{ steps.iotdb-info.outputs.commit }}.zip using ${{ matrix.java_version }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.iotdb-info.outputs.upload_url }}
asset_path: ${{ github.workspace }}/iotdb/example/client-cpp-example/target/client-cpp-example-${{ steps.iotdb-info.outputs.version }}-cpp-windows-x86_64.zip
asset_name: apache-iotdb-client-cpp-example-x86_64-${{ matrix.os }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.matrix_version }}-${{ steps.iotdb-info.outputs.commit }}.zip
asset_content_type: application/zip
#
#----end----
#----start----
build-in-linux:
needs: [ collect,create-release-java8,create-release-java11 ]
strategy:
fail-fast: false
max-parallel: 20
matrix:
iotdb_version: [ rel/0.13,rel/1.1,rel/1.2,master ]
java_version: [ 8,11 ]
runs-on: ubuntu-latest
steps:
- name: Set java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java_version }}
- name: Checkout apache/iotdb
uses: actions/checkout@v2
with:
path: iotdb
repository: 'apache/iotdb'
ref: ${{ matrix.iotdb_version }}
fetch-depth: 0
#collect-iotdb
- name: Collect IoTDB info
id: iotdb-info
run: |
sudo apt-get install python3-pip
pip3 install setuptools
pip3 install wheel
cd ${{ github.workspace }}/iotdb
echo "::set-output name=commit::$(git rev-parse --short HEAD)"
echo "::set-output name=branch::$(git branch |grep ^*|cut -d ' ' -f 2|sed "s:/:-:")"
echo "::set-output name=version::$(cat pom.xml | grep -e '^ <version>' | sed 's# ##g' | sed 's#<version>##g' | sed 's#</version>##g')"
# To distinguish master and rel/1.0 branches, add temporary variables
echo "::set-output name=matrix_version::$(echo ${{ matrix.iotdb_version }} | sed "s:/::")"
if [ "${{ matrix.java_version }}" = "8" ]; then
echo "upload_url=${{ needs.create-release-java8.outputs.upload_url }}" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.java_version }}" = "11" ]; then
echo "upload_url=${{ needs.create-release-java11.outputs.upload_url }}" >> "$GITHUB_OUTPUT"
else
echo "Found unknown jdk version. exit."
exit 1
fi
if [ "${{ matrix.iotdb_version }}" = "master" ]; then
echo "client_jdbc_module=iotdb-client/jdbc" >> "$GITHUB_OUTPUT"
echo "client_py_module=iotdb-client/client-py" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.iotdb_version }}" = "rel/1.2" ]; then
echo "client_jdbc_module=iotdb-client/jdbc" >> "$GITHUB_OUTPUT"
echo "client_py_module=iotdb-client/client-py" >> "$GITHUB_OUTPUT"
else
echo "client_jdbc_module=jdbc" >> "$GITHUB_OUTPUT"
echo "client_py_module=client-py" >> "$GITHUB_OUTPUT"
fi
#
#build-iotdb
- name: Build iotdb
shell: bash
run: |
cd ${{ github.workspace }}/iotdb
mvn clean package -DskipTests -am -pl ${{ steps.iotdb-info.outputs.client_jdbc_module }},${{ steps.iotdb-info.outputs.client_py_module }},distribution -P get-jar-with-dependencies,compile-grafana-plugin
#
#upload-all
- name: Upload apache-iotdb-all-bin-${{ steps.iotdb-info.outputs.branch }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.commit }}.zip using ${{ matrix.java_version }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.iotdb-info.outputs.upload_url }}
asset_path: ${{ github.workspace }}/iotdb/distribution/target/apache-iotdb-${{ steps.iotdb-info.outputs.version }}-all-bin.zip
asset_name: apache-iotdb-all-bin-${{ steps.iotdb-info.outputs.branch }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.commit }}.zip
asset_content_type: application/zip
#
#grafana-plugin
- name: Upload apache-iotdb-grafana-plugin-bin-${{ steps.iotdb-info.outputs.branch }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.commit }}.zip using ${{ matrix.java_version }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.iotdb-info.outputs.upload_url }}
asset_path: ${{ github.workspace }}/iotdb/distribution/target/apache-iotdb-${{ steps.iotdb-info.outputs.version }}-grafana-plugin-bin.zip
asset_name: apache-iotdb-grafana-plugin-bin-${{ steps.iotdb-info.outputs.branch }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.commit }}.zip
asset_content_type: application/zip
#
#iotdb-jdbc-*-jar-with-dependencies.jar
- name: Upload apache-iotdb-jdbc-${{ steps.iotdb-info.outputs.branch }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.commit }}-jar-with-dependencies.jar using ${{ matrix.java_version }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.iotdb-info.outputs.upload_url }}
asset_path: ${{ github.workspace }}/iotdb/${{ steps.iotdb-info.outputs.client_jdbc_module }}/target/iotdb-jdbc-${{ steps.iotdb-info.outputs.version }}-jar-with-dependencies.jar
asset_name: apache-iotdb-jdbc-${{ steps.iotdb-info.outputs.branch }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.commit }}-jar-with-dependencies.jar
asset_content_type: application/zip
#
#client-py
- name: Build Apache IoTDB client-py in ${{ matrix.iotdb_version }} using ${{ matrix.java_version }}
shell: bash
id: build-py-client
run: |
cd ${{ github.workspace }}/iotdb/${{ steps.iotdb-info.outputs.client_py_module }}
rm -rf dist
python3 setup.py bdist_wheel --universal
cd dist
echo "client_py_whl_name=$(ls apache_iotdb-*.whl)" >> "$GITHUB_OUTPUT"
- name: Upload apache_iotdb-${{ steps.iotdb-info.outputs.branch }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.commit }}-py2.py3-none-any.whl using ${{ matrix.java_version }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.iotdb-info.outputs.upload_url }}
asset_path: ${{ github.workspace }}/iotdb/${{ steps.iotdb-info.outputs.client_py_module }}/dist/${{ steps.build-py-client.outputs.client_py_whl_name }}
asset_name: apache_iotdb-${{ steps.iotdb-info.outputs.branch }}-${{ steps.iotdb-info.outputs.version }}-${{ steps.iotdb-info.outputs.commit }}-py2.py3-none-any.whl
asset_content_type: application/zip
#
#----end----
#----start----
build-benchmark:
needs: [ collect,create-release-java8,create-release-java11 ]
strategy:
fail-fast: false
max-parallel: 20
matrix:
java_version: [ 8,11 ]
release_db: [ iotdb-0.13,iotdb-1.0,iotdb-1.1,influxdb,influxdb-2.0,timescaledb,timescaledb-cluster,tdengine-3.0 ]
runs-on: ubuntu-latest
steps:
# set java
- name: Set java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java_version }}
#
## build iotdb
# - name: Checkout iotdb
# if: ${{ matrix.release_db == 'iotdb-1.1' }}
# uses: actions/checkout@v2
# with:
# path: iotdb-1.0
# repository: 'apache/iotdb'
# ref: rel/1.0
# fetch-depth: 0
# - name: build iotdb
# run: |
# cd ${{ github.workspace }}/iotdb-1.0
# mvn install -DskipTests -am -pl jdbc,session
##
# clone iot-benchmark
- name: Checkout iot-benchmark
uses: actions/checkout@v2
with:
path: iot-benchmark
repository: 'thulab/iot-benchmark'
ref: master
fetch-depth: 0
- name: Collect benchmark info
id: benchmark-info
run: |
cd ${{ github.workspace }}/iot-benchmark
echo "::set-output name=commit::$(git rev-parse --short HEAD)"
if [ "${{ matrix.java_version }}" = "8" ]; then
echo "upload_url=${{ needs.create-release-java8.outputs.upload_url }}" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.java_version }}" = "11" ]; then
echo "upload_url=${{ needs.create-release-java11.outputs.upload_url }}" >> "$GITHUB_OUTPUT"
else
echo "Found unknown jdk version. exit."
exit 1
fi
#
# build iot-benchmark
- name: Build benchmark
run: |
cd ${{ github.workspace }}/iot-benchmark
mvn clean package -DskipTests -am -pl core,${{ matrix.release_db }}
#
#---upload
- name: Upload iot-benchmark-${{ matrix.release_db }}-${{ steps.benchmark-info.outputs.commit }}.zip using ${{ matrix.java_version }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.benchmark-info.outputs.upload_url }}
asset_path: ${{ github.workspace }}/iot-benchmark/${{ matrix.release_db }}/target/iot-benchmark-${{ matrix.release_db }}.zip
asset_name: iot-benchmark-${{ matrix.release_db }}-${{ steps.benchmark-info.outputs.commit }}.zip
asset_content_type: application/zip
#
#----end----