-
Notifications
You must be signed in to change notification settings - Fork 196
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
chore: Use nightly toolchain for check #445
Changes from 7 commits
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# 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. | ||
|
||
name: Prepare Rust Builder | ||
description: 'Prepare Rust Build Environment' | ||
inputs: | ||
rust-version: | ||
description: 'version of rust to install (e.g. stable)' | ||
required: true | ||
default: 'stable' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Rust toolchain | ||
shell: bash | ||
run: | | ||
echo "Installing ${{ inputs.rust-version }}" | ||
rustup toolchain install ${{ inputs.rust-version }} | ||
rustup default ${{ inputs.rust-version }} | ||
rustup component add rustfmt clippy | ||
- name: Fixup git permissions | ||
# https://github.com/actions/checkout/issues/766 | ||
shell: bash | ||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" |
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" | ||
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 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 commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
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,17 @@ jobs: | |
- name: Check License Header | ||
uses: apache/skywalking-eyes/[email protected] | ||
|
||
- name: Setup Rust toolchain | ||
uses: ./.github/actions/setup-builder | ||
with: | ||
rust-version: ${{ env.rust_nightly }} | ||
|
||
- name: Install cargo-sort | ||
run: make install-cargo-sort | ||
|
||
- name: Install taplo-cli | ||
run: make install-taplo-cli | ||
|
||
- name: Cargo format | ||
run: make check-fmt | ||
|
||
|
@@ -61,14 +76,25 @@ jobs: | |
- windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust toolchain | ||
uses: ./.github/actions/setup-builder | ||
with: | ||
rust-version: ${{ env.rust_min }} | ||
|
||
- name: Build | ||
run: cargo build | ||
run: make build | ||
|
||
unit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust toolchain | ||
uses: ./.github/actions/setup-builder | ||
with: | ||
rust-version: ${{ env.rust_min }} | ||
|
||
- 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,12 @@ jobs: | |
- "crates/catalog/rest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust toolchain | ||
uses: ./.github/actions/setup-builder | ||
with: | ||
rust-version: ${{ env.rust_min }} | ||
|
||
- 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 |
---|---|---|
|
@@ -20,24 +20,27 @@ | |
RUST_LOG = debug | ||
|
||
build: | ||
cargo build | ||
cargo build --all-targets --all-features --workspace | ||
|
||
check-fmt: | ||
cargo fmt --all -- --check | ||
cargo fmt --all -- --check | ||
|
||
check-clippy: | ||
cargo clippy --all-targets --all-features --workspace -- -D warnings | ||
cargo clippy --all-targets --all-features --workspace -- -D warnings | ||
|
||
cargo-sort: | ||
cargo install cargo-sort | ||
install-cargo-sort: | ||
cargo install [email protected] | ||
|
||
cargo-sort: install-cargo-sort | ||
cargo sort -c -w | ||
|
||
fix-toml: | ||
cargo install taplo-cli --locked | ||
install-taplo-cli: | ||
cargo install [email protected] | ||
|
||
fix-toml: install-taplo-cli | ||
taplo fmt | ||
|
||
check-toml: | ||
cargo install taplo-cli --locked | ||
check-toml: install-taplo-cli | ||
taplo check | ||
|
||
check: check-fmt check-clippy cargo-sort check-toml | ||
|
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.
This file is heavily inspire by datafusion, should we add it in some place? cc @Xuanwo @Fokko