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

Create install-mdbook.sh and lock to the current versions used in the CI #2626

Merged
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
27 changes: 2 additions & 25 deletions .github/workflows/install-mdbook/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,14 @@ description: Install mdbook with the dependencies we need.
runs:
using: composite
steps:
# The --locked flag is important for reproducible builds. It also
# avoids breakage due to skews between mdbook and mdbook-svgbob.
- name: Install mdbook
run: cargo install mdbook --locked --version 0.4.37
run: ./install-mdbook.sh
shell: bash

- name: Install mdbook-svgbob
run: cargo install mdbook-svgbob --locked --version 0.2.1
shell: bash

- name: Install mdbook-pandoc and related dependencies
- name: Install dependencies for mdbook-pandoc
run: |
cargo install mdbook-pandoc --locked --version 0.9.3
sudo apt-get update
sudo apt-get install -y texlive texlive-luatex texlive-lang-cjk texlive-lang-arabic librsvg2-bin fonts-noto
curl -LsSf https://github.com/jgm/pandoc/releases/download/3.6.2/pandoc-3.6.2-linux-amd64.tar.gz | tar zxf -
echo "$PWD/pandoc-3.6.2/bin" >> $GITHUB_PATH
shell: bash

- name: Install mdbook-i18n-helpers
run: cargo install mdbook-i18n-helpers --locked --version 0.3.3
shell: bash

- name: Install i18n-report
run: cargo install i18n-report --locked --version 0.2.0
shell: bash

- name: Install mdbook-exerciser
run: cargo install --path mdbook-exerciser --locked
shell: bash

- name: Install mdbook-course
run: cargo install --path mdbook-course --locked
shell: bash
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,7 @@ cd comprehensive-rust
Then install these tools with:

```shell
cargo install mdbook
cargo install --locked mdbook-svgbob
cargo install --locked mdbook-i18n-helpers
cargo install --locked i18n-report
cargo install --locked mdbook-linkcheck
cargo install --locked --path mdbook-exerciser
cargo install --locked --path mdbook-course
bash install-mdbook.sh
```

Run
Expand Down
11 changes: 11 additions & 0 deletions install-mdbook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# The --locked flag is important for reproducible builds. It also
# avoids breakage due to skews between mdbook and mdbook-svgbob.
cargo install mdbook --locked --version 0.4.37
cargo install mdbook-svgbob --locked --version 0.2.1
cargo install mdbook-pandoc --locked --version 0.9.3
cargo install mdbook-i18n-helpers --locked --version 0.3.3
cargo install i18n-report --locked --version 0.2.0
# these packages are located in this repository
cargo install --path mdbook-exerciser --locked
cargo install --path mdbook-course --locked