Skip to content

Commit

Permalink
CI: don't use a prebuilt container in the "Book" workflow (#403)
Browse files Browse the repository at this point in the history
The "Book" workflow uses a prebuilt Docker image "scylla-mdbook" which,
in addition to the usual Rust compilation tools, contains a `cargo
mdbook` command installed. The problem with this approach is that the
container should be rebuilt regularly in order to update the Rust
version within - however, nobody remembers to do that and after 10
months the compiler became so outdated that it no longer recognises some
of the newly introduced changes to the language.

This commit changes the "Book" workflow so that it bases on
`ubuntu-latest` which is updated regularly, and the `cargo mdbook` tool
is installed as the first step. Although this is extra work on each CI
run compared to the previous approach, it requires less maintenance and
is less likely to break in the future.
  • Loading branch information
piodul authored Feb 18, 2022
1 parent a653a79 commit d019c95
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ env:

jobs:
build:
container: scylladb/rust-mdbook
runs-on: ubuntu-latest
services:
scylladb:
Expand All @@ -24,11 +23,13 @@ jobs:
- ${{ github.workspace }}:/workspace
steps:
- uses: actions/checkout@v2
- name: Install mdbook
run: cargo install mdbook --no-default-features
- name: Build the project
run: cargo build --verbose --examples
- name: Build the book
run: mdbook build docs
- name: Build the book using the script
run: python3 docs/build_book.py
- name: Run book tests
run: SCYLLA_URI=scylladb:9042 mdbook test -L target/debug/deps docs
run: mdbook test -L target/debug/deps docs

0 comments on commit d019c95

Please sign in to comment.