-
Notifications
You must be signed in to change notification settings - Fork 266
chore: Use nightly toolchain for check #445
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
Changes from 1 commit
568bad7
bd78137
3322d3c
f707cae
a0ab8e6
dc430da
4862144
9e9f9c6
b72755c
7896c83
b4db414
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 |
---|---|---|
|
@@ -29,6 +29,10 @@ concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
rust_nightly: "nightly-2024-06-10" | ||
rust_min: "1.77.1" | ||
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. How about using 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. fixed. |
||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
@@ -38,6 +42,25 @@ jobs: | |
- name: Check License Header | ||
uses: apache/skywalking-eyes/[email protected] | ||
|
||
- name: Install Rust ${{ env.rust_nightly }} | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.rust_nightly }} | ||
|
||
- name: Install cargo-sort | ||
uses: baptiste0928/cargo-install@v3 | ||
liurenjie1024 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
crate: cargo-sort | ||
version: '1.0.9' | ||
|
||
- name: Install taplo-cli | ||
uses: baptiste0928/cargo-install@v3 | ||
with: | ||
crate: taplo-cli | ||
version: '0.9.0' | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Cargo format | ||
run: make check-fmt | ||
|
||
|
@@ -61,14 +84,29 @@ jobs: | |
- windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust ${{ env.rust_min }} | ||
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.
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 different from latest stable. This is the minimum version we support. |
||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.rust_min }} | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Build | ||
run: cargo build | ||
run: make build | ||
|
||
unit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust ${{ env.rust_min }} | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.rust_min }} | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Test | ||
run: cargo test --no-fail-fast --all-targets --all-features --workspace | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ on: | |
- ".github/workflows/publish.yml" | ||
workflow_dispatch: | ||
|
||
|
||
env: | ||
rust_min: "1.77.1" | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
@@ -42,6 +46,14 @@ jobs: | |
- "crates/catalog/rest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust ${{ env.rust_min }} | ||
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. The same. 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. Ditto. |
||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.rust_min }} | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Dryrun ${{ matrix.package }} | ||
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. We should not run this as this will always fail except in tagging, since at that time crates depending on iceberg will fail to compile |
||
working-directory: ${{ matrix.package }} | ||
run: cargo publish --all-features --dry-run | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,26 +19,23 @@ | |
|
||
RUST_LOG = debug | ||
|
||
RUST_NIGHTLY_CHANNEL = nightly-2024-06-10 | ||
|
||
build: | ||
cargo build --all-targets --all-features --workspace | ||
|
||
install-night-toolchain: | ||
rustup toolchain install $(RUST_NIGHTLY_CHANNEL) -c rustfmt -c clippy | ||
check-fmt: | ||
cargo fmt --all -- --check | ||
|
||
check-fmt: install-night-toolchain | ||
cargo +$(RUST_NIGHTLY_CHANNEL) fmt --all -- --check | ||
check-clippy: | ||
cargo clippy --all-targets --all-features --workspace -- -D warnings | ||
|
||
check-clippy: install-night-toolchain | ||
cargo +$(RUST_NIGHTLY_CHANNEL) clippy --all-targets --all-features --workspace -- -D warnings | ||
install-cargo-sort: | ||
cargo install [email protected] | ||
|
||
cargo-sort: | ||
cargo install cargo-sort | ||
cargo-sort: install-cargo-sort | ||
cargo sort -c -w | ||
|
||
install-taplo-cli: | ||
cargo install taplo-cli --locked | ||
cargo install taplo-cli@0.9.0 | ||
|
||
fix-toml: install-taplo-cli | ||
taplo fmt | ||
|
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.
We don't need to specify this as we load rust-toolchain by default.
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.
Fixed.