-
Notifications
You must be signed in to change notification settings - Fork 11
83 lines (70 loc) · 2.14 KB
/
test-docs-examples.yml
File metadata and controls
83 lines (70 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Documentation Tests & Build
on:
push:
branches: [ main, master, development, dev ]
paths:
- 'docs/**'
- 'Justfile'
- '.github/workflows/test-docs-examples.yml'
pull_request:
branches: [ main, master, development, dev ]
paths:
- 'docs/**'
- 'Justfile'
- '.github/workflows/test-docs-examples.yml'
workflow_dispatch:
env:
RUSTFLAGS: -C debuginfo=0
RUST_BACKTRACE: 1
PYTHONUTF8: 1
LLVM_VERSION: "14.0.6"
jobs:
docs-ci:
name: Test and build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
version: "0.11.14"
enable-cache: true
- name: Set up Rust
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable --profile minimal
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.cargo/bin:$PATH"
rustup show
- name: Install just
uses: extractions/setup-just@v4
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
cache-bin: false
prefix-key: v1-rust-no-bin
workspaces: |
python/pecos-rslib
python/pecos-rslib-llvm
- name: Cache LLVM ${{ env.LLVM_VERSION }}
id: cache-llvm
uses: actions/cache@v5
with:
path: ~/.pecos/deps/llvm-14
key: llvm-${{ env.LLVM_VERSION }}-${{ runner.os }}-${{ runner.arch }}-v2
- name: Ensure LLVM ${{ env.LLVM_VERSION }}
run: just ci-env
- name: Install dependencies and build
run: |
uv lock --project .
uv sync --project . --all-packages
cargo install --path crates/pecos-cli --force
pecos python build --profile debug
- name: Test working documentation examples
run: uv run python scripts/docs/test_working_examples.py
- name: Build documentation
if: success()
run: uv run mkdocs build