-
Notifications
You must be signed in to change notification settings - Fork 373
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
[ci] Separate mac wheels & trigger wheel build from ui #1499
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,23 @@ name: CI (Python) | |
|
||
on: | ||
pull_request: | ||
types: [labeled, synchronize, opened] | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "v*.*.*" # on release tag | ||
workflow_dispatch: | ||
inputs: | ||
force_build_wheel: | ||
description: 'Build python wheels' | ||
required: false | ||
type: boolean | ||
|
||
env: | ||
PYTHON_VERSION: "3.8" | ||
PRE_RELEASE_INSTRUCTIONS: | | ||
## Installing the pre-release Python SDK | ||
1. Download the correct `.whl`. For Mac M1/M2, grab the "universal2" `.whl` | ||
1. Download the correct `.whl`. | ||
2. Run `pip install rerun_sdk<...>.whl` (replace `<...>` with the actual filename) | ||
3. Test it: `rerun --version` | ||
UBUNTU_REQUIRED_PKGS: libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev libfontconfig1-dev libatk-bridge2.0 libfreetype6-dev libglib2.0-dev | ||
|
@@ -59,8 +64,8 @@ jobs: | |
|
||
matrix-setup: | ||
# Building all the wheels is expensive, so we only run this job when we push (to main or release tags), | ||
# or if the PR has the 'build wheels' label for explicit testing of wheels. | ||
if: github.event_name == 'push' || contains( github.event.pull_request.labels.*.name, '🛞 build wheels') | ||
# or if the job was manually triggered with `force_build_wheel` set to true. | ||
if: github.event_name == 'push' || ${{ inputs.force_build_wheel }} | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
|
@@ -75,22 +80,15 @@ jobs: | |
env: | ||
JOB_CONTEXT: ${{ toJson(job) }} | ||
run: echo "$JOB_CONTEXT" | ||
# Sets TAGGED_OR_MAIN if this workflow is running on a tag or the main branch. | ||
- name: Set TAGGED_OR_MAIN | ||
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' | ||
run: echo "TAGGED_OR_MAIN=1" >> $GITHUB_ENV | ||
|
||
- id: set-matrix | ||
shell: bash | ||
run: | | ||
matrix=() | ||
|
||
if [[ $TAGGED_OR_MAIN ]]; then | ||
# MacOS build is really slow (>30 mins); uses up a lot of CI minutes | ||
matrix+=('{"platform": "macos", "runs_on": "macos-latest"},') | ||
fi | ||
matrix+=('{"platform": "windows", "runs_on": "windows-latest-8-cores"},') | ||
matrix+=('{"platform": "linux", "runs_on": "ubuntu-latest-16-cores", container: {"image": "rerunio/ci_docker:0.5"}}') | ||
matrix+=('{"platform": "macos", "target": "x86_64-apple-darwin", "runs_on": "macos-latest"},') | ||
matrix+=('{"platform": "macos", "target": "aarch64-apple-darwin", "runs_on": "macos-latest"},') | ||
matrix+=('{"platform": "windows", "target": "x86_64-pc-windows-msvc", "runs_on": "windows-latest-8-cores"},') | ||
matrix+=('{"platform": "linux", "target": "x86_64-unknown-linux-gnu", "runs_on": "ubuntu-latest-16-cores", container: {"image": "rerunio/ci_docker:0.5"}}') | ||
Comment on lines
88
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a little different from how it normally looks: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's try this format instead, looks cleaner There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, now that it's not dynamically generated based on an env-variable, seems like we can clean it up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's also something we might want to punt on though since this matrix-CI-builder mechanism has been working so far and restructuring the job graph is a good way to end up debugging job-graphs over the weekend. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. .. in a separate PR! |
||
|
||
echo "Matrix values: ${matrix[@]}" | ||
|
||
|
@@ -204,9 +202,9 @@ jobs: | |
args: | | ||
--manifest-path rerun_py/Cargo.toml | ||
--release | ||
--target {{ matrix.target }} | ||
Wumpf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
--no-default-features | ||
--features pypi | ||
--universal2 | ||
--out pre-dist | ||
|
||
- name: Install built wheel | ||
|
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.
I think this line needs to go away to not trigger this job.
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 still supposed to trigger it because of the linting that we always want to do. But then there is a check later down and I just learned how that was broken :)
Or rather I believe I know now why