-
Notifications
You must be signed in to change notification settings - Fork 0
BLD-6874 GitHub workflow #18
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 all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8d9fdff
Build conquest python with github workflow (BLD-6874)
siong-chin df37203
Try run build script (BLD-6874)
siong-chin fe41105
old zlib source no longer available (BLD-6874)
siong-chin 7d56642
Install required dependency (BLD-6874)
siong-chin 64dc5ce
Try uploading to artifactory (BLD-6874)
siong-chin 0edf691
Run again with jfrog config (BLD-6874)
siong-chin 89fc8b6
Extract build output explicitly (BLD-6874)
siong-chin 4e7a668
Use "linux" in archive name (BLD-6874)
siong-chin ea3578d
Update workflow as per review (BLD-6874)
siong-chin b26edb4
Keep zlib version (BLD-6874)
siong-chin 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,106 @@ | ||
# A github workflow file to build conquest python | ||
name: Build Conquest Python | ||
|
||
on: # yamllint disable-line rule:truthy | ||
workflow_dispatch: | ||
inputs: | ||
artifactory-push: | ||
description: "Push result to Artifactory" | ||
default: false | ||
type: boolean | ||
platforms: | ||
description: 'Platform to build for, eg. ' | ||
options: | ||
- 'rocky8' | ||
- 'ubuntu' | ||
- 'macos' | ||
- 'windows' | ||
push: | ||
paths: | ||
- '.github/workflows/build-conquest-python.yml' | ||
- 'build_conquest_python.py' | ||
- 'ccdc/thirdparty/package.py' | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
runson: ${{ steps.set_output.outputs.runson }} | ||
container: ${{ steps.set_output.outputs.container }} | ||
python: ${{ steps.set_output.outputs.python }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set output | ||
id: set_output | ||
run: | | ||
if [[ "${{ inputs.platforms }}" == "rocky8" ]]; then | ||
echo runson=ubuntu-latest >> $GITHUB_OUTPUT | ||
echo container=ccdcrepository.azurecr.io/conan/rocky8-gcc10:latest >> $GITHUB_OUTPUT | ||
echo python=python3 >> $GITHUB_OUTPUT | ||
elif [[ "${{ inputs.platforms }}" == "ubuntu" ]]; then | ||
echo runson=ubuntu-latest >> $GITHUB_OUTPUT | ||
siong-chin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo python=python3 >> $GITHUB_OUTPUT | ||
elif [[ "${{ inputs.platforms }}" == "macos" ]]; then | ||
echo runson=macos-12 >> $GITHUB_OUTPUT | ||
echo python=python >> $GITHUB_OUTPUT | ||
elif [[ "${{ inputs.platforms }}" == "windows" ]]; then | ||
echo runson=windows-2019 >> $GITHUB_OUTPUT | ||
echo python=python >> $GITHUB_OUTPUT | ||
fi | ||
|
||
# Build the conquest python for rocky8 | ||
echo runson=ubuntu-latest >> $GITHUB_OUTPUT | ||
echo container=ccdcrepository.azurecr.io/conan/rocky8-gcc10:latest >> $GITHUB_OUTPUT | ||
echo python=python3 >> $GITHUB_OUTPUT | ||
|
||
build-upload: | ||
needs: | ||
- setup | ||
runs-on: ${{ needs.setup.outputs.runson }} | ||
container: | ||
image: ${{ needs.setup.outputs.container }} | ||
credentials: | ||
username: ${{ secrets.AZURE_CR_USER }} | ||
password: ${{ secrets.AZURE_CR_PASSWORD }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
if: ${{ needs.setup.outputs.python == 'python' }} | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Set up Python environment | ||
run: | | ||
${{ needs.setup.outputs.python }} --version | ||
${{ needs.setup.outputs.python }} -m pip install --upgrade pip wheel setuptools | ||
|
||
- name: Build conquest python | ||
run: | | ||
output=$(${{ needs.setup.outputs.python }} build_conquest_python.py | grep Creating | tail -n 1) | ||
archive_filename=$(echo $output | awk '{print $2}') | ||
archive_path=$(echo $output | awk '{print $NF}') | ||
echo "archive_filename=$archive_filename" >> $GITHUB_ENV | ||
echo "archive_path=$archive_path" >> $GITHUB_ENV | ||
|
||
- name: Set up JFrog CLI | ||
if: ${{ inputs.artifactory-push }} | ||
uses: jfrog/setup-jfrog-cli@v4 | ||
env: | ||
JF_ENV_1: ${{ secrets.ARTIFACTORY_GH_CCDC_3RDPARTY_PYTHON_INTERPRETERS_READ_WRITE_EXPORT }} | ||
|
||
- name: Upload conquest python to Artifactory | ||
if: ${{ inputs.artifactory-push }} | ||
shell: bash | ||
run: | | ||
# Upload the conquest python to Artifactory | ||
jf c use gh-ccdc-3rdparty-python-interpreters-read-write | ||
jfrog rt upload --flat \ | ||
"${{ env.archive_path }}/${{ env.archive_filename }}" \ | ||
"ccdc-3rdparty-python-interpreters/conquest_python/2.7/" |
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
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.
Uh oh!
There was an error while loading. Please reload this page.