22#
33# SPDX-License-Identifier: MIT
44
5- on : [push, pull_request]
5+ on :
6+ push :
7+ branches :
8+ - ' main'
9+ pull_request :
610
711jobs :
812 ci :
913 runs-on : ubuntu-latest
1014 steps :
1115 - uses : actions/checkout@v3
12- - uses : actions/setup-python@v4
13- - name : Install prerequisites
16+ - name : Install ubuntu prerequisites
1417 run : |
15- sudo apt-get update -qq
16- xargs -a ubuntu-packages.txt sudo apt install -qq
17- python -m pip install --quiet --upgrade pip
18- pip install --quiet -r requirements.txt
18+ sudo apt update -qq
19+ xargs -a ubuntu-packages.txt sudo apt install -qq
20+ - uses : actions/setup-python@v4
21+ with :
22+ python-version : ' 3.10'
23+ cache : ' pip'
24+ - name : Install python prerequisites
25+ run : pip install --quiet -r requirements.txt
1926 - name : Checks
2027 run : |
21- pre-commit run --all
22- mkdir -p build/reuse
23- # ignore fail for reuse
24- reuse lint > build/reuse/lint.txt || true
25- - name : Build
28+ pre-commit run --all
29+ mkdir -p build/reuse
30+ # ignore fail for reuse
31+ reuse lint > build/reuse/lint.txt || true
32+ - name : Build html
2633 env :
2734 ONEAPI_DRAFT : true
2835 run : |
2936 python scripts/oneapi.py -W html
37+ - name : Build pdf
38+ env :
39+ ONEAPI_DRAFT : true
40+ run : |
3041 python scripts/oneapi.py -W latexpdf
31- - name : Archive build directory
32- uses : actions/upload-artifact@v3
33- with :
34- name : build
35- path : build
42+ # - name: Archive build directory
43+ # uses: actions/upload-artifact@v3
44+ # with:
45+ # name: build
46+ # path: build
3647 - name : Checkout gh-pages
3748 if : ${{ github.ref == 'refs/heads/main' }}
3849 uses : actions/checkout@v3
@@ -42,15 +53,15 @@ jobs:
4253 - name : Publish to github pages
4354 if : ${{ github.ref == 'refs/heads/main' }}
4455 run : |
45- cd gh-pages
46- touch .nojekyll
47- rm -rf spec
48- mkdir spec
49- cd spec
50- cp -r ../../build/html/* .
51- cp ../../build/latex/*.pdf .
52- git config user.name github-actions
53- git config user.email [email protected] 54- git add .
55- git commit --reset-author --amend -m "Update from github actions"
56- git push --force origin gh-pages
56+ cd gh-pages
57+ touch .nojekyll
58+ rm -rf spec
59+ mkdir spec
60+ cd spec
61+ cp -r ../../build/html/* .
62+ cp ../../build/latex/*.pdf .
63+ git config user.name github-actions
64+ git config user.email [email protected] 65+ git add .
66+ git commit --reset-author --amend -m "Update from github actions"
67+ git push --force origin gh-pages
0 commit comments