Skip to content

Commit 30bb2cc

Browse files
authored
cleanup ci (#457)
1 parent 8dae855 commit 30bb2cc

File tree

2 files changed

+44
-34
lines changed

2 files changed

+44
-34
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,48 @@
22
#
33
# SPDX-License-Identifier: MIT
44

5-
on: [push, pull_request]
5+
on:
6+
push:
7+
branches:
8+
- 'main'
9+
pull_request:
610

711
jobs:
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

requirements.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
breathe
99
git+https://github.com/fsfe/reuse-tool.git
1010
pre-commit
11-
Sphinx==4.2.0
12-
# waiting for pypi release for fix for parallel read
13-
git+https://github.com/readthedocs/sphinx-notfound-page.git
14-
# Waiting for release of: https://github.com/executablebooks/sphinx-book-theme/commit/0bdacc0a5e0a01ca5b4476651d1a80821b9b5d67
15-
git+https://github.com/executablebooks/sphinx-book-theme.git
11+
six
12+
Sphinx
13+
sphinx-notfound-page
14+
sphinx-book-theme
1615
sphinx-prompt
1716
sphinx_substitution_extensions
1817
sphinx_tabs

0 commit comments

Comments
 (0)