Skip to content

Commit 115c738

Browse files
committed
Trying to get the original pipeline back to work
1 parent eaf0ceb commit 115c738

File tree

1 file changed

+133
-101
lines changed

1 file changed

+133
-101
lines changed

.github/workflows/ci_pipeline.yml

Lines changed: 133 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,151 @@ on:
88

99
jobs:
1010

11-
trigger:
11+
lint:
1212
runs-on: ubuntu-latest
1313

14+
env:
15+
YML: 'etc/environment-lint.yml'
16+
17+
defaults:
18+
run:
19+
shell: bash -l {0}
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v1
24+
25+
- name: Install Conda environment with Micromamba
26+
uses: mamba-org/provision-with-micromamba@main
27+
with:
28+
environment-file: ${{ env.YML }}
29+
30+
- name: Code reformatting with black
31+
run: |
32+
black pySDC --check --diff --color
33+
34+
- name: Linting with flakeheaven
35+
run: |
36+
flakeheaven lint --benchmark pySDC
37+
38+
user_cpu_tests:
39+
runs-on: ubuntu-latest
40+
41+
strategy:
42+
matrix:
43+
python: ['3.7', '3.8', '3.9', '3.10']
44+
env: ['base', 'fenics', 'mpi4py', 'petsc']
45+
46+
defaults:
47+
run:
48+
shell: bash -l {0}
49+
1450
steps:
1551
- name: Checkout
1652
uses: actions/checkout@v3
1753

18-
# - name: Zip
19-
# run: |
20-
# cd ..
21-
# tar -zcf pySDC.tar.gz pySDC
22-
# mv pySDC.tar.gz pySDC/.
54+
- name: Install Conda environment with Micromamba
55+
uses: mamba-org/provision-with-micromamba@main
56+
with:
57+
environment-file: "etc/environment-${{ matrix.env }}.yml"
58+
extra-specs: |
59+
python=${{ matrix.env }}
2360
24-
# - uses: actions/upload-artifact@v3
25-
# with:
26-
# name: pySDC
27-
# path: pySDC
61+
- name: Run pytest for CPU stuff
62+
run: |
63+
coverage run --data-file=coverage_${{ matrix.env }}_${{ matrix.python }}.dat -m pytest --continue-on-collection-errors -v --durations=0 pySDC/tests -m ${{ matrix.env }}
64+
mv data data_${{ matrix.python }}
2865
29-
- uses: jwalton/gh-find-current-pr@v1
30-
id: findPr
66+
- uses: actions/upload-artifact@v3
67+
if: ${{ matrix.env }} == '3.10'
3168
with:
32-
# Can be "open", "closed", or "all". Defaults to "open".
33-
state: open
69+
name: cpu-test-artifacts
70+
path: |
71+
data_3.10
72+
coverage_${{ matrix.env }}_3.10.dat
73+
3474
35-
- name: trigger Gitlab CI
75+
post-processing:
76+
runs-on: ubuntu-latest
77+
78+
if: ${{ github.repository_owner == 'Parallel-in-Time'}}
79+
80+
needs:
81+
- lint
82+
- user_cpu_tests
83+
84+
defaults:
85+
run:
86+
shell: bash -l {0}
87+
88+
steps:
89+
- name: Checkout
90+
uses: actions/checkout@v3
91+
92+
- uses: actions/download-artifact@v3
93+
with:
94+
path: .
95+
96+
- name: prepare artifacts
3697
run: |
37-
curl --request POST \
38-
--form token=${{ secrets.GITLAB_TRIGGER_TOKEN }} \
39-
--form ref=main \
40-
--form "variables[PR_NUMBER]=${{ steps.findPr.outputs.pr }}" \
41-
"https://gitlab.hzdr.de/api/v4/projects/6200/trigger/pipeline"
98+
ls -arlt
99+
unzip *.zip
42100
43-
# lint:
44-
# runs-on: ubuntu-latest
45-
#
46-
# env:
47-
# YML: 'etc/environment-lint.yml'
48-
#
49-
# defaults:
50-
# run:
51-
# shell: bash -l {0}
52-
#
53-
# steps:
54-
# - name: Checkout
55-
# uses: actions/checkout@v1
56-
#
57-
# - name: Install Conda environment with Micromamba
58-
# uses: mamba-org/provision-with-micromamba@main
101+
- name: Generate Coverage badge
102+
run: |
103+
pip install genbadge[all]
104+
genbadge coverage -i coverage.xml -o htmlcov/coverage-badge.svg
105+
106+
- name: Generate benchmark report
107+
uses: pancetta/github-action-benchmark@v1
108+
if: ${{ (!contains(github.event.head_commit.message, '[CI-no-benchmarks]')) && (github.event_name == 'push') }}
109+
with:
110+
name: pySDC Benchmark with pytest-benchmark
111+
tool: 'pytest'
112+
output-file-path: benchmarks/output.json
113+
auto-push: false
114+
skip-fetch-gh-pages: true
115+
benchmark-data-dir-path: bench/${{ github.head_ref || github.ref_name }}
116+
github-token: ${{ secrets.GITHUB_TOKEN }}
117+
118+
- name: Push benchmark data
119+
uses: dmnemec/copy_file_to_another_repo_action@main
120+
if: "!contains(github.event.head_commit.message, '[CI-no-benchmarks]')"
121+
env:
122+
API_TOKEN_GITHUB: ${{ secrets.BENCHMARK_BOT }}
123+
with:
124+
source_file: 'bench/${{ github.head_ref || github.ref_name }}'
125+
destination_repo: 'Parallel-in-Time/pySDC-benchmarks'
126+
user_email: '[email protected]'
127+
user_name: 'pancetta'
128+
129+
- name: Build html I
130+
run: |
131+
chmod u+x ./docs/update_apidocs.sh
132+
./docs/update_apidocs.sh
133+
sphinx-build -b html docs/source docs/build/html
134+
mkdir -p docs/build/html/coverage
135+
mv htmlcov/* docs/build/html/coverage/.
136+
137+
- name: Build html II
138+
if: "!contains(github.event.head_commit.message, '[CI-no-benchmarks]')"
139+
run: |
140+
mkdir -p docs/build/html/benchmarks
141+
cp -r bench/${{ github.head_ref || github.ref_name }}/* docs/build/html/benchmarks/.
142+
143+
- name: Store docs
144+
uses: actions/upload-artifact@v2
145+
with:
146+
name: docs
147+
path: docs/build/html
148+
149+
# - name: Deploy 🚀
150+
# uses: JamesIves/[email protected]
151+
# if: ${{ github.event_name == 'push' && github.repository_owner == 'Parallel-in-Time' && github.ref == 'refs/heads/master' && !env.ACT }}
59152
# with:
60-
# environment-file: ${{ env.YML }}
61-
#
62-
# - name: Code reformatting with black
63-
# run: |
64-
# black pySDC --check --diff --color
65-
#
66-
# - name: Linting with flakeheaven
67-
# run: |
68-
# flakeheaven lint --benchmark pySDC
69-
#
70-
#
153+
# branch: gh-pages # The branch the action should deploy to.
154+
# folder: docs/build/html # The folder the action should deploy.
155+
71156
# spawn_gitlab_and_postprocess:
72157
# runs-on: ubuntu-latest
73158
#
@@ -122,57 +207,4 @@ jobs:
122207
# rm -rf data
123208
# unzip artifacts.zip
124209
#
125-
# - name: Generate Coverage badge
126-
# run: |
127-
# pip install genbadge[all]
128-
# genbadge coverage -i coverage.xml -o htmlcov/coverage-badge.svg
129-
#
130-
# - name: Generate benchmark report
131-
# uses: pancetta/github-action-benchmark@v1
132-
# if: ${{ (!contains(github.event.head_commit.message, '[CI-no-benchmarks]')) && (github.event_name == 'push') }}
133-
# with:
134-
# name: pySDC Benchmark with pytest-benchmark
135-
# tool: 'pytest'
136-
# output-file-path: benchmarks/output.json
137-
# auto-push: false
138-
# skip-fetch-gh-pages: true
139-
# benchmark-data-dir-path: bench/${{ github.head_ref || github.ref_name }}
140-
# github-token: ${{ secrets.GITHUB_TOKEN }}
141-
#
142-
# - name: Push benchmark data
143-
# uses: dmnemec/copy_file_to_another_repo_action@main
144-
# if: "!contains(github.event.head_commit.message, '[CI-no-benchmarks]')"
145-
# env:
146-
# API_TOKEN_GITHUB: ${{ secrets.BENCHMARK_BOT }}
147-
# with:
148-
# source_file: 'bench/${{ github.head_ref || github.ref_name }}'
149-
# destination_repo: 'Parallel-in-Time/pySDC-benchmarks'
150-
# user_email: '[email protected]'
151-
# user_name: 'pancetta'
152-
#
153-
# - name: Build html I
154-
# run: |
155-
# chmod u+x ./docs/update_apidocs.sh
156-
# ./docs/update_apidocs.sh
157-
# sphinx-build -b html docs/source docs/build/html
158-
# mkdir -p docs/build/html/coverage
159-
# mv htmlcov/* docs/build/html/coverage/.
160-
#
161-
# - name: Build html II
162-
# if: "!contains(github.event.head_commit.message, '[CI-no-benchmarks]')"
163-
# run: |
164-
# mkdir -p docs/build/html/benchmarks
165-
# cp -r bench/${{ github.head_ref || github.ref_name }}/* docs/build/html/benchmarks/.
166-
#
167-
# - name: Store docs
168-
# uses: actions/upload-artifact@v2
169-
# with:
170-
# name: docs
171-
# path: docs/build/html
172-
#
173-
## - name: Deploy 🚀
174-
## uses: JamesIves/[email protected]
175-
## if: ${{ github.event_name == 'push' && github.repository_owner == 'Parallel-in-Time' && github.ref == 'refs/heads/master' && !env.ACT }}
176-
## with:
177-
## branch: gh-pages # The branch the action should deploy to.
178-
## folder: docs/build/html # The folder the action should deploy.
210+

0 commit comments

Comments
 (0)