-
Notifications
You must be signed in to change notification settings - Fork 46
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
ci: use official action to setup rust toolchain #585
base: main
Are you sure you want to change the base?
Changes from 1 commit
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,14 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
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 link doesn't seem to work. it just goes to a generic support page |
||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,27 +10,20 @@ jobs: | |
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Install minimal stable with clippy and rustfmt | ||
uses: actions-rs/toolchain@v1 | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
components: rustfmt | ||
- name: format | ||
run: cargo fmt -- --check | ||
|
||
msrv: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Install minimal stable and cargo msrv | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- name: Install cargo-msrv | ||
shell: bash | ||
run: | | ||
|
@@ -41,21 +34,18 @@ jobs: | |
cargo msrv --path derive-macros/ verify --all-features | ||
cargo msrv --path ffi/ verify --all-features | ||
cargo msrv --path ffi-proc-macros/ verify --all-features | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTDOCFLAGS: -D warnings | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Install minimal stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- name: build docs | ||
run: cargo doc | ||
|
||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
|
@@ -65,18 +55,16 @@ jobs: | |
- ubuntu-latest | ||
- windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Install minimal stable with clippy and rustfmt | ||
uses: actions-rs/toolchain@v1 | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
components: clippy | ||
- name: build and lint with clippy | ||
run: cargo clippy --benches --tests --all-features -- -D warnings | ||
- name: lint without default features | ||
run: cargo clippy --no-default-features -- -D warnings | ||
|
||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
|
@@ -86,14 +74,9 @@ jobs: | |
- ubuntu-latest | ||
- windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Install minimal stable with clippy and rustfmt | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- name: test | ||
run: cargo test --workspace --verbose --all-features -- --skip read_table_version_hdfs | ||
|
||
|
@@ -109,7 +92,7 @@ jobs: | |
- name: Setup cmake | ||
uses: jwlawson/actions-setup-cmake@v2 | ||
with: | ||
cmake-version: '3.30.x' | ||
cmake-version: "3.30.x" | ||
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. In yaml double quotes allow escapes and other things, so I tend to prefer single quotes unless I need that, as, fewer surprises. Any reason you changed this? 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. auto-formatting ... maybe i need to make prettier or whoever it was less agressive :). |
||
- name: Install arrow-glib | ||
run: | | ||
if [ "$RUNNER_OS" == "Linux" ]; then | ||
|
@@ -186,14 +169,9 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: stable | ||
override: true | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Generate code coverage | ||
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json -- --skip read_table_version_hdfs | ||
- name: Upload coverage to Codecov | ||
|
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 was my auto-formatter in the IDE, since there are 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. hm that's interesting - guessing your editor is applying something 'extra' on top of rustfmt? I do prefer the old formatting, can we revert these changes? |
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.
oh nice! are we planning on enabling dependabot for the repo?
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.
well - i guess thats up for debate. but since this was literally just copy and paste from somewhere else, it was low cost to spark the discussion by just providing the solution 😆.
From my end, I think the utility may unfortunately be limited as auto-updates for the major dependencies (e.g. arrow) almost never work out of the box - at least in delta-rs. That said, I still landed on "let's add it" to keep the actions fresh and have the occasional rust version bump that works.
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.
yea I think it is helpful insofar as it just automatically opens small PRs to bump versions and we may (probably) have to manually help upgrade but the 'reminder' to upgrade seems useful? curious to hear what others think
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.
the dependabot-quickstart-guide doesn't recommend setting up manually like this, but rather suggests going into settings and letting github create this file. Wondering if we should just do it that way?
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.
I'm okay trying this out, but also a bit skeptical of the utility here. As far as I can tell it only runs
cargo update
. Generally with how we've set up ourCargo.toml
this will only do minor updates (i.e. it'll never update arrow 53->54). Maybe that's good, but we need a process to also runcargo outdated
and try and stay on top of more major updates as well, so I'm not sure how much time this saves us.