Skip to content

Commit d5ad1f1

Browse files
smkleinzephraph
andauthored
Pin toolchain in actions (#139)
* Pin toolchain in actions * Update actions-rs, set default=true * Show rustc version * Add Cargo.lock, rust-toolchain, update output * update to latest stable toolchain * Remove toolchain version from action in favor of toolchain file * Drop rust-toolchain's .toml extension until action-rs supports it * Use forked toolchain action * Update fork, add comment about upstream PR * Update fork again * Switch to oxide's fork * Update doc block as suggested in PR review * Fix typo * Add some details to maintainers about renovate Co-authored-by: Justin Bennett <[email protected]> Co-authored-by: Justin Bennett <[email protected]>
1 parent 4dfa125 commit d5ad1f1

File tree

3 files changed

+55
-37
lines changed

3 files changed

+55
-37
lines changed

.github/workflows/rust.yml

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,55 @@ name: Rust
55

66
on:
77
push:
8-
branches: [ main ]
8+
branches: [main]
99
pull_request:
10-
branches: [ main ]
10+
branches: [main]
1111

1212
jobs:
1313
check-style:
1414
runs-on: ubuntu-18.04
1515
steps:
16-
# actions/checkout@v2
17-
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
18-
- uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
19-
with:
20-
toolchain: nightly-2021-03-25
21-
default: false
22-
components: rustfmt
23-
- name: Report cargo version
24-
run: cargo +nightly-2021-03-25 --version
25-
- name: Report rustfmt version
26-
run: cargo +nightly-2021-03-25 fmt -- --version
27-
- name: Check style
28-
run: cargo +nightly-2021-03-25 fmt -- --check
16+
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
17+
- uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
18+
with:
19+
toolchain: nightly-2021-03-25
20+
default: false
21+
components: rustfmt
22+
- name: Report cargo version
23+
run: cargo +nightly-2021-03-25 --version
24+
- name: Report rustfmt version
25+
run: cargo +nightly-2021-03-25 fmt -- --version
26+
- name: Check style
27+
run: cargo +nightly-2021-03-25 fmt -- --check
2928

3029
clippy-lint:
3130
runs-on: ubuntu-18.04
3231
steps:
33-
# actions/checkout@v2
34-
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
35-
- name: Report cargo version
36-
run: cargo --version
37-
- name: Report Clippy version
38-
run: cargo clippy -- --version
39-
- name: Run Clippy Lints
40-
run: cargo clippy -- -D warnings
32+
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
33+
- name: Report cargo version
34+
run: cargo --version
35+
- name: Report Clippy version
36+
run: cargo clippy -- --version
37+
- name: Run Clippy Lints
38+
run: cargo clippy -- -D warnings
4139

4240
build-and-test:
4341
runs-on: ${{ matrix.os }}
4442
strategy:
4543
matrix:
46-
os: [ ubuntu-18.04, windows-2019, macos-10.15 ]
44+
os: [ubuntu-18.04, windows-2019, macos-10.15]
4745
steps:
48-
# actions/checkout@v2
49-
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
50-
- uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
51-
with:
52-
profile: minimal
53-
toolchain: stable
54-
override: true
55-
- name: Report cargo version
56-
run: cargo --version
57-
- name: Build
58-
run: cargo build --locked --all-targets --verbose
59-
- name: Run tests
60-
run: cargo test --locked --verbose
46+
- uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
47+
# Temporary fork until https://github.com/actions-rs/toolchain/pull/209 is merged
48+
- uses: oxidecomputer/actions-rs_toolchain@ad3f86084a8a5acf2c09cb691421b31cf8af7a36
49+
with:
50+
profile: minimal
51+
override: true
52+
- name: Report cargo version
53+
run: cargo --version
54+
- name: Report rustc version
55+
run: rustc --version
56+
- name: Build
57+
run: cargo build --locked --all-targets --verbose
58+
- name: Run tests
59+
run: cargo test --locked --verbose

MAINTAINERS.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ We currently configure Dependabot to treat Dropshot as an application so that it
3636

3737
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].
3838

39+
== Renovate
40+
41+
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.
42+
43+
=== Dependency Dashboard
44+
45+
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.
46+
47+
=== Debugging Renovate
48+
49+
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].
3950

4051
== Publishing a new release
4152

rust-toolchain.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# We use a specific toolchain revision to ensure our tests - which
2+
# occasionally depend on specific compiler output - remain stable
3+
# for all developers until the toolchain is explicitly advanced.
4+
# The intent is to keep this updated as new stable versions are relased.
5+
6+
[toolchain]
7+
channel = "1.57.0"
8+
profile = "default"

0 commit comments

Comments
 (0)