-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (43 loc) · 1.45 KB
/
build.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
name: Build
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install
shell: bash -l {0}
run: pip install -r requirements.txt
- name: Lint
shell: bash -l {0}
run: |
black --check otbenchmark --config pyproject.toml
flake8 otbenchmark
- name: Test
shell: bash -l {0}
run: |
pip install .
cd tests && bash run-all.sh && cd -
- name: Doc
shell: bash -l {0}
run: |
sudo apt install -y texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra
make html -C doc
- name: Upload
if: ${{ github.ref == 'refs/heads/master' }}
run: |
git clone --depth 1 https://${{ secrets.GH_TOKEN }}@github.com/openturns/openturns.github.io.git /tmp/io
mkdir -p /tmp/io/sphinx/otbenchmark/master
cp -r doc/_build/html/* /tmp/io/sphinx/otbenchmark/master
cd /tmp/io
touch .nojekyll
git config user.email "support@gh.com"
git config user.name "GitHub Actions"
git add -A .
if test `git diff HEAD | wc -c` -eq 0; then exit 0; fi
git commit -a -m "GitHub Actions build ${GITHUB_REPOSITORY} ${GITHUB_RUN_ID}"
git push --quiet origin main
#> /dev/null 2>&1