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 326e4e68637 Add build-4.0.yml workflow for branch-4.0 prebuilt and
docker image (#394)
326e4e68637 is described below
commit 326e4e6863708dbf6aad7688f3f9122ba2a09da5
Author: Dongyang Li <[email protected]>
AuthorDate: Fri May 29 10:13:46 2026 +0800
Add build-4.0.yml workflow for branch-4.0 prebuilt and docker image (#394)
* Update build.yml
* Update build.yml
* [feat] add build-4.0.yml workflow for branch-4.0 docker image
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* [fix] pre-download lzo from official mirror (fossies.org returns 410 Gone)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* [fix] run prerelease on ubuntu-latest to avoid macOS runner network blocks
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* [fix] pre-download libuuid from SF main redirector (TW mirror blocked on
GH Actions)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* [fix] avoid gh release upload --clobber race-condition false failure
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
---
.github/workflows/{build.yml => build-4.0.yml} | 89 +++++++++++++++++++-------
.github/workflows/build.yml | 11 +++-
2 files changed, 74 insertions(+), 26 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build-4.0.yml
similarity index 79%
copy from .github/workflows/build.yml
copy to .github/workflows/build-4.0.yml
index 8b8f82f6ef2..e41fde20444 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build-4.0.yml
@@ -15,17 +15,22 @@
# specific language governing permissions and limitations
# under the License.
-name: Build
+name: Build (4.0)
on:
workflow_dispatch:
+ inputs:
+ force_build:
+ description: "Force run build job when manually triggered"
+ required: false
+ default: "true"
schedule:
- cron: '*/30 * * * *'
jobs:
prerelease:
name: Prerelease
- runs-on: macos-14
+ runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -38,16 +43,20 @@ jobs:
uses: actions/checkout@v4
with:
repository: 'apache/doris'
+ ref: 'branch-4.0'
fetch-depth: 0
- name: Check Diff
id: check_diff
run: |
+ tag_name='automation-4.0'
+ title="Apache Doris Third Party Prebuilt (${tag_name/automation-/})"
+
if [[ -z "$(gh release list)" ]] ||
- ! gh release list | awk -F "\t" '{ print $3 }' | grep
'automation' >/dev/null; 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}"
@@ -70,29 +79,39 @@ 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-4.0'
+
cd thirdparty
+ # Pre-download packages whose default mirror is blocked or gone on
GH Actions runners:
+ # lzo: fossies.org returns 410 Gone
+ # libuuid: nchc.dl.sourceforge.net (TW mirror) is blocked from GH
Actions
+ mkdir -p src
+ curl -fL
"https://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz" \
+ -o src/lzo-2.10.tar.gz
+ curl -fL
"https://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz" \
+ -o src/libuuid-1.0.3.tar.gz
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
needs: prerelease
- if: needs.prerelease.outputs.should_release == 'true'
+ if: needs.prerelease.outputs.should_release == 'true' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.force_build ==
'true')
strategy:
matrix:
config:
@@ -196,11 +215,14 @@ jobs:
uses: actions/checkout@v4
with:
repository: 'apache/doris'
+ ref: 'branch-4.0'
- name: Download
run: |
+ tag_name='automation-4.0'
+
cd thirdparty
- curl -L https://github.com/${{ github.repository
}}/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
@@ -231,12 +253,14 @@ jobs:
- name: Build and Upload
run: |
+ tag_name='automation-4.0'
+
if [[ "${{ matrix.config.name }}" == 'Linux' ]]; then
export DEFAULT_DIR='/opt/doris'
export PATH="${DEFAULT_DIR}/ldb-toolchain/bin:${PATH}"
export PATH="$(find /usr/lib/jvm/java-8-openjdk* -maxdepth 1 -type
d -name 'bin'):${PATH}"
export JAVA_HOME="$(find /usr/lib/jvm/java-8-openjdk* -maxdepth 0)"
- export DORIS_TOOLCHAIN=gcc
+ export DORIS_TOOLCHAIN=clang
else
export MACOSX_DEPLOYMENT_TARGET=12.0
fi
@@ -244,13 +268,28 @@ jobs:
export CMAKE_POLICY_VERSION_MINIMUM=3.10
export CUSTOM_CMAKE="/usr/local/bin/cmake"
cd thirdparty
+ # Fix packages that may be empty if the source tarball was built
before the mirror fixes:
+ # lzo: fossies.org returns 410 Gone
+ # libuuid: nchc.dl.sourceforge.net (TW mirror) blocked from GH
Actions
+ if [[ ! -s src/lzo-2.10.tar.gz ]]; then
+ curl -fL
"https://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz" \
+ -o src/lzo-2.10.tar.gz
+ fi
+ if [[ ! -s src/libuuid-1.0.3.tar.gz ]]; then
+ curl -fL
"https://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz" \
+ -o src/libuuid-1.0.3.tar.gz
+ fi
./build-thirdparty.sh -j "$(nproc)"
kernel="$(uname -s | awk '{print tolower($0)}')"
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"
+ # Delete existing asset first to avoid gh CLI --clobber
race-condition bug
+ # (gh release upload --clobber sometimes returns "release not found"
exit 1
+ # when deleting an existing asset, even though the upload itself
succeeds)
+ gh release delete-asset "${tag_name}"
"doris-thirdparty-prebuilt-${kernel}-${arch}.tar.xz" 2>/dev/null || true
+ gh release upload "${tag_name}"
"doris-thirdparty-prebuilt-${kernel}-${arch}.tar.xz"
update-docker:
name: Update Docker Image
@@ -303,9 +342,9 @@ jobs:
- name: Prepare Dockerfiles
run: |
- # Pull the upstream Dockerfile from apache/doris to stay in sync with
+ # Pull the upstream Dockerfile from apache/doris branch-4.0 to stay
in sync with
# any toolchain / dependency changes they make.
- curl -fsSL
https://raw.githubusercontent.com/apache/doris/master/docker/compilation/Dockerfile
\
+ curl -fsSL
https://raw.githubusercontent.com/apache/doris/branch-4.0/docker/compilation/Dockerfile
\
-o Dockerfile.upstream
python3 - << 'PYEOF'
@@ -336,7 +375,7 @@ jobs:
'# Download prebuilt thirdparty from GitHub Release (built by
doris-thirdparty automation)\n'
'ARG GITHUB_REPOSITORY\n'
'RUN mkdir -p /var/local/thirdparty \\\n'
- ' && wget -q
"https://github.com/${GITHUB_REPOSITORY}/releases/download/automation/doris-thirdparty-prebuilt-linux-x86_64.tar.xz"
\\\n'
+ ' && wget -q
"https://github.com/${GITHUB_REPOSITORY}/releases/download/automation-4.0/doris-thirdparty-prebuilt-linux-x86_64.tar.xz"
\\\n'
' -O /tmp/prebuilt.tar.xz \\\n'
' && tar -xf /tmp/prebuilt.tar.xz -C /var/local/thirdparty
\\\n'
' && rm /tmp/prebuilt.tar.xz\n'
@@ -381,7 +420,7 @@ jobs:
build-args: |
GITHUB_REPOSITORY=${{ github.repository }}
push: true
- tags: ${{ vars.DOCKER_TAGS ||
'apache/doris:build-env-ldb-toolchain-latest' }}
+ tags: ${{ vars.DOCKER_TAGS_4_0 ||
'apache/doris:build-env-ldb-toolchain-4.0-latest' }}
platforms: linux/amd64
- name: Build and Push Docker Image (no-avx2)
@@ -392,13 +431,13 @@ jobs:
build-args: |
GITHUB_REPOSITORY=${{ github.repository }}
push: true
- tags: ${{ vars.DOCKER_TAGS_NOAVX2 ||
'apache/doris:build-env-ldb-toolchain-no-avx2-latest' }}
+ tags: ${{ vars.DOCKER_TAGS_NOAVX2_4_0 ||
'apache/doris:build-env-ldb-toolchain-4.0-no-avx2-latest' }}
platforms: linux/amd64
success:
name: Success
needs: [prerelease, build, update-docker]
- if: needs.prerelease.outputs.should_release == 'true'
+ if: needs.prerelease.outputs.should_release == 'true' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.force_build ==
'true')
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
@@ -408,11 +447,13 @@ jobs:
steps:
- name: Update Checksums
run: |
- gh release download automation
+ tag_name='automation-4.0'
- content="$(gh release view automation | sed -n '/Update
Time:/,/Doris Version:/p')"
+ gh release download "${tag_name}"
+
+ content="$(gh release view "${tag_name}" | sed -n '/Update
Time:/,/Doris Version:/p')"
echo -ne "${content}\nStatus: *SUCCESS*\n\n## SHA256
Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
- gh release edit --latest -F release_note.md automation
+ gh release edit -F release_note.md "${tag_name}"
failure:
name: Failure
@@ -427,7 +468,9 @@ jobs:
steps:
- name: Update Checksums
run: |
- gh release download automation
+ tag_name='automation-4.0'
+
+ gh release download "${tag_name}"
echo -ne "Status: *FAILURE*\n\n## SHA256
Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
- gh release edit --latest -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 8b8f82f6ef2..7d896e6ece6 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -19,6 +19,11 @@ name: Build
on:
workflow_dispatch:
+ inputs:
+ force_build:
+ description: "Force run build job when manually triggered"
+ required: false
+ default: "true"
schedule:
- cron: '*/30 * * * *'
@@ -92,7 +97,7 @@ jobs:
build:
name: Build
needs: prerelease
- if: needs.prerelease.outputs.should_release == 'true'
+ if: needs.prerelease.outputs.should_release == 'true' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.force_build ==
'true')
strategy:
matrix:
config:
@@ -236,7 +241,7 @@ jobs:
export PATH="${DEFAULT_DIR}/ldb-toolchain/bin:${PATH}"
export PATH="$(find /usr/lib/jvm/java-8-openjdk* -maxdepth 1 -type
d -name 'bin'):${PATH}"
export JAVA_HOME="$(find /usr/lib/jvm/java-8-openjdk* -maxdepth 0)"
- export DORIS_TOOLCHAIN=gcc
+ export DORIS_TOOLCHAIN=clang
else
export MACOSX_DEPLOYMENT_TARGET=12.0
fi
@@ -398,7 +403,7 @@ jobs:
success:
name: Success
needs: [prerelease, build, update-docker]
- if: needs.prerelease.outputs.should_release == 'true'
+ if: needs.prerelease.outputs.should_release == 'true' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.force_build ==
'true')
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]