Skip to content

Commit fcfa875

Browse files
committed
chore: add a Makefile for common operations
1 parent 614c5b1 commit fcfa875

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,9 @@ jobs:
120120
version: "1"
121121
- uses: julia-actions/julia-buildpkg@v1
122122
- name: Set up documentation environment
123-
run: |
124-
using Pkg
125-
Pkg.develop(path=".")
126-
Pkg.instantiate()
127-
shell: julia --color=yes --project=docs/ {0}
123+
run: make docs-manifest
128124
- name: Build & deploy the documentation
129-
run: julia --color=yes --project=docs/ --code-coverage docs/make.jl
125+
run: make docs
130126
env:
131127
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
132128
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
JULIA:=julia
2+
3+
help:
4+
@echo "The following make commands are available:"
5+
@echo " - make docs: build the documentation"
6+
@echo " - make docs-environment: instantiate the docs environment"
7+
@echo " - make test: run the tests"
8+
9+
docs/Manifest.toml: docs/Project.toml
10+
@echo "Instantiating the docs/ environment:"
11+
$(JULIA) --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()'
12+
13+
docs-manifest:
14+
rm -f docs/Manifest.toml
15+
$(MAKE) docs/Manifest.toml
16+
17+
docs: docs/Manifest.toml
18+
$(JULIA) --project=docs/ docs/make.jl
19+
20+
test:
21+
${JULIA} --project -e 'using Pkg; Pkg.test()'
22+
23+
.PHONY: default docs-manifest docs test

0 commit comments

Comments
 (0)