From aa2a8035f3c64e68a32d668deeb3fef65b6493e4 Mon Sep 17 00:00:00 2001 From: xiaoyekanren <876670773@qq.com> Date: Mon, 9 Oct 2023 15:35:48 +0800 Subject: [PATCH] Revert "Revert "modify used on upload-zip job"" This reverts commit 03cb7693c5ec986cbfe8ec0accabb9871f53ec9c. --- .github/workflows/main.yml | 89 +++++++++++++++++++++----------------- README.md | 2 +- order.md | 10 +++++ release_history.txt | 1 + 4 files changed, 61 insertions(+), 41 deletions(-) create mode 100644 order.md create mode 100644 release_history.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d344634..52ad355 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -78,13 +78,13 @@ jobs: distribution: 'temurin' - name: download & unpack & install -> boost - if: ${{ matrix.os == 'windows-2022' && matrix.iotdb_version != 'master' }} + if: ${{ matrix.iotdb_version != 'master' }} 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 - name: download & unpack & install -> boost - if: ${{ matrix.os == 'windows-2022' && matrix.iotdb_version == 'master' }} + if: ${{ matrix.iotdb_version == 'master' }} shell: cmd run: choco install boost-msvc-14.3 --version=1.78.0 @@ -95,7 +95,7 @@ jobs: 7z x ${{ github.workspace }}/win_flex_bison-latest.zip -o${{ github.workspace }}/win_flex_bison-latest - name: download & unpack mvn3.9.x - if: ${{ matrix.os == 'windows-2022' && matrix.iotdb_version == 'master' }} + if: ${{ matrix.iotdb_version == 'master' }} shell: cmd run: | C:\msys64\usr\bin\wget.exe -O ${{ github.workspace }}/apache-maven-3.9.4-bin.zip https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.zip @@ -154,15 +154,17 @@ jobs: fi # build client-cpp - name: Build client-cpp - if: ${{ matrix.os == 'windows-2022' && matrix.iotdb_version != 'master' }} + if: ${{ matrix.iotdb_version != 'master' }} shell: cmd 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="${{ steps.iotdb-info.outputs.boost_include_dir }}" -Dboost.library.dir="${{ steps.iotdb-info.outputs.boost_library_dir }}" -Dcmake.url="${{ steps.iotdb-info.outputs.cmake_url }}" -Dcmake.root.dir="${{ steps.iotdb-info.outputs.cmake_root_dir }}" + cd + dir - name: Build client-cpp on master branch - if: ${{ matrix.os == 'windows-2022' && matrix.iotdb_version == 'master' }} + if: ${{ matrix.iotdb_version == 'master' }} shell: cmd run: | cd ${{ github.workspace }}\iotdb @@ -170,29 +172,21 @@ jobs: set Path=${{ github.workspace }}\apache-maven-3.9.4-bin\apache-maven-3.9.4\bin;%Path% set mvn clean package -P with-cpp -pl iotdb-client/client-cpp,example/client-cpp-example -am -DskipTests -# # compile all without cache -# mvn clean package -P with-cpp -pl iotdb-client/client-cpp,example/client-cpp-example -am -DskipTests -# set CPPFLAGS=/I"${{ steps.iotdb-info.outputs.boost_include_dir }}" %CPPFLAGS% -# set LDFLAGS=/L"${{ steps.iotdb-info.outputs.boost_library_dir }}" %LDFLAGS% -# set BOOST_INCLUDE_DIR=${{ steps.iotdb-info.outputs.boost_include_dir }} -# set BOOST_LIBRARY_DIR=${{ steps.iotdb-info.outputs.boost_library_dir }} -# set Boost_INCLUDE_DIR=${{ steps.iotdb-info.outputs.boost_include_dir }} -# set Boost_LIBRARY_DIR=${{ steps.iotdb-info.outputs.boost_library_dir }} -# setx BOOST_INCLUDE_DIR ${{ steps.iotdb-info.outputs.boost_include_dir }} -# setx BOOST_LIBRARY_DIR ${{ steps.iotdb-info.outputs.boost_library_dir }} -# setx Boost_INCLUDE_DIR ${{ steps.iotdb-info.outputs.boost_include_dir }} -# setx Boost_LIBRARY_DIR ${{ steps.iotdb-info.outputs.boost_library_dir }} + cd + 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: softprops/action-gh-release@v1 + uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ needs.collect.outputs.date }}-java${{ matrix.java_version }}-apache-iotdb - files: ${{ github.workspace }}\iotdb\${{ steps.iotdb-info.outputs.cpp_dir }}\target\*.zip + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: ${{ github.workspace }}\iotdb\${{ steps.iotdb-info.outputs.cpp_dir }}\target\*.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 +# compress client-cpp-example - name: compress client-cpp-example shell: bash run: | @@ -201,12 +195,14 @@ jobs: # # 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: softprops/action-gh-release@v1 + uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ needs.collect.outputs.date }}-java${{ matrix.java_version }}-apache-iotdb - files: ${{ github.workspace }}\iotdb\example\client-cpp-example\target\*.zip + upload_url: ${{ steps.create-release.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: client-cpp-example-${{ steps.iotdb-info.outputs.version }}-cpp-windows-x86_64.zip + asset_content_type: application/zip # #----end---- #----start---- @@ -245,6 +241,7 @@ jobs: echo "commit=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT echo "branch=$(git branch |grep ^*|cut -d ' ' -f 2|sed "s:/:-:")" >> $GITHUB_OUTPUT echo "version=$(cat pom.xml | grep -e '^ ' | sed 's# ##g' | sed 's###g' | sed 's###g')" >> $GITHUB_OUTPUT + # To distinguish master and rel/1.0 branches, add temporary variables echo "matrix_version=$(echo ${{ matrix.iotdb_version }} | sed "s:/::")" >> $GITHUB_OUTPUT @@ -280,34 +277,41 @@ jobs: 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,with-grafana-plugin + 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 # #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: softprops/action-gh-release@v1 + uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ needs.collect.outputs.date }}-java${{ matrix.java_version }}-apache-iotdb - files: ${{ github.workspace }}/iotdb/distribution/target/apache-iotdb-${{ steps.iotdb-info.outputs.version }}-all-bin.zip + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/iotdb/distribution/target/apache-iotdb-${{ steps.iotdb-info.outputs.version }}-all-bin.zip + asset_name: apache-iotdb-${{ steps.iotdb-info.outputs.version }}-all-bin.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: softprops/action-gh-release@v1 + if: ${{ matrix.iotdb_version != 'master' }} + uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ needs.collect.outputs.date }}-java${{ matrix.java_version }}-apache-iotdb - files: ${{ github.workspace }}/iotdb/distribution/target/apache-iotdb-${{ steps.iotdb-info.outputs.version }}-grafana-plugin-bin.zip + upload_url: ${{ steps.create-release.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-${{ steps.iotdb-info.outputs.version }}-grafana-plugin-bin.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: softprops/action-gh-release@v1 + uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ needs.collect.outputs.date }}-java${{ matrix.java_version }}-apache-iotdb - files: ${{ github.workspace }}/iotdb/${{ steps.iotdb-info.outputs.client_jdbc_module }}/target/iotdb-jdbc-${{ steps.iotdb-info.outputs.version }}-jar-with-dependencies.jar + upload_url: ${{ steps.create-release.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: iotdb-jdbc-${{ steps.iotdb-info.outputs.version }}-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 }} @@ -320,12 +324,14 @@ jobs: 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: softprops/action-gh-release@v1 + uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ needs.collect.outputs.date }}-java${{ matrix.java_version }}-apache-iotdb - files: ${{ github.workspace }}/iotdb/${{ steps.iotdb-info.outputs.client_py_module }}/dist/${{ steps.build-py-client.outputs.client_py_whl_name }} + upload_url: ${{ steps.create-release.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: ${{ steps.build-py-client.outputs.client_py_whl_name }} + asset_content_type: application/zip # #----end---- #----start---- @@ -391,11 +397,14 @@ jobs: # #---upload - name: Upload iot-benchmark-${{ matrix.release_db }}-${{ steps.benchmark-info.outputs.commit }}.zip using ${{ matrix.java_version }} - uses: softprops/action-gh-release@v1 + uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ needs.collect.outputs.date }}-java${{ matrix.java_version }}-apache-iotdb - files: ${{ github.workspace }}/iot-benchmark/${{ matrix.release_db }}/target/iot-benchmark-${{ matrix.release_db }}.zip + upload_url: ${{ steps.create-release.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---- diff --git a/README.md b/README.md index 4ab0acb..541f5ae 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Execute the start-stop test case of the iotdb rel/1.0 branch every day. ---------- * iotdb 用户手册发布 -one short to release user-guidy, need to select pages by hand before relase. +one short to release user-guide, need to select pages by hand before release. * test build rel/0.12 * test self-hosted * test upload diff --git a/order.md b/order.md new file mode 100644 index 0000000..7af1f20 --- /dev/null +++ b/order.md @@ -0,0 +1,10 @@ +## job下判断:两者都 +``` + - name: download & unpack & install -> boost + if: ${{ matrix.os == 'windows-2022' && matrix.iotdb_version != 'master' }} + shell: cmd + run: | + whoami + whoami + whoami +``` \ No newline at end of file diff --git a/release_history.txt b/release_history.txt new file mode 100644 index 0000000..14f81bc --- /dev/null +++ b/release_history.txt @@ -0,0 +1 @@ +2023-10-09, compile grafana-plugin is not necessary on master branch, delete this module in daily-build. \ No newline at end of file