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>
This commit is contained in:
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: with:
ruby-version: 2.7.x 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 - uses: actions-rs/toolchain@v1
with: with:
toolchain: stable toolchain: stable
target: thumbv7em-none-eabihf target: thumbv7em-none-eabihf
override: true 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 - name: Install Deadlinks
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: install command: install
args: cargo-deadlinks args: |
cargo-deadlinks
- name: cargo doc - name: cargo doc
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
@ -126,14 +129,13 @@ jobs:
# auto-generated code. # auto-generated code.
args: --dir target/thumbv7em-none-eabihf/doc --ignore-fragments --check-http --check-intra-doc-links args: --dir target/thumbv7em-none-eabihf/doc --ignore-fragments --check-http --check-intra-doc-links
- name: Move firmware documents - name: Test Site
run: |
mkdir -p docs/_site/stabilizer
- name: Test User Manual
working-directory: docs working-directory: docs
run: | run: |
rake build # Install depedencies at our cache location
mv ../target/thumbv7em-none-eabihf/doc _site/stabilizer/firmware bundle config path vendor/bundle
rake test bundle install
bundle exec rake build
mv ../target/thumbv7em-none-eabihf/doc _site/stabilizer/firmware
bundle exec rake test