-
Notifications
You must be signed in to change notification settings - Fork 0
take from python wheel to support arm #2
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
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9fc5788
take from python wheel to support arm
aryehlev d754439
fix all model pulls.
aryehlev d4e4b76
add github actions.
aryehlev 5501fb5
add release action.
aryehlev 1fe33cb
try fixing ci.
aryehlev 5d7b5f3
remove polars checks for now.
aryehlev 13c6ac3
fix linter.
aryehlev e731bf2
fix linter dead code.
aryehlev 942af3b
change release to accept inputs.
aryehlev 444aade
fix formating and remove polars support for now.
aryehlev 31a7663
fix windows linking.
aryehlev 001db55
fix windows and put back regular linking.
aryehlev 0184876
put back failed.
aryehlev 77933b1
format build.rs
aryehlev b012a8a
change to c++17.
aryehlev 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,207 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test ${{ matrix.os }} (${{ matrix.arch }}) - LightGBM ${{ matrix.lightgbm_version }} | ||
| runs-on: ${{ matrix.runner }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| # macOS ARM64 (M1/M2/M3) | ||
| - os: macos | ||
| arch: arm64 | ||
| runner: macos-14 | ||
| lightgbm_version: "4.6.0" | ||
| - os: macos | ||
| arch: arm64 | ||
| runner: macos-14 | ||
| lightgbm_version: "4.5.0" | ||
|
|
||
| # macOS x86_64 (Intel) | ||
| - os: macos | ||
| arch: x86_64 | ||
| runner: macos-15-large | ||
| lightgbm_version: "4.6.0" | ||
|
|
||
| # Linux x86_64 | ||
| - os: linux | ||
| arch: x86_64 | ||
| runner: ubuntu-latest | ||
| lightgbm_version: "4.6.0" | ||
| - os: linux | ||
| arch: x86_64 | ||
| runner: ubuntu-latest | ||
| lightgbm_version: "4.5.0" | ||
|
|
||
| - os: linux | ||
| arch: arm64 | ||
| runner: ubuntu-latest | ||
| lightgbm_version: "4.6.0" | ||
|
|
||
| # Windows x86_64 | ||
| - os: windows | ||
| arch: x86_64 | ||
| runner: windows-latest | ||
| lightgbm_version: "4.6.0" | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/registry | ||
| key: ${{ runner.os }}-${{ matrix.arch }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-${{ matrix.arch }}-cargo-registry- | ||
|
|
||
| - name: Cache cargo index | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/git | ||
| key: ${{ runner.os }}-${{ matrix.arch }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-${{ matrix.arch }}-cargo-index- | ||
|
|
||
| - name: Cache cargo build | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: target | ||
| key: ${{ runner.os }}-${{ matrix.arch }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-${{ matrix.arch }}-cargo-build-target- | ||
|
|
||
| - name: Install system dependencies (Linux) | ||
| if: matrix.os == 'linux' | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libclang-dev | ||
|
|
||
| - name: Install system dependencies (macOS) | ||
| if: matrix.os == 'macos' | ||
| run: | | ||
| brew install libomp | ||
|
|
||
| - name: Check build (no features) | ||
| env: | ||
| LIGHTGBM_VERSION: ${{ matrix.lightgbm_version }} | ||
| run: cargo check --verbose | ||
|
|
||
| - name: Build (no features) | ||
| env: | ||
| LIGHTGBM_VERSION: ${{ matrix.lightgbm_version }} | ||
| run: cargo build --verbose | ||
|
|
||
| - name: Run tests (no features) | ||
| env: | ||
| LIGHTGBM_VERSION: ${{ matrix.lightgbm_version }} | ||
| run: cargo test --verbose | ||
|
|
||
| - name: Build examples | ||
| env: | ||
| LIGHTGBM_VERSION: ${{ matrix.lightgbm_version }} | ||
| run: | | ||
| cargo build --example basic_usage --verbose | ||
| cargo build --example advanced_usage --verbose | ||
|
|
||
| - name: Verify library architecture (macOS) | ||
| if: matrix.os == 'macos' | ||
| run: | | ||
| echo "Checking library architecture..." | ||
| file target/debug/lib_lightgbm.dylib | ||
| lipo -info target/debug/lib_lightgbm.dylib | ||
|
|
||
| - name: Verify library architecture (Linux) | ||
| if: matrix.os == 'linux' | ||
| run: | | ||
| echo "Checking library architecture..." | ||
| file target/debug/lib_lightgbm.so | ||
| readelf -h target/debug/lib_lightgbm.so | grep Machine | ||
|
|
||
| - name: Verify library exists (Windows) | ||
| if: matrix.os == 'windows' | ||
| run: | | ||
| echo "Checking library exists..." | ||
| Get-Item target/debug/lib_lightgbm.dll | ||
|
|
||
| clippy: | ||
| name: Clippy | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: clippy | ||
|
|
||
| - name: Run clippy (no features) | ||
| run: cargo clippy -- -D warnings | ||
|
|
||
| fmt: | ||
| name: Format | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rustfmt | ||
|
|
||
| - name: Check formatting | ||
| run: cargo fmt -- --check | ||
|
|
||
| # Test minimum supported LightGBM version | ||
| min-version: | ||
| name: Test minimum LightGBM version | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Test with LightGBM 4.0.0 | ||
| env: | ||
| LIGHTGBM_VERSION: "4.0.0" | ||
| run: | | ||
| cargo check --verbose | ||
| cargo build --verbose | ||
|
|
||
| # Test unsupported platform (should fail gracefully) | ||
| # Commented out because it requires manual verification | ||
| unsupported-platform: | ||
| name: Test Windows ARM64 (unsupported) | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Add ARM64 target | ||
| run: rustup target add aarch64-pc-windows-msvc | ||
|
|
||
| - name: Test unsupported platform detection | ||
| continue-on-error: true | ||
| run: cargo build --target aarch64-pc-windows-msvc --verbose | ||
| id: unsupported_build | ||
|
|
||
| - name: Verify build failed with correct error | ||
| if: steps.unsupported_build.outcome == 'failure' | ||
| run: echo "Build failed as expected for Windows ARM64" | ||
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.
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.
Critical: Linux ARM64 testing will not work with ubuntu-latest runner.
GitHub's
ubuntu-latestrunners are x86_64 only. This matrix entry will build for x86_64 architecture despite specifyingarch: arm64, providing false confidence that ARM64 Linux builds work.Options to fix:
If you don't have ARM64 runners, apply this diff to remove the misleading entry:
📝 Committable suggestion
🤖 Prompt for AI Agents