-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Fix build break and build release #2242
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
+18
−6
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3507e94
Fix build break and build debug
pakrym-oai 926b753
ci: make cargo clippy step fail on error by removing continue-on-error
pakrym-oai 22ada07
ci: use --{profile} arg for cargo build/test instead of --profile flag
pakrym-oai bac62c7
ci: switch from debug to dev profile and use explicit --profile in ca…
pakrym-oai bf35975
ci: set macos-14 x86_64 build to dev profile in rust-ci workflow
pakrym-oai 73d05e9
ci: build x86_64-unknown-linux-musl in release profile; update cache …
pakrym-oai d651dab
Merge branch 'main' into pakrym/fix-build-break-and-build-debug
pakrym-oai 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 |
---|---|---|
|
@@ -34,7 +34,7 @@ jobs: | |
|
||
# CI to validate on different os/targets | ||
lint_build_test: | ||
name: ${{ matrix.runner }} - ${{ matrix.target }} | ||
name: ${{ matrix.runner }} - ${{ matrix.target }}${{ matrix.profile == 'release' && ' (release)' || '' }} | ||
runs-on: ${{ matrix.runner }} | ||
timeout-minutes: 30 | ||
defaults: | ||
|
@@ -49,18 +49,31 @@ jobs: | |
include: | ||
- runner: macos-14 | ||
target: aarch64-apple-darwin | ||
profile: dev | ||
- runner: macos-14 | ||
target: x86_64-apple-darwin | ||
profile: dev | ||
- runner: macos-14 | ||
target: aarch64-apple-darwin | ||
profile: release | ||
- runner: ubuntu-24.04 | ||
target: x86_64-unknown-linux-musl | ||
profile: dev | ||
- runner: ubuntu-24.04 | ||
target: x86_64-unknown-linux-musl | ||
profile: release | ||
- runner: ubuntu-24.04 | ||
target: x86_64-unknown-linux-gnu | ||
profile: dev | ||
- runner: ubuntu-24.04-arm | ||
target: aarch64-unknown-linux-musl | ||
profile: dev | ||
- runner: ubuntu-24.04-arm | ||
target: aarch64-unknown-linux-gnu | ||
profile: dev | ||
- runner: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
profile: dev | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -77,7 +90,7 @@ jobs: | |
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
${{ github.workspace }}/codex-rs/target/ | ||
key: cargo-${{ matrix.runner }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} | ||
key: cargo-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }} | ||
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. Can/should we update 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. Done |
||
|
||
- if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'}} | ||
name: Install musl build tools | ||
|
@@ -86,7 +99,6 @@ jobs: | |
|
||
- name: cargo clippy | ||
id: clippy | ||
continue-on-error: true | ||
run: cargo clippy --target ${{ matrix.target }} --all-features --tests -- -D warnings | ||
|
||
# Running `cargo build` from the workspace root builds the workspace using | ||
|
@@ -98,12 +110,12 @@ jobs: | |
id: build | ||
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} | ||
continue-on-error: true | ||
run: find . -name Cargo.toml -mindepth 2 -maxdepth 2 -print0 | xargs -0 -n1 -I{} bash -c 'cd "$(dirname "{}")" && cargo build' | ||
run: find . -name Cargo.toml -mindepth 2 -maxdepth 2 -print0 | xargs -0 -n1 -I{} bash -c 'cd "$(dirname "{}")" && cargo build --profile ${{ matrix.profile }}' | ||
|
||
- name: cargo test | ||
id: test | ||
continue-on-error: true | ||
run: cargo test --all-features --target ${{ matrix.target }} | ||
run: cargo test --all-features --target ${{ matrix.target }} --profile ${{ matrix.profile }} | ||
env: | ||
RUST_BACKTRACE: 1 | ||
|
||
|
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
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.
Does this one build the fastest? And can you add a comment here because it's a bit subtle since it's in the middle of the list?
Arguably we should do one Mac and one Linux
release
mode because there is stuff conditionally compiled for Landlock that sometimes I forget to test...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.
Added linux
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.
Both release builds are slow so I kept them non-blocking for merge.