-
Notifications
You must be signed in to change notification settings - Fork 1
Adds stable promotion logic needed for stable tagger. #49
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
Draft
cjm715
wants to merge
6
commits into
main
Choose a base branch
from
chris-adding-stable-tag-promotion
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
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 |
|---|---|---|
| @@ -1,23 +1,52 @@ | ||
| name: CI && Release & Upload Wheel | ||
| name: CI | ||
|
|
||
| concurrency: | ||
| group: onnxruntime-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| is_experimental: | ||
| description: "Create an experimental build (use latest constants)" | ||
| type: boolean | ||
| default: false | ||
| onnxruntime_branch: | ||
| type: string | ||
| default: "main" | ||
| compiler_version: | ||
| default: "stable" | ||
| type: string | ||
| constants_version: | ||
| default: "stable" | ||
| type: string | ||
| workflow_dispatch: | ||
| inputs: | ||
| is_experimental: | ||
| description: "Create an experimental build (use latest constants)" | ||
| type: boolean | ||
| default: false | ||
| onnxruntime_branch: | ||
| type: string | ||
| default: "main" | ||
| compiler_version: | ||
| description: "compiler_version: stable, experimental or latest (unused by ONNX Runtime)" | ||
| default: "stable" | ||
| type: string | ||
| constants_version: | ||
| description: "constants_version: stable, latest or a branch name (unused by ONNX Runtime)" | ||
| default: "stable" | ||
| type: string | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| env: | ||
| GH_PAT: ${{ secrets.GH_PAT }} | ||
|
|
||
| jobs: | ||
| build_and_upload_wheel_linux: | ||
| runs-on: The_CTOs_Choice | ||
|
|
@@ -30,13 +59,28 @@ jobs: | |
| with: | ||
| repository: quadric-io/onnxruntime | ||
| ref: ${{ inputs.onnxruntime_branch || github.ref }} | ||
| token: ${{ secrets.GH_PAT }} | ||
|
|
||
| - name: Fetch sha | ||
| id: fetch_sha | ||
| run: | | ||
| # Fetch current sha for the potential creation of an experimental release | ||
| CURRENT_SHA=$(git rev-parse HEAD) | ||
| echo "current_sha=$CURRENT_SHA" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Build ONNX Runtime wheel | ||
| working-directory: /workspace | ||
| run: | | ||
| python3 -m pip install "cmake<4" | ||
| ./build.sh --build_wheel --config Release --parallel ${{ github.event_name == 'pull_request' && ' ' || '--skip_tests'}} --skip_submodule_sync --allow_running_as_root --compile_no_warning_as_error | ||
|
|
||
| # Always run tests - no skipping for any scenario | ||
| test_args="" | ||
|
|
||
| ./build.sh --build_wheel --config Release --parallel $test_args --skip_submodule_sync --allow_running_as_root --compile_no_warning_as_error | ||
|
|
||
| wheel_path=$(find . -name '*.whl' | xargs readlink -f) | ||
| echo "wheel_path=$wheel_path" >> $GITHUB_ENV | ||
|
|
||
| - name: Upload Artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
|
|
@@ -52,25 +96,42 @@ jobs: | |
| with: | ||
| repository: quadric-io/onnxruntime | ||
| ref: ${{ inputs.onnxruntime_branch || github.ref }} | ||
| token: ${{ secrets.GH_PAT }} | ||
|
|
||
| - name: Fetch sha | ||
| id: fetch_sha | ||
| run: | | ||
| # Fetch current sha for the potential creation of an experimental release | ||
| CURRENT_SHA=$(git rev-parse HEAD) | ||
| echo "current_sha=$CURRENT_SHA" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Install python dependencies | ||
| run: | | ||
| python3 -m pip install -r requirements.txt | ||
| python3 -m pip install -r requirements-quadric.txt | ||
|
|
||
| - name: Build ONNX Runtime wheel | ||
| run: | | ||
| ./build.sh --build_wheel --config Release --parallel ${{ github.event_name == 'pull_request' && ' ' || '--skip_tests'}} --skip_submodule_sync --compile_no_warning_as_error --skip_submodule_sync --apple_deploy_target 12 | ||
| # Always run tests - no skipping for any scenario | ||
| test_args="" | ||
|
|
||
| ./build.sh --build_wheel --config Release --parallel $test_args --skip_submodule_sync --compile_no_warning_as_error --skip_submodule_sync --apple_deploy_target 12 | ||
|
|
||
| wheel_path=$(find . -name '*.whl' | xargs readlink -f) | ||
| echo "wheel_path=$wheel_path" >> $GITHUB_ENV | ||
|
|
||
| - name: Upload Artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ort-wheel-mac | ||
| path: ${{ env.wheel_path }} | ||
|
|
||
| # Keep your existing release logic for main branch pushes | ||
| create_release: | ||
| permissions: | ||
| contents: write | ||
| if: (github.ref == 'refs/heads/main') && ( github.event_name != 'workflow_call' && github.event_name != 'workflow_dispatch' ) | ||
| # Only create releases on main branch pushes (not when called from tagger) | ||
| if: (github.ref == 'refs/heads/main') && (github.event_name == 'push') | ||
| needs: [build_and_upload_wheel_mac, build_and_upload_wheel_linux] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
@@ -79,15 +140,17 @@ jobs: | |
| with: | ||
| name: ort-wheel-linux | ||
| path: artifacts/ | ||
|
|
||
| - name: Download ort-wheel-mac artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: ort-wheel-mac | ||
| path: artifacts/ | ||
|
|
||
| - name: Get next release tag | ||
| id: get_tag | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
| run: | | ||
| latest_tag=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
| https://api.github.com/repos/${{ github.repository }}/releases \ | ||
|
|
@@ -108,10 +171,11 @@ jobs: | |
|
|
||
| echo "next_tag=$next_tag" >> $GITHUB_ENV | ||
| echo "next_tag=$next_tag" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Create Release and Upload Both Assets | ||
| uses: softprops/action-gh-release@v1 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
|
||
| with: | ||
| tag_name: ${{ steps.get_tag.outputs.next_tag }} | ||
| name: Release ${{ steps.get_tag.outputs.next_tag }} | ||
|
|
||
Empty file.
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.
Why include this?