Skip to content
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

Port to github actions #2337

Merged
merged 2 commits into from
May 23, 2020
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
64 changes: 64 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI
on: [push, pull_request]

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Update rustup
run: rustup self update
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.41.0 -c rust-docs
rustup default 1.41.0
- name: Install mdbook
run: |
mkdir bin
curl -sSL https:/rust-lang/mdBook/releases/download/v0.3.5/mdbook-v0.3.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "##[add-path]$(pwd)/bin"
- name: Report versions
run: |
rustup --version
rustc -Vv
mdbook --version
- name: Run tests
run: mdbook test
lint:
name: Run lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Update rustup
run: rustup self update
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install nightly -c rust-docs
rustup default nightly
- name: Install mdbook
run: |
mkdir bin
curl -sSL https:/rust-lang/mdBook/releases/download/v0.3.5/mdbook-v0.3.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "##[add-path]$(pwd)/bin"
- name: Report versions
run: |
rustup --version
rustc -Vv
mdbook --version
- name: Spellcheck
run: bash ci/spellcheck.sh list
- name: Lint for local file paths
run: |
mdbook build
cargo run --bin lfp src
- name: Validate references
run: bash ci/validate.sh
- name: Check for broken links
run: |
curl -sSLo linkcheck.sh \
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
# Cannot use --all here because of the generated redirect pages aren't available.
sh linkcheck.sh book
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion ADMIN_TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ occasional maintenance tasks.

## Update the `rustc` version

- Change the version number in `.travis.yml`
- Change the version number in `.github/workflows/main.yml`
- Change the version number in `rust-toolchain`, which should change the version you're using
locally with `rustup`
- Change the version number in `src/title-page.md`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The Rust Programming Language

[![Build Status](https://travis-ci.com/rust-lang/book.svg?branch=master)](https://travis-ci.com/rust-lang/book)
![Build Status](https://github.com/rust-lang/book/workflows/main/badge.svg)

This repository contains the source of "The Rust Programming Language" book.

Expand Down
4 changes: 4 additions & 0 deletions ci/validate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
for file in src/*.md ; do
echo Checking references in $file
cargo run --quiet --bin link2print < $file > /dev/null
done