-
Notifications
You must be signed in to change notification settings - Fork 608
[GLUTEN-9615][INFRA] Automate release process with build script and GHA workflow #10807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
609ffdb
Initial
philo-he 7261156
Add a workfow to build release
philo-he 6e93b6c
Change for test
philo-he 60bda0d
Build with Java 17 for Spark 3.4 and 3.5
philo-he 0dcc0ef
Fix upload
philo-he faec8d1
Add a release script
philo-he 9387574
Revert "Change for test"
philo-he File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # 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: Build Release | ||
|
|
||
| # Only triggered when new tag like v1.5.0 is created. | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '.github/workflows/build_release.yml' | ||
| # push: | ||
| # tags: | ||
| # - 'v*' | ||
|
|
||
| jobs: | ||
| build-velox-backend-release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Build | ||
| run: | | ||
| docker pull apache/gluten:vcpkg-centos-7 | ||
| docker run -v $GITHUB_WORKSPACE:/workspace -w /work apache/gluten:vcpkg-centos-7 bash -c " | ||
| set -e | ||
| cd /workspace | ||
| bash dev/release/build-release.sh | ||
| " | ||
| - name: Upload packages | ||
| if: ${{ success() }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ github.job }}-packages | ||
| path: ${{ github.workspace }}/package/target/gluten-velox-bundle-*.jar | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| #!/bin/bash | ||
|
|
||
| # 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. | ||
|
|
||
| set -eu | ||
|
|
||
| source /opt/rh/devtoolset-11/enable | ||
| source /opt/rh/rh-git227/enable | ||
|
|
||
| CURRENT_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd) | ||
| GLUTEN_HOME=${CURRENT_DIR}/../../ | ||
| cd ${GLUTEN_HOME} | ||
|
|
||
| # Enable static build with support for S3, GCS, HDFS, and ABFS. | ||
| ./dev/builddeps-veloxbe.sh --enable_vcpkg=ON --build_arrow=OFF --build_tests=OFF --build_benchmarks=OFF \ | ||
| --build_examples=OFF --enable_s3=ON --enable_gcs=ON --enable_hdfs=ON --enable_abfs=ON | ||
|
|
||
| JAVA_VERSION=$("java" -version 2>&1 | awk -F '"' '/version/ {print $2}') | ||
|
|
||
| if [[ $JAVA_VERSION == 1.8* ]]; then | ||
| echo "Java 8 is being used." | ||
| else | ||
| echo "Error: Java 8 is required. Current version is $JAVA_VERSION." | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Build Gluten for Spark 3.2 and 3.3 with Java 8. All feature modules are enabled. | ||
| for spark_version in 3.2 3.3 | ||
| do | ||
| mvn clean install -Pbackends-velox -Pspark-${spark_version} -Pceleborn,uniffle \ | ||
| -Piceberg,delta,hudi,paimon -DskipTests | ||
| done | ||
|
|
||
| sudo curl -Lo /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo | ||
| sudo yum install -y java-17-amazon-corretto-devel | ||
| export JAVA_HOME=/usr/lib/jvm/java-17-amazon-corretto | ||
| export PATH=$JAVA_HOME/bin:$PATH | ||
|
|
||
| JAVA_VERSION=$("java" -version 2>&1 | awk -F '"' '/version/ {print $2}') | ||
| if [[ $JAVA_VERSION == 17* ]]; then | ||
| echo "Java 17 is being used." | ||
| else | ||
| echo "Error: Java 17 is required. Current version is $JAVA_VERSION." | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Build Gluten for Spark 3.4 and 3.5 with Java 17. The version of Iceberg being used requires Java 11 or higher. | ||
| # All feature modules are enabled. | ||
| for spark_version in 3.4 3.5 | ||
| do | ||
| mvn clean install -Pjava-17 -Pbackends-velox -Pspark-${spark_version} -Pceleborn,uniffle \ | ||
| -Piceberg,delta,hudi,paimon -DskipTests | ||
| done |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this PR under testing?
Should try to enable this code by using a tag creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for testing. Will be reverted to only trigger the build when new release tag is created.