-
Notifications
You must be signed in to change notification settings - Fork 744
124 lines (109 loc) · 3.19 KB
/
doc_build.yml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Docs
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
plots:
name: Plots
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PROJ build dependencies
run: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends -o APT::Immediate-Configure=0 \
cmake g++ sqlite3 pkg-config libsqlite3-dev libtiff-dev libcurl4-openssl-dev
- name: Build PROJ
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/opt/proj ..
make -j$(nproc)
sudo mkdir -p /opt/proj
sudo make install
cd ..
- name: Install plot dependencies
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
environment-file: docs/environment.yml
activate-environment: proj
- name: Plot
working-directory: ./docs/plot
run: |
export PATH=/opt/proj/bin:$PATH
export PROJ_DATA=/opt/proj/share/proj
./plot.py plotdefs.json images/
- uses: actions/upload-artifact@v3
with:
name: Images
path: docs/plot/images
docs:
name: Docs
needs: [plots]
runs-on: ubuntu-latest
strategy:
fail-fast: true
container: ghcr.io/osgeo/proj-docs
steps:
- name: Pin sphinx version
# Avoid https://github.com/sphinx-doc/sphinx/issues/11163
shell: bash -l {0}
run: |
python3 -m pip install --user "sphinx==6.0.1"
- uses: actions/checkout@v3
- name: Print versions
shell: bash -l {0}
run: |
python3 --version
sphinx-build --version
python3 -m pip list --not-required --format=columns
- uses: actions/download-artifact@v3
name: Images
with:
name: Images
path: ./docs/source/operations/projections/images
- name: Lint .rst files
shell: bash -l {0}
run: |
if find . -name '*.rst' | xargs grep -P '\t'; then echo 'Tabs are bad, please use four spaces in .rst files.'; false; fi
working-directory: ./docs
- name: Doxygen
shell: bash -l {0}
run: |
mkdir -p docs/build
doxygen Doxyfile
- name: HTML
shell: bash -l {0}
run: |
make html
working-directory: ./docs
- name: PDF
shell: bash -l {0}
run: |
make latexpdf
working-directory: ./docs
- name: Spelling
shell: bash -l {0}
run: |
make spelling
working-directory: ./docs
- uses: actions/upload-artifact@v3
with:
name: PDF
path: docs/build/latex/proj.pdf
- uses: actions/upload-artifact@v3
with:
name: HTML
path: docs/build/html/*
- uses: actions/upload-artifact@v3
with:
name: Misspelled
path: docs/build/spelling/output.txt