master #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 master > /dev/null 2>&1 | |