Skip to content

Pin toolchain in actions #139

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
merged 17 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 36 additions & 37 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,55 @@ name: Rust

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
check-style:
runs-on: ubuntu-18.04
steps:
# actions/checkout@v2
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
- uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
with:
toolchain: nightly-2021-03-25
default: false
components: rustfmt
- name: Report cargo version
run: cargo +nightly-2021-03-25 --version
- name: Report rustfmt version
run: cargo +nightly-2021-03-25 fmt -- --version
- name: Check style
run: cargo +nightly-2021-03-25 fmt -- --check
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
- uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
with:
toolchain: nightly-2021-03-25
default: false
components: rustfmt
- name: Report cargo version
run: cargo +nightly-2021-03-25 --version
- name: Report rustfmt version
run: cargo +nightly-2021-03-25 fmt -- --version
- name: Check style
run: cargo +nightly-2021-03-25 fmt -- --check

clippy-lint:
runs-on: ubuntu-18.04
steps:
# actions/checkout@v2
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
- name: Report cargo version
run: cargo --version
- name: Report Clippy version
run: cargo clippy -- --version
- name: Run Clippy Lints
run: cargo clippy -- -D warnings
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
- name: Report cargo version
run: cargo --version
- name: Report Clippy version
run: cargo clippy -- --version
- name: Run Clippy Lints
run: cargo clippy -- -D warnings

build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-18.04, windows-2019, macos-10.15 ]
os: [ubuntu-18.04, windows-2019, macos-10.15]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like a lot of this file was reformatted and that makes it a little harder to view the diffs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yeah, sorry about that. I'll revert those changes.

Copy link
Contributor

@zephraph zephraph Jan 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, one note: You can hide whitespace changes in diffs

image

I usually have that enabled which is probably why I didn't noticed the formatting diffs.

(I'll still revert them though)

steps:
# actions/checkout@v2
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
- uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
with:
profile: minimal
toolchain: stable
override: true
- name: Report cargo version
run: cargo --version
- name: Build
run: cargo build --locked --all-targets --verbose
- name: Run tests
run: cargo test --locked --verbose
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
# Temporary fork until https://github.com/actions-rs/toolchain/pull/209 is merged
- uses: oxidecomputer/actions-rs_toolchain@ad3f86084a8a5acf2c09cb691421b31cf8af7a36
with:
profile: minimal
override: true
- name: Report cargo version
run: cargo --version
- name: Report rustc version
run: rustc --version
- name: Build
run: cargo build --locked --all-targets --verbose
- name: Run tests
run: cargo test --locked --verbose
11 changes: 11 additions & 0 deletions MAINTAINERS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ We currently configure Dependabot to treat Dropshot as an application so that it

If you find yourself trying to debug what Dependabot is doing, you can https://github.com/oxidecomputer/dropshot/network/updates[view its activity on GitHub by clicking the Insights tab, then "Dependency Graph" on the left, and then the "Dependabot" subtab]. You'll see sections for dropshot/Cargo.toml and dropshot_endpoint/Cargo.toml. For each one, you can click the "Last checked" link to get a log of its last run. This may only make sense if you've looked at the https://github.com/dependabot/dependabot-core/[source].

== Renovate

Renovate is another dependency management tool which we're utilizing for a smaller set of automated updates. It's currently responsible for opening update PRs for GitHub actions and rust-toolchain versions. The repo's renovate configuration can be found https://github.com/oxidecomputer/dropshot/blob/main/.github/renovate.json[here] with most of the functionality coming from our https://github.com/oxidecomputer/renovate-config[shared renovate config repo]. Refer to the readme of that repo for more information about what shared renovate rules exist and how to configure them.

=== Dependency Dashboard

Renovate includes the ability to gate dependency updates behind an automated issue called a dependency dashboard. Dropshot's dependency dashboard is at https://github.com/oxidecomputer/dropshot/issues/238[oxidecomputer/dropshot#238]. This functionality is useful to test what types of updates Renovate may queue up on a configuration change without creating unnecessary PRs. The issue itself is created automatically and must be https://docs.renovatebot.com/key-concepts/dashboard/#how-to-disable-the-dashboard[disabled via configuration] if it's no longer needed.

=== Debugging Renovate

Like Dependabot, Renovate provides a log for update runs related to the project. See https://app.renovatebot.com/dashboard#github/oxidecomputer/dropshot[Dropshot's renovate log].

== Publishing a new release

Expand Down
8 changes: 8 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# We use a specific toolchain revision to ensure our tests - which
# occasionally depend on specific compiler output - remain stable
# for all developers until the toolchain is explicitly advanced.
# The intent is to keep this updated as new stable versions are relased.

[toolchain]
channel = "1.57.0"
profile = "default"