This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/main by this push: new b61bf6e [chore] Add a build workflow for 1.2-lts (#18) b61bf6e is described below commit b61bf6ef3d30b2adaa8bea472fb64fcd8df73dcf Author: Adonis Ling <adonis0...@gmail.com> AuthorDate: Fri Dec 16 13:55:32 2022 +0800 [chore] Add a build workflow for 1.2-lts (#18) Apache Doris made the branch branch-1.2-lts protected. As a result, all pull requests for this branch should be checked before merging it. Therefore, we should add a build workflow for this branch. --- .github/workflows/{build.yml => build-1.2.yml} | 46 +++++++++++++++++--------- .github/workflows/build.yml | 4 +-- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build-1.2.yml similarity index 80% copy from .github/workflows/build.yml copy to .github/workflows/build-1.2.yml index ef05ede..203307f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build-1.2.yml @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -name: Build +name: Build (1.2-lts) on: schedule: @@ -37,16 +37,20 @@ jobs: uses: actions/checkout@v3 with: repository: 'apache/doris' + ref: 'branch-1.2-lts' fetch-depth: 0 - name: Check Diff id: check_diff run: | + tag_name='automation-1.2-lts' + title="Apache Doris Third Party Prebuilt (${tag_name/automation-/})" + if [[ -z "$(gh release list)" ]] || - ! gh release list | awk -F "\t" '{ if ($3 == "automation") exit 0; else exit 1 }'; then - gh release create -t 'Apache Doris Third Party Prebuilt' automation + ! gh release list | awk -F "\t" '{ print $3 }' | grep "${tag_name}" >/dev/null; then + gh release create -t "${title}" "${tag_name}" fi - last_version="$(gh release view automation | sed -n -E 's/Doris Version: \*(.*)\*.*/\1/p')" + last_version="$(gh release view "${tag_name}" | sed -n -E 's/Doris Version: \*(.*)\*.*/\1/p')" current_version="$(git log -1 --format='%H')" echo "Last Version: ${last_version}" @@ -69,24 +73,26 @@ jobs: if "${should_release}"; then echo -ne "Update Time: *$(date)*\nDoris Version: *${current_version}*\nStatus: *BUILDING*" >release_note.md else - gh release view automation | sed -n '/--/,$p' | awk '{ if (NR > 1) print $0 }' | sed "{ + gh release view "${tag_name}" | sed -n '/--/,$p' | awk '{ if (NR > 1) print $0 }' | sed "{ s/Update Time:.*/Update Time: *$(date)*/ s/Doris Version:.*/Doris Version: *${current_version}*/ }" >release_note.md fi - gh release edit -F release_note.md automation + gh release edit -F release_note.md "${tag_name}" echo "should_release=${should_release}" >> $GITHUB_OUTPUT - name: Download Source and Upload if: steps.check_diff.outputs.should_release == 'true' run: | + tag_name='automation-1.2-lts' + cd thirdparty sed '/# unpacking thirdpart archives/,$d' download-thirdparty.sh | bash - tar -zcvf doris-thirdparty-source.tgz src - gh release upload --clobber automation doris-thirdparty-source.tgz + gh release upload --clobber "${tag_name}" doris-thirdparty-source.tgz build: name: Build @@ -153,11 +159,15 @@ jobs: uses: actions/checkout@v3 with: repository: 'apache/doris' + ref: 'branch-1.2-lts' + fetch-depth: 0 - name: Download run: | + tag_name='automation-1.2-lts' + cd thirdparty - curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz \ + curl -L "https://github.com/${{ github.repository }}/releases/download/${tag_name}/doris-thirdparty-source.tgz" \ -o doris-thirdparty-source.tgz tar -zxvf doris-thirdparty-source.tgz @@ -181,6 +191,8 @@ jobs: - name: Build and Upload run: | + tag_name='automation-1.2-lts' + if [[ "${{ matrix.config.name }}" == 'Linux' ]]; then export DEFAULT_DIR='/opt/doris' export PATH="${DEFAULT_DIR}/ldb-toolchain/bin:${PATH}" @@ -193,7 +205,7 @@ jobs: arch="$(uname -m)" rm -rf "doris-thirdparty-prebuilt-${kernel}-${arch}.tar.xz" tar -cf - installed | xz -z -T0 - >"doris-thirdparty-prebuilt-${kernel}-${arch}.tar.xz" - gh release upload --clobber automation "doris-thirdparty-prebuilt-${kernel}-${arch}.tar.xz" + gh release upload --clobber "${tag_name}" "doris-thirdparty-prebuilt-${kernel}-${arch}.tar.xz" success: name: Success @@ -208,11 +220,13 @@ jobs: steps: - name: Update Checksums run: | - gh release download automation + tag_name='automation-1.2-lts' + + gh release download "${tag_name}" - content="$(gh release view automation | sed -n '/Update Time:/,/Doris Version:/p')" + content="$(gh release view "${tag_name}" | sed -n '/Update Time:/,/Doris Version:/p')" echo -ne "${content}\nStatus: *SUCCESS*\n\n## Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md - gh release edit -F release_note.md automation + gh release edit -F release_note.md "${tag_name}" failure: name: Failure @@ -227,8 +241,10 @@ jobs: steps: - name: Update Checksums run: | - gh release download automation + tag_name='automation-1.2-lts' + + gh release download "${tag_name}" - content="$(gh release view automation | sed -n '/Update Time:/,/Doris Version:/p')" + content="$(gh release view "${tag_name}"" | sed -n '/Update Time:/,/Doris Version:/p')" echo -ne "${content}\nStatus: *FAILURE*\n\n## Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md - gh release edit -F release_note.md automation + gh release edit -F release_note.md "${tag_name}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef05ede..73b852f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: id: check_diff run: | if [[ -z "$(gh release list)" ]] || - ! gh release list | awk -F "\t" '{ if ($3 == "automation") exit 0; else exit 1 }'; then + ! gh release list | awk -F "\t" '{ print $3 }' | grep 'automation' >/dev/null; then gh release create -t 'Apache Doris Third Party Prebuilt' automation fi last_version="$(gh release view automation | sed -n -E 's/Doris Version: \*(.*)\*.*/\1/p')" @@ -157,7 +157,7 @@ jobs: - name: Download run: | cd thirdparty - curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz \ + curl -L https://github.com/${{ github.repository }}/releases/download/automation/doris-thirdparty-source.tgz \ -o doris-thirdparty-source.tgz tar -zxvf doris-thirdparty-source.tgz --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org