-
Notifications
You must be signed in to change notification settings - Fork 33
91 lines (86 loc) · 3.35 KB
/
postprocess.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
name: Create Website for pySDC
on:
workflow_run:
workflows: ["Mirror to Gitlab to trigger CI"]
types: ["completed"]
jobs:
build_website:
runs-on: ubuntu-latest
if: >-
${{ github.repository_owner == 'Parallel-in-Time'
&& github.event.workflow_run.conclusion == 'success' }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: "etc/environment-postprocess.yml"
- name: Downloading artifacts
uses: actions/download-artifact@v4
with:
path: .
merge-multiple: true
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.ACTION_READ_TOKEN }}
- name: Prepare artifacts
run: |
python -m coverage combine coverage_*.dat
python -m coverage xml
python -m coverage html
- name: Generate Coverage badge
run: |
genbadge coverage -i coverage.xml -o htmlcov/coverage-badge.svg
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV }}
# - name: Generate benchmark report
# uses: pancetta/github-action-benchmark@v1
# if: ${{ (!contains(github.event.head_commit.message, '[CI-no-benchmarks]')) && (github.event_name == 'push') }}
# with:
# name: pySDC Benchmark with pytest-benchmark
# tool: 'pytest'
# output-file-path: benchmarks/output.json
# auto-push: false
# skip-fetch-gh-pages: true
# benchmark-data-dir-path: bench/${{ github.head_ref || github.ref_name }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Push benchmark data
# uses: dmnemec/copy_file_to_another_repo_action@main
# if: "!contains(github.event.head_commit.message, '[CI-no-benchmarks]')"
# env:
# API_TOKEN_GITHUB: ${{ secrets.BENCHMARK_BOT }}
# with:
# source_file: 'bench/${{ github.head_ref || github.ref_name }}'
# destination_repo: 'Parallel-in-Time/pySDC-benchmarks'
# user_email: '[email protected]'
# user_name: 'pancetta'
- name: Build html I
run: |
chmod u+x ./docs/update_apidocs.sh
./docs/update_apidocs.sh
sphinx-build -b html docs/source docs/build/html 2>&1 | tee sphinx_build.log
images_not_found=$(grep "WARNING: image file not readable:" < sphinx_build.log | wc -l)
if [ $images_not_found != "0" ] ; then echo "Some linked images were not found"; exit 1 ;fi
mkdir -p docs/build/html/coverage
mv htmlcov/* docs/build/html/coverage/.
- name: Store docs
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/build/html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
if: >-
${{ github.event.workflow_run.event == 'push'
&& github.repository_owner == 'Parallel-in-Time'
&& github.event.workflow_run.head_branch == 'master' }}
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.