This is an automated email from the ASF dual-hosted git repository.

hellostephen 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 165dfec5ba2 [feat] add manual-build.yml for thirdparty (#381)
165dfec5ba2 is described below

commit 165dfec5ba245f1da5db81ae7b69605164c59b5e
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Mon Mar 2 12:32:01 2026 +0800

    [feat] add manual-build.yml for thirdparty (#381)
---
 .github/workflows/manual-build.yml | 266 +++++++++++++++++++++++++++++++++++++
 1 file changed, 266 insertions(+)

diff --git a/.github/workflows/manual-build.yml 
b/.github/workflows/manual-build.yml
new file mode 100644
index 00000000000..90f41af10cd
--- /dev/null
+++ b/.github/workflows/manual-build.yml
@@ -0,0 +1,266 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: Manual Build
+
+on:
+  workflow_dispatch:
+    inputs:
+      doris_ref:
+        description: 'The branch, tag, or commit SHA of apache/doris to build 
from'
+        required: false
+        default: 'master'
+        type: string
+
+jobs:
+  prerelease:
+    name: Prerelease
+    runs-on: macos-14
+    env:
+      GH_REPO: ${{ github.repository }}
+      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+    permissions:
+      contents: write
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+        with:
+          repository: 'apache/doris'
+          ref: ${{ inputs.doris_ref }}
+          fetch-depth: 0
+
+      - name: Create Release If Not Exists
+        run: |
+          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
+          fi
+
+      - name: Update Release Note
+        run: |
+          current_version="$(git log -1 --format='%H')"
+          echo "Current Version: ${current_version}"
+          echo -ne "Update Time: *$(date)*\nDoris Version: 
*${current_version}*\nDoris Ref: *${{ inputs.doris_ref }}*\nStatus: *BUILDING*" 
>release_note.md
+          gh release edit -F release_note.md automation
+
+      - name: Download Source and Upload
+        run: |
+          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
+
+  build:
+    name: Build
+    needs: prerelease
+    strategy:
+      matrix:
+        config:
+          - name: macOS-x86_64
+            os: macos-13
+            packages: >-
+              'm4'
+              'automake'
+              'autoconf'
+              'libtool'
+              'pkg-config'
+              'texinfo'
+              'coreutils'
+              'gnu-getopt'
+              'python@3'
+              'ninja'
+              'ccache'
+              'bison'
+              'byacc'
+              'gettext'
+              'wget'
+              'pcre'
+              'openjdk@11'
+              'maven'
+              'node'
+              'llvm@20'
+
+          - name: macOS-arm64
+            os: macos-14
+            packages: >-
+              'm4'
+              'automake'
+              'autoconf'
+              'libtool'
+              'pkg-config'
+              'texinfo'
+              'coreutils'
+              'gnu-getopt'
+              'python@3'
+              'ninja'
+              'ccache'
+              'bison'
+              'byacc'
+              'gettext'
+              'wget'
+              'pcre'
+              'openjdk@11'
+              'maven'
+              'node'
+              'llvm@20'
+
+          - name: Linux
+            os: ubuntu-22.04
+            packages: >-
+              'build-essential'
+              'automake'
+              'autoconf'
+              'libtool-bin'
+              'pkg-config'
+              'cmake=3.22.1-1ubuntu1.22.04.2'
+              'ninja-build'
+              'ccache'
+              'python-is-python3'
+              'bison'
+              'byacc'
+              'flex'
+              'binutils-dev'
+              'libiberty-dev'
+              'curl'
+              'git'
+              'zip'
+              'unzip'
+              'autopoint'
+              'openjdk-8-jdk'
+              'openjdk-8-jdk-headless'
+              'maven'
+
+    runs-on: ${{ matrix.config.os }}
+    env:
+      GH_REPO: ${{ github.repository }}
+      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+    steps:
+      - name: Checkout easimon/maximize-build-space
+        if: ${{ matrix.config.name == 'Linux' }}
+        run: |
+          git clone -b v7 https://github.com/easimon/maximize-build-space
+
+      - name: Maximize build space
+        if: ${{ matrix.config.name == 'Linux' }}
+        uses: ./maximize-build-space
+        with:
+            root-reserve-mb: 4096
+            swap-size-mb: 8192
+            remove-dotnet: 'true'
+            remove-android: 'true'
+            remove-haskell: 'true'
+            remove-codeql: 'true'
+            remove-docker-images: 'true'
+
+      - name: Checkout
+        uses: actions/checkout@v4
+        with:
+          repository: 'apache/doris'
+          ref: ${{ inputs.doris_ref }}
+
+      - name: Download
+        run: |
+          cd thirdparty
+          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
+
+      - name: Prepare for ${{ matrix.config.os }}
+        run: |
+          if [[ "${{ matrix.config.name }}" =~ macOS-* ]]; then
+            # Install packages except cmake
+            brew install ${{ matrix.config.packages }} || true
+            # Install specific version of cmake
+            brew unlink cmake || true
+            wget 
https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-macos-universal.tar.gz
+            tar -xzf cmake-3.22.1-macos-universal.tar.gz
+            sudo cp -r cmake-3.22.1-macos-universal/CMake.app/Contents/* 
/usr/local/
+            cmake --version
+          else
+            export DEFAULT_DIR='/opt/doris'
+            export PATH="${DEFAULT_DIR}/ldb-toolchain/bin:${PATH}"
+
+            sudo apt update
+            sudo apt-cache policy cmake
+            sudo DEBIAN_FRONTEND=noninteractive apt install --yes ${{ 
matrix.config.packages }}
+
+            mkdir -p "${DEFAULT_DIR}"
+            wget 
https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.25/ldb_toolchain_gen.sh
 \
+              -q -O /tmp/ldb_toolchain_gen.sh
+            bash /tmp/ldb_toolchain_gen.sh "${DEFAULT_DIR}/ldb-toolchain"
+          fi
+
+      - name: Build and Upload
+        run: |
+          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
+          else
+            export MACOSX_DEPLOYMENT_TARGET=12.0
+          fi
+
+          export CMAKE_POLICY_VERSION_MINIMUM=3.10
+          export CUSTOM_CMAKE="/usr/local/bin/cmake"
+          cd thirdparty
+          ./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"
+
+  success:
+    name: Success
+    needs: [prerelease, build]
+    runs-on: ubuntu-latest
+    env:
+      GH_REPO: ${{ github.repository }}
+      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+    permissions:
+      contents: write
+    steps:
+      - name: Update Checksums
+        run: |
+          gh release download automation
+
+          content="$(gh release view automation | 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
+
+  failure:
+    name: Failure
+    needs: [build]
+    if: failure()
+    runs-on: ubuntu-latest
+    env:
+      GH_REPO: ${{ github.repository }}
+      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+    permissions:
+      contents: write
+    steps:
+      - name: Update Checksums
+        run: |
+          gh release download automation
+
+          echo -ne "Status: *FAILURE*\n\n## SHA256 
Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
+          gh release edit --latest -F release_note.md automation


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to