Skip to content

Commit ea0d319

Browse files
authored
Merge pull request #885 from Kobzol/linkcheck
Add link checking on CI
2 parents b6a25cd + 8297747 commit ea0d319

15 files changed

+60
-33
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Deploy To GitHub Pages
22
on:
33
schedule:
44
- cron: '0 22 * * *'
5-
pull_request:
65
push:
76
branches:
87
- master
@@ -16,18 +15,15 @@ jobs:
1615
- uses: actions/checkout@v4
1716
- name: Install mdbook
1817
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz
19-
- name: Check blacksmith format
20-
run: cargo fmt --check --manifest-path=blacksmith/Cargo.toml
2118
- name: Build book
2219
run: ./mdbook build
2320
- name: Upload artifact
24-
if: github.ref == 'refs/heads/master'
2521
uses: actions/upload-pages-artifact@v3
2622
with:
2723
path: ./book
2824

2925
deploy:
30-
if: github.ref == 'refs/heads/master' && github.repository_owner == 'rust-lang'
26+
if: github.repository_owner == 'rust-lang'
3127
needs: build
3228

3329
permissions:

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
test:
7+
name: CI
8+
runs-on: ubuntu-latest
9+
env:
10+
MDBOOK_VERSION: 0.4.51
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Install mdbook
14+
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz
15+
- name: Install mdbook-linkcheck
16+
run: cargo install mdbook-linkcheck@0.7.7 --locked
17+
- name: Check blacksmith format
18+
run: cargo fmt --check --manifest-path=blacksmith/Cargo.toml
19+
- name: Build book
20+
run: ./mdbook build

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ you to easily see and update changes you make.
2424
mdbook serve
2525
```
2626

27+
## Link checking
28+
29+
On CI, we automatically check if all intra-doc links in the Forge Markdown files are valid. If you would like to
30+
perform this check locally, install `mdbook-linkcheck` using `cargo install mdbook-linkcheck@0.7.7 --locked` and then
31+
simply run `mdbook build` or `mdbook serve`.
32+
2733
## JavaScript
2834

2935
Forge uses JavaScript to display dates for releases and "no tools breakage

book.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ smart-punctuation = true
6161
"platforms/zulip/triagebot.html" = "/triagebot/index.html"
6262
"core/blogs.html" = "/platforms/blogs.html"
6363
"core/index.html" = "/governance/council.html"
64+
65+
[output.linkcheck]
66+
follow-web-links = false
67+
optional = true

src/compiler/cross-team-collaboration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ label to a issue (you can include `@rustbot label +I-compiler-nominated` in
1010
your comment to do this).
1111

1212
Once nominated, the issue will be discussed in a upcoming [triage
13-
meeting](./triage-meeting.html). The compiler team doesn't always get through
13+
meeting](./meetings.md#triage-meeting). The compiler team doesn't always get through
1414
all nominated issues each week, so it can take more than one meeting for your
1515
issue to be discussed.
1616

@@ -60,7 +60,7 @@ Add the `I-compiler-nominated` label to a issue (you can use `@rustbot label
6060
+I-compiler-nominated` to do this).
6161

6262
Once nominated, the issue will be discussed in a upcoming [triage
63-
meeting](./triage-meeting.html). The compiler team doesn't always get through
63+
meeting](./meetings.md#triage-meeting). The compiler team doesn't always get through
6464
all nominated issues each week, so it can take more than one meeting for your
6565
issue to be discussed. In the compiler team's discussion, the issue may..
6666

src/compiler/membership.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This team discusses membership in the compiler team. There are currently two lev
55
* maintainers: members who have committed themselves to invest in the quality of the compiler and
66
health of the compiler team
77

8-
[infrastructure]: ../infra/index.html
8+
[infrastructure]: ../infra/README.md
99

1010
## The path to membership
1111
People who are looking to contribute to the compiler typically start in one of two ways. They may
@@ -52,9 +52,8 @@ Being promoted to member implies a number of privileges:
5252
It also implies some obligations (in some cases, optional obligations):
5353

5454
- Members will be asked if they wish to be added to the reviewer rotation.
55-
- Members may take part in various other [maintainer activities] to help the team.
56-
- Members are held to a higher standard than ordinary folk when it comes to the [Code of
57-
Conduct][CoC].
55+
- Members may take part in various other maintainer activities to help the team.
56+
- Members are held to a higher standard than ordinary folk when it comes to the [Code of Conduct][CoC].
5857

5958
[listed]: https://www.rust-lang.org/governance/teams/compiler
6059

@@ -82,7 +81,7 @@ After being a compiler team member for a year, members can request or be asked t
8281
actively helping to shape the direction of the team or some part of the compiler (or multiple
8382
parts).
8483

85-
- Compiler team maintainers are expected to participate in at least one [maintenance activities].
84+
- Compiler team maintainers are expected to participate in at least one maintenance activities.
8685
- Compiler team maintainers are identified with the "Maintainer" role on the rust-lang website.
8786

8887
## How promotion decisions are made

src/compiler/prioritization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,5 +217,5 @@ After the meeting, there are a few closing tasks:
217217
[forge_announce]: https://github.com/rust-lang/rust-forge/issues?q=label%3Afinished-final-comment-period+label%3Ato-announce
218218
[fcps]: https://github.com/rust-lang/compiler-team/issues?q=label%3Amajor-change+label%3Ato-announce
219219
[mcps]: https://github.com/rust-lang/compiler-team/issues?q=label%3Amajor-change+label%3Ato-announce
220-
[relese_backports]: ../release/backporting.md
220+
[release_backports]: ../release/backporting.md
221221
[compiler_nominated]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AI-compiler-nominated+label%3AT-compiler

src/compiler/proposals-and-stabilization.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ the nature of the proposal, described below.
6464

6565
[rust-lang/compiler-team]: https://github.com/rust-lang/compiler-team
6666
[design meeting proposal]: ./meetings.md#steeringplanning-meeting
67+
[major change template]: https://github.com/rust-lang/compiler-team/issues/new?template=major_change.md
6768

6869
#### What kinds of comments should go on a MCP in the compiler-team repo?
6970
Please direct technical conversation to the Zulip stream.
@@ -360,7 +361,7 @@ See [*Backports*](./backports.md).
360361

361362
### Adding ecosystem/integration test jobs/components to rust-lang/rust CI
362363

363-
See [*Adding ecosystem/integration test jobs/components to rust-lang/rust CI*](./proposals-and-stabilization/custom-test-jobs.md).
364+
See [*Adding ecosystem/integration test jobs/components to rust-lang/rust CI*](./proposals-and-stabilization/ecosystem-integration-tests.md).
364365

365366

366367
[stabilization_guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html

src/compiler/reviews.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,3 +497,4 @@ team](https://www.rust-lang.org/governance/teams/moderation) to step in.
497497

498498
[coc]: https://www.rust-lang.org/policies/code-of-conduct
499499
[rollup]: ../release/rollups.md
500+
[MCP]: ./proposals-and-stabilization.md#how-do-i-submit-an-mcp

src/compiler/third-party-out-of-tree.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ in `rust-lang`) and that the experience is uniform across `rust-lang/rust` and t
1010
### When should parts of the compiler be extracted into an out-of-tree crate?
1111
This is left to the discretion of compiler team members but should be discussed with the rest of
1212
the team, either through raising the question at the weekly triage meeting or asynchronously using
13-
[an approval decision](./proposals-and-stabilizations.md). If the crate is a product of a working
13+
[an approval decision](./proposals-and-stabilization.md). If the crate is a product of a working
1414
group, there should already be agreement within the working group that an out-of-tree crate is
1515
suitable.
1616

@@ -123,9 +123,9 @@ In summary, the process for establishing an out-of-tree crate is as follows:
123123

124124
> This crate is developed and maintained by the [Rust compiler team](https://github.com/rust-lang/compiler-team/tree/master/procedures) for use within
125125
> `rustc`, in particular, it is the responsibility of the
126-
> [`.template`](../../working-groups/template) working group. This crate [will have regular
127-
> breaking changes and provides no stability guarantees|is intended to remain stable and have
128-
> limited breaking changes].
126+
> [`.template`](./working-areas.md) working area. This crate will have regular
127+
> breaking changes and provides no stability guarantees | is intended to remain stable and have
128+
> limited breaking changes.
129129
1. Include the [LICENSE-APACHE][apache] and [LICENSE-MIT][mit] files from `rust-lang/rust`.
130130
1. Include or link the [CODE_OF_CONDUCT][coc] file from `rust-lang/rust`.
131131
1. Create a relevant `.gitignore` ([here's a sane default][gitignore]).
@@ -137,7 +137,7 @@ In summary, the process for establishing an out-of-tree crate is as follows:
137137
[gitignore]: https://gitignore.io/api/vim,rust,emacs,clion,visualstudio,visualstudiocode
138138
[triagebot]: https://github.com/rust-lang/rust/blob/master/triagebot.toml
139139
[apache]: https://github.com/rust-lang/rust/blob/master/LICENSE-APACHE
140-
[coc]: ../../about/code_of_conduct
140+
[coc]: https://www.rust-lang.org/policies/code-of-conduct
141141
[mit]: https://github.com/rust-lang/rust/blob/master/LICENSE-MIT
142142

143143
## Third-party crates

0 commit comments

Comments
 (0)