-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #134907 - Kobzol:rustc-dev-guide-josh, r=ehuss
Turn rustc-dev-guide into a Josh subtree Discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/196385-t-compiler.2Fwg-rustc-dev-guide/topic/a.20move.20to.20main.20repo.20.28rust-lang.2Frust.29). Accompanying rustc-dev-guide PR: rust-lang/rustc-dev-guide#2183 I didn't create a bootstrap step for rustc-dev-guide yet, because the rustc-dev-guide version that we currently use in this repo doesn't have linkcheck enabled and that fails tests. The subtree starts with commit [ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e](rust-lang/rustc-dev-guide@ad93c5f). What I did: ``` export DIR=src/doc/rustc-dev-guide # Remove submodule git submodule status ${DIR} git submodule deinit ${DIR} git rm -r --cached ${DIR} rm -rf ${DIR} # Remove rustc-dev-guide from .gitmodules git commit -m"Removed `${DIR}` submodule" # Import history with josh git fetch https://github.com/rust-lang/rustc-dev-guide ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e josh-filter ':prefix=src/doc/rustc-dev-guide' FETCH_HEAD git merge --allow-unrelated FILTERED_HEAD # A few follow-up cleanup commits ``` r? ehuss
- Loading branch information
Showing
250 changed files
with
348,506 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule rustc-dev-guide
deleted from
ad93c5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root = true | ||
|
||
[src/*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
max_line_length = 100 | ||
|
||
[ci/*.sh] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto eol=lf | ||
|
||
# git grep shouldn't match entries in huge minified javascript | ||
*.min.js binary | ||
|
||
# Older git versions try to fix line endings on images, this prevents it. | ||
*.png binary | ||
*.jpg binary | ||
*.ico binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
schedule: | ||
# Run at 18:00 UTC every day | ||
- cron: '0 18 * * *' | ||
|
||
jobs: | ||
ci: | ||
if: github.repository == 'rust-lang/rustc-dev-guide' | ||
runs-on: ubuntu-latest | ||
env: | ||
MDBOOK_VERSION: 0.4.21 | ||
MDBOOK_LINKCHECK2_VERSION: 0.8.1 | ||
MDBOOK_MERMAID_VERSION: 0.12.6 | ||
MDBOOK_TOC_VERSION: 0.11.2 | ||
DEPLOY_DIR: book/html | ||
BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# linkcheck needs the base commit. | ||
fetch-depth: 0 | ||
|
||
- name: Cache binaries | ||
id: mdbook-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin | ||
key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }} | ||
|
||
- name: Cache linkcheck | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/book/linkcheck | ||
key: ${{ runner.os }}-${{ hashFiles('./book/linkcheck') }} | ||
|
||
- name: Install latest nightly Rust toolchain | ||
if: steps.mdbook-cache.outputs.cache-hit != 'true' | ||
run: | | ||
rustup update nightly | ||
rustup override set nightly | ||
- name: Install Dependencies | ||
if: steps.mdbook-cache.outputs.cache-hit != 'true' | ||
run: | | ||
cargo install mdbook --version ${{ env.MDBOOK_VERSION }} | ||
cargo install mdbook-linkcheck2 --version ${{ env.MDBOOK_LINKCHECK2_VERSION }} | ||
cargo install mdbook-toc --version ${{ env.MDBOOK_TOC_VERSION }} | ||
cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }} | ||
- name: Check build | ||
run: ENABLE_LINKCHECK=1 mdbook build | ||
|
||
- name: Deploy to gh-pages | ||
if: github.event_name == 'push' | ||
run: | | ||
touch "${{ env.DEPLOY_DIR }}/.nojekyll" | ||
cp CNAME "${{ env.DEPLOY_DIR }}" | ||
cd "${{ env.DEPLOY_DIR }}" | ||
rm -rf .git | ||
git init | ||
git config user.name "Deploy from CI" | ||
git config user.email "" | ||
git add . | ||
git commit -m "Deploy ${GITHUB_SHA} to gh-pages" | ||
git push --quiet -f "https://x-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}" HEAD:gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Date-Check | ||
|
||
on: | ||
schedule: | ||
# Run at noon UTC every 1st of the month | ||
- cron: '00 12 01 * *' | ||
|
||
# Allow manually starting the workflow | ||
workflow_dispatch: | ||
|
||
jobs: | ||
date-check: | ||
if: github.repository == 'rust-lang/rustc-dev-guide' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Ensure Rust is up-to-date | ||
run: | | ||
rustup update stable | ||
- name: Run `date-check` | ||
working-directory: ci/date-check | ||
run: | | ||
cargo run -- ../../src/ > ../../date-check-output.txt | ||
- name: Open issue | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const fs = require('fs'); | ||
const rawText = fs.readFileSync('date-check-output.txt', { encoding: 'utf8' }); | ||
const title = rawText.split('\n')[0]; | ||
if (title != 'empty') { | ||
const body = rawText.split('\n').slice(1).join('\n'); | ||
github.rest.issues.create({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
title, | ||
body, | ||
}); | ||
console.log('Opened issue.'); | ||
} else { | ||
console.log('No dates to triage.'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
book | ||
|
||
ci/date-check/target/ | ||
|
||
# Generated by check-in.sh | ||
pulls.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Jynn Nelson <[email protected]> <[email protected]> | ||
Jynn Nelson <[email protected]> <[email protected]> | ||
Jynn Nelson <[email protected]> <[email protected]> | ||
Jynn Nelson <[email protected]> <[email protected]> | ||
Jynn Nelson <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cff-version: 1.2.0 | ||
message: If you use this guide, please cite it using these metadata. | ||
title: Rust Compiler Development Guide (rustc-dev-guide) | ||
abstract: A guide to developing the Rust compiler (rustc) | ||
authors: | ||
- name: "The Rust Project Developers" | ||
date-released: "2018-01-16" | ||
license: "MIT OR Apache-2.0" | ||
repository-code: "https://github.com/rust-lang/rustc-dev-guide" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rustc-dev-guide.rust-lang.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# The Rust Code of Conduct | ||
|
||
This repository follows the [Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct) of the Rust organization. |
Oops, something went wrong.