Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rust-101
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tom.andrivet
rust-101
Commits
e626bd07
Commit
e626bd07
authored
1 year ago
by
orestis.malaspin
Browse files
Options
Downloads
Patches
Plain Diff
Check links in mdbook. Also changed image to debian bookworm.
parent
208e2108
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+56
-6
56 additions, 6 deletions
.gitlab-ci.yml
book/book.toml
+13
-0
13 additions, 0 deletions
book/book.toml
with
69 additions
and
6 deletions
.gitlab-ci.yml
+
56
−
6
View file @
e626bd07
# # Official language image. Look for the different tagged releases at:
# # https://hub.docker.com/r/library/rust/tags/
# image: "rust:1.70-alpine3.17"
# # Use cargo to test the project
# before_script:
# - apk add --no-cache musl-dev curl
# - mkdir -p $HOME/.cargo/bin
# - curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.31/mdbook-v0.4.31-x86_64-unknown-linux-musl.tar.gz | tar -xz --directory=$HOME/.cargo/bin
# - curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.7/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -o mdbook-linkcheck.zip
# - unzip mdbook-linkcheck.zip -d $HOME/.cargo/bin && chmod +x $HOME/.cargo/bin/mdbook-linkcheck
# # - cargo install mdbook-linkcheck
# - rustup component add rustfmt
# - rustup component add clippy
# - export PATH=$PATH:$HOME/.cargo/bin
# ##
# ## Install ssh-agent if not already installed, it is required by Docker.
# ##
# - 'which ssh-agent || (apk add --update openssh-client)'
# - 'which rsync || (apk add --update rsync)'
# - 'which chmod || (apk add --update chmod)'
# ##
# ## Run ssh-agent (inside the build environment)
# ##
# - eval $(ssh-agent -s)
# ##
# ## Give the right permissions, otherwise ssh-add will refuse to add files
# ## Add the SSH key stored in SSH_PRIVATE_KEY file type CI/CD variable to the agent store
# ##
# - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
# ##
# ## Create the SSH directory and give it the right permissions
# ##
# - mkdir -p ~/.ssh
# - chmod 700 ~/.ssh
# ##
# ## Assuming you created the SSH_KNOWN_HOSTS file type CI/CD variable, uncomment the
# ## following two lines.
# ##
# - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
# - chmod 644 ~/.ssh/known_hosts
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/rust/tags/
image
:
"
rust:1
.70-alpine3.17
"
image
:
"
rust:1
-slim-bookworm
"
# Use cargo to test the project
before_script
:
-
apk add --no-cache musl-dev curl
-
apt update && apt upgrade -y
-
apt install curl unzip -y
-
mkdir -p $HOME/.cargo/bin
-
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.31/mdbook-v0.4.31-x86_64-unknown-linux-musl.tar.gz | tar -xz --directory=$HOME/.cargo/bin
-
export PATH=$PATH:$HOME/.cargo/bin
-
curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.7/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -o mdbook-linkcheck.zip
-
unzip mdbook-linkcheck.zip -d $HOME/.cargo/bin && chmod +x $HOME/.cargo/bin/mdbook-linkcheck
# - cargo install mdbook-linkcheck
-
rustup component add rustfmt
-
rustup component add clippy
-
export PATH=$PATH:$HOME/.cargo/bin
##
## Install ssh-agent if not already installed, it is required by Docker.
##
-
'
which
ssh-agent
||
(ap
k
add
--update
openssh-client)'
-
'
which
rsync
||
(ap
k
add
--update
rsync)'
-
'
which
chmod
||
(ap
k
add
--update
chmod)'
-
'
which
ssh-agent
||
(ap
t
install
openssh-client
-y
)'
-
'
which
rsync
||
(ap
t
install
rsync
-y
)'
-
'
which
chmod
||
(ap
t
install
chmod
-y
)'
##
## Run ssh-agent (inside the build environment)
##
...
...
@@ -44,6 +90,10 @@ test:cargo:
stage
:
test
script
:
-
rustc --version && cargo --version
# Print version info for debugging
-
cargo clippy --version
-
rustfmt --version
-
ls -ltr $HOME/.cargo/bin
-
mdbook --version && mdbook-linkcheck --version
build:codes
:
stage
:
build
...
...
This diff is collapsed.
Click to expand it.
book/book.toml
+
13
−
0
View file @
e626bd07
...
...
@@ -7,3 +7,16 @@ title = "Rust-101: Université d'été"
[output.html.playground]
editable
=
true
[output.linkcheck]
# Should we check links on the internet? Enabling this option adds a
# non-negligible performance impact
follow-web-links
=
true
# How should warnings be treated?
#
# - "warn" will emit warning messages
# - "error" treats all warnings as errors, failing the linkcheck
# - "ignore" will ignore warnings, suppressing diagnostic messages and allowing
# the linkcheck to continuing
warning-policy
=
"error"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment