Skip to content

Commit 13a1a82

Browse files
committed
Add Github Action CI workflow
Travis-ci.org is going away and moving to Travis-ci.com requires some work. It would probably involve fixing authentication issues yet again. Instead, let's just move to a GH actions job which is fairly trivial to setup. This has the side benefit of CI will run on anyone's fork without further setup. As part of this, the specification file name gains a 'git-describe' based version number. Signed-off-by: Rob Herring <[email protected]>
1 parent 9a499e0 commit 13a1a82

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Github Action CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
tags:
8+
- 'v*'
9+
pull_request:
10+
branches:
11+
master
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
22+
- name: install
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install latexmk libalgorithm-diff-perl texlive texlive-latex-extra texlive-humanities graphviz
26+
pip3 install --user mako
27+
pip3 install --user typing
28+
pip3 install --user Sphinx
29+
pip3 install --user codespell
30+
31+
- name: build pdf
32+
run: |
33+
make latexpdf
34+
git fetch --tags --force # Needed to make git-describe work
35+
mv build/latex/devicetree-specification.pdf build/latex/devicetree-specification-$(git describe).pdf
36+
- name: build html
37+
run: make html
38+
- name: build singlehtml
39+
run: make singlehtml
40+
41+
- name: upload
42+
uses: actions/upload-artifact@v2
43+
with:
44+
name: artifacts
45+
path: |
46+
build/latex/devicetree-specification-*.pdf
47+
48+
- name: deploy
49+
uses: peaceiris/actions-gh-pages@v3
50+
with:
51+
github_token: ${{ secrets.GITHUB_TOKEN }}
52+
publish_dir: ./build/singlehtml
53+
54+
- name: release
55+
uses: softprops/action-gh-release@v1
56+
if: startsWith(github.ref, 'refs/tags/')
57+
with:
58+
files: build/latex/devicetree-specification-*.pdf
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)