-
Notifications
You must be signed in to change notification settings - Fork 373
ci: share one Linux native build across CI workflows #5841
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
Open
sunchao
wants to merge
8
commits into
apache:main
Choose a base branch
from
sunchao:codex/share-linux-native-ci
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.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2da90ce
ci: share one Linux native build across CI workflows
sunchao ba5f9fb
ci: run independent Linux checks alongside native build
sunchao 7374633
ci: restrict shared native build and checks token permissions
sunchao 8ae99c8
ci: validate shared native selection with centralized routing
sunchao e72cdb9
ci: derive shared native selection in the routing script
sunchao 0151f94
ci: skip Rust setup when compiling Spark JVM artifacts
sunchao 17f6f8f
ci: align shared native builds with merge queue policy
sunchao 79c161b
ci: preserve Maven bootstrap and Hive native routing
sunchao 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Large diffs are not rendered by default.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| # Single producer for the default Linux CI native library. The umbrella runs | ||
| # this whenever any Linux, Spark SQL, or Iceberg test consumer is selected. | ||
| name: Build Linux Native Library | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| RUST_VERSION: stable | ||
| RUST_BACKTRACE: 1 | ||
|
|
||
| jobs: | ||
| # Build native library once and share with all test jobs | ||
| build-native: | ||
| name: Build Native Library | ||
| runs-on: ubuntu-24.04 | ||
| container: | ||
| image: amd64/rust | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - name: Setup Rust toolchain | ||
| uses: ./.github/actions/setup-builder | ||
| with: | ||
| rust-version: ${{ env.RUST_VERSION }} | ||
| jdk-version: 17 # Matches the existing Linux producer, including libjvm linkage. | ||
|
|
||
| - name: Check Rust formatting | ||
| run: cd native && cargo fmt --all -- --check | ||
|
|
||
| - name: Restore Cargo cache | ||
| uses: actions/cache/restore@v6 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| native/target | ||
| key: ${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}-${{ hashFiles('native/**/*.rs') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}- | ||
|
|
||
| - name: Build native library (CI profile) | ||
| run: | | ||
| cd native | ||
| # CI profile: same overflow behavior as release, but faster compilation | ||
| # (no LTO, parallel codegen) | ||
| cargo build --profile ci | ||
| env: | ||
| RUSTFLAGS: "-Ctarget-cpu=x86-64-v3 -Clink-arg=-fuse-ld=bfd" | ||
|
|
||
| - name: Upload native library | ||
| uses: ./.github/actions/upload-artifact-retry | ||
| with: | ||
| name: native-lib-linux | ||
| path: native/target/ci/libcomet.so | ||
| retention-days: 1 | ||
|
|
||
| - name: Save Cargo cache | ||
| uses: actions/cache/save@v6 | ||
| if: github.ref == 'refs/heads/main' | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| native/target | ||
| key: ${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}-${{ hashFiles('native/**/*.rs') }} | ||
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.
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.