Skip to content

Cleanup

Cleanup #31

Workflow file for this run

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 doc/examples --max-line-length 120
- 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 SPHINXOPTS="-W -T -j3" -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/otbenchmark/master
cp -r doc/_build/html/* /tmp/io/otbenchmark/master
cd /tmp/io
touch .nojekyll
git config user.email "[email protected]"
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 master > /dev/null 2>&1