-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BSE-4019] Move Build BodoSQL to Github Action (#8387)
- Loading branch information
Showing
7 changed files
with
115 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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,80 @@ | ||
name: Build and Publish BodoSQL Conda Binary | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
is-release: | ||
description: 'Is this a release build' | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build: | ||
runs-on: [self-hosted, small] | ||
timeout-minutes: 240 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# For setuptools_scm to be able to determine version, | ||
# we need to fetch the entire history | ||
fetch-depth: 0 | ||
|
||
- name: Create Micromamba Environment | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-name: bodosql_build | ||
create-args: conda-build anaconda-client python-libarchive-c setuptools_scm -c conda-forge | ||
cache-environment: true | ||
generate-run-shell: true | ||
init-shell: bash | ||
condarc: | | ||
channels: | ||
- conda-forge | ||
remote_max_retries: 5 | ||
remote_backoff_factor: 60 | ||
aggressive_update_packages: [] | ||
- name: 'Download the Bodo conda' | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: bodo-conda-linux-3.12-community | ||
run-id: ${{ github.event.workflow_run.id }} | ||
path: ./Bodo-CondaPkg-Linux | ||
|
||
- name: 'Build Conda Package' | ||
run: | | ||
set -exo pipefail | ||
source $HOME/micromamba/etc/profile.d/micromamba.sh | ||
micromamba activate bodosql_build | ||
# Determine Output Version | ||
export BODOSQL_VERSION=$(python -m setuptools_scm) | ||
echo "BODOSQL_VERSION=$BODOSQL_VERSION" >> $GITHUB_ENV | ||
# Build Conda Package with Conda-Build | ||
conda build buildscripts/bodosql/conda-recipe -c conda-forge -c ./Bodo-CondaPkg-Linux --croot $HOME/conda-bld | ||
shell: bash | ||
env: | ||
BODOSQL_VERSION: ${{ env.BODOSQL_VERSION }} | ||
|
||
- name: Upload Conda Package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: bodosql-conda-noarch | ||
path: /home/ec2-user/conda-bld/ | ||
|
||
- name: 'Set Secret File Permissions and Publish BodoSQL Binary to Artifactory' | ||
if: ${{ inputs.is-release }} | ||
run: | | ||
set -eo pipefail | ||
echo "${{ secrets.PUBLISH_BINARY_SECRETS }}" > $HOME/secret_file | ||
sudo chmod a+r $HOME/secret_file | ||
echo "BODOSQL_VERSION: $BODOSQL_VERSION" | ||
artifactory_channel=`./buildscripts/bodosql/get_channel.sh` | ||
echo "artifactory_channel: $artifactory_channel" | ||
./buildscripts/bodosql/publish_binary.sh $artifactory_channel | ||
shell: bash |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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