Skip to content
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
20 changes: 16 additions & 4 deletions .doc/build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
# Build API Documentation
cargo doc --no-deps
#!/usr/bin/env bash
# Builds the contents of https://wsts.xyz: the rustdoc API documentation, the
# paper as a PDF, and the landing page that links to both.
#
# Invoked directly by .github/workflows/{ci,static}.yml, so it needs its own
# shebang and error handling: without `set -e` a pdflatex or cargo failure
# leaves the step green and silently publishes an incomplete site.
set -euo pipefail

# Build API Documentation. --all-features so that feature-gated modules (v1,
# and the test helpers) appear on the site; without it they are simply missing,
# which is why wsts.xyz/wsts/v1/ used to 404. -D warnings catches broken
# intra-doc links, which RUSTFLAGS does not reach.
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features

# We have to build the pdf twice. The way the bibliography works is that the
# first run creates the bibtex aux files, then the second run puts the ref
# numbers into the inline citations.
pdflatex ./wsts.tex
pdflatex ./wsts.tex
pdflatex -halt-on-error ./wsts.tex
pdflatex -halt-on-error ./wsts.tex

# Copy PDF File
cp ./wsts.pdf ./target/doc/
Expand Down
10 changes: 0 additions & 10 deletions .doc/cloudflare.sh

This file was deleted.

7 changes: 6 additions & 1 deletion .doc/install-latex-ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env bash
# Installs the LaTeX packages .doc/build.sh needs to render wsts.tex.
# Ubuntu-only; invoked by .github/workflows/{ci,static}.yml.
set -euo pipefail

# Update apt
sudo apt-get update
# Install LaTeX base and extra packages
sudo apt-get install texlive texlive-latex-extra
sudo apt-get install --yes texlive texlive-latex-extra
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Cargo Check
id: cargo_check
run: |
cargo check
cargo check --locked

test-all:
name: test-all
Expand All @@ -55,8 +55,8 @@ jobs:
- name: Cargo Test
id: cargo_test
run: |
cargo test
cargo test --features with_v1
cargo test --locked
cargo test --locked --features with_v1

fmt:
name: fmt
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Cargo Clippy
id: cargo_clippy
run: |
cargo clippy --all-targets --all-features -- -D warnings -A clippy::op-ref -A clippy::needless-range-loop
cargo clippy --all-targets --all-features -- -D warnings

package:
name: package
Expand All @@ -122,7 +122,7 @@ jobs:
- name: Cargo Publish Dry Run
id: cargo_publish_dry_run
run: |
cargo publish --dry-run
cargo publish --dry-run --locked

doc:
permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ jobs:
- name: Cargo Publish Dry Run
id: cargo_publish_dry_run
run: |
cargo publish --dry-run
cargo publish --dry-run --locked

- name: Cargo Publish
id: cargo_publish
if: ${{ github.event_name == 'push' || !inputs.dry_run }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo publish
cargo publish --locked
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/target
*~
Cargo.lock
*.aux
*.log
.DS_Store
Expand Down
Loading
Loading