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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for mdbook #4

Merged
merged 3 commits into from
Apr 4, 2022
Merged

Add support for mdbook #4

merged 3 commits into from
Apr 4, 2022

Conversation

thomcc
Copy link
Contributor

@thomcc thomcc commented Apr 4, 2022

It would be nice to support mdbook here, and seems simple as it has prebuilt binaries on github releases: https://github.com/rust-lang/mdBook/releases. I'm hoping that mdbook meets whatever threshold you want for usefulness. (At the very least, it's part of the rust-lang org, so it should be reasonably trustworthy)

I tried to follow the patterns used for the others, but have not really tested it beyond ensuring that if I run the lines individually that they seem to work. So I'm hoping that the CI handles this for me 馃.

Also, this just adds Linux/macOS, since Windows support seems like a hassle (or, I'm not quite good enough at sh to know a clean way to do it, nor do I have a windows box to check against).

P.S. Thanks for this action, it's really cool.

@thomcc
Copy link
Contributor Author

thomcc commented Apr 4, 2022

Hmm, Annoying.

I guess mdbook is built on ubuntu-latest (https://github.com/rust-lang/mdBook/blob/master/.github/workflows/deploy.yml#L12) and linked against latest glibc. As a result, ubuntu-18.04 will use an older version of glibc, which is incompatible.

I think this is the problem at least.

@thomcc
Copy link
Contributor Author

thomcc commented Apr 4, 2022

Filed rust-lang/mdBook#1779. Even if this is addressed, it would sadly not fix the CI until another mdbook release is done, hm.

@taiki-e
Copy link
Owner

taiki-e commented Apr 4, 2022

Thanks for the PR!

For the glibc compatibility issue, in the short term, we can work around it by adjusting CI. Something like:

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ed1fd5b..e7f7682 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,7 +23,6 @@ jobs:
       fail-fast: false
       matrix:
         os:
-          - ubuntu-18.04
           - ubuntu-20.04
         tool:
           # Note: Specifying the version of valgrind and wasm-pack is not supported.
@@ -32,6 +31,11 @@ jobs:
           # Nextest supports basic version ranges as well
           - nextest@0.9
         include:
+          # Note: mdBook binary is incompatible with ubuntu 18.04
+          - os: ubuntu-18.04
+            tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,nextest,shellcheck,shfmt,valgrind,wasm-pack,wasmtime
+          - os: ubuntu-18.04
+            tool: cargo-hack@0.5.12,cargo-llvm-cov@0.2.4,cargo-minimal-versions@0.1.3,parse-changelog@0.4.7,cross@0.2.1,nextest@0.9.11,shellcheck@0.8.0,shfmt@3.4.3,wasmtime@0.35.1
           - os: macos-10.15
             tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,nextest,shellcheck,shfmt,wasm-pack,wasmtime,mdbook
           - os: windows-2019

A potential long-term solution is to provide pre-built binaries by our end.
I basically prefer to use binaries built the way the project recommends, but on the other hand, the lack of uniform formats for URLs, archive names, etc. can cause platform support issues, and complicate implementations of #1 and #5.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@taiki-e taiki-e merged commit ceb63b7 into taiki-e:main Apr 4, 2022
@taiki-e
Copy link
Owner

taiki-e commented Apr 4, 2022

Published in 1.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants