File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ jobs:
15
15
build :
16
16
env :
17
17
BUILD_TYPE : ' Debug'
18
- BUILD_MESON_DIR : ' /tmp/build'
18
+ BUILD_HDOC_DIR : ' /tmp/build'
19
19
runs-on : ubuntu-latest
20
20
21
21
steps :
22
- - uses : actions/checkout@v2
22
+ - uses : actions/checkout@v3
23
23
24
24
- name : Install dependencies, then configure and build project
25
25
run : |
@@ -45,16 +45,27 @@ jobs:
45
45
# - name: Install clang
46
46
# run: sudo apt-get install clang-17 lld-17 libclang-cpp17-dev
47
47
48
+ - name : Cache HDOC build
49
+ id : cache-hdoc
50
+ uses : actions/cache@v4
51
+ with :
52
+ path : ${{ env.BUILD_HDOC_DIR }}
53
+ key : ${{ runner.os }}-primes
54
+
48
55
- name : Build hdoc
56
+ if : steps.cache-hdoc.outputs.cache-hit != 'true'
49
57
run : |
58
+ cd ${{ env.BUILD_HDOC_DIR }}
50
59
git clone https://github.com/PeterTh/hdoc.git
51
60
cd hdoc
52
61
pip3 install meson
53
62
CC=clang-17 CXX=clang++-17 CPP=clang-cpp-17 meson build
54
63
sudo ninja -C build
55
- mv build/hdoc /hdoc
56
- cd ..
57
- rm -rf hdoc
64
+
65
+ - name : Copy hdoc binary
66
+ run : |
67
+ sudo cp ${{ env.BUILD_HDOC_DIR }}/hdoc/build/hdoc /hdoc
68
+ sudo chmod +x /hdoc
58
69
59
70
60
71
- name : Configure CMake
69
80
70
81
- name : Run hdoc to generate documentation
71
82
run : |
72
- chmod +x /hdoc
73
- /hdoc --verbose
83
+ sudo chmod +x /hdoc
84
+ sudo /hdoc --verbose
74
85
75
86
- name : Upload documentation to custom server
76
87
run : |
You can’t perform that action at this time.
0 commit comments