405: Accelerating doc CI tests r=jordens a=ryan-summers

This PR fixes #403 by utilize github actions caches to accelerate the doc test CI check. `cargo-deadlinks` is cached, ruby gems are cached, and Rust dependency installations are cached.

Questions:
Should the Rust cache be tagged on a specific key so that we don't pollute the cache with each PR?

Co-authored-by: Ryan Summers <ryan.summers@vertigo-designs.com>
master
bors[bot] 2021-07-19 13:59:07 +00:00 committed by GitHub
commit f29a6639a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 17 deletions

View File

@ -93,24 +93,27 @@ jobs:
with:
ruby-version: 2.7.x
- name: Setup Jekyll
working-directory: docs
run: |
gem update
gem update bundler
gem install jekyll bundler
bundler install
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv7em-none-eabihf
override: true
- uses: actions/cache@v2
with:
path: docs/vendor/bundle
key: ${{runner.os}}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: Swatinem/rust-cache@v1
- name: Install Deadlinks
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-deadlinks
args: |
cargo-deadlinks
- name: cargo doc
uses: actions-rs/cargo@v1
@ -126,14 +129,13 @@ jobs:
# auto-generated code.
args: --dir target/thumbv7em-none-eabihf/doc --ignore-fragments --check-http --check-intra-doc-links
- name: Move firmware documents
run: |
mkdir -p docs/_site/stabilizer
- name: Test User Manual
- name: Test Site
working-directory: docs
run: |
rake build
mv ../target/thumbv7em-none-eabihf/doc _site/stabilizer/firmware
rake test
# Install depedencies at our cache location
bundle config path vendor/bundle
bundle install
bundle exec rake build
mv ../target/thumbv7em-none-eabihf/doc _site/stabilizer/firmware
bundle exec rake test