NXstress contribution: stress-strain analysis #532
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main # push commit to the main branch | |
pull_request: | |
branches: | |
- main # pull request to the main branch | |
workflow_dispatch: # allow manual triggering | |
inputs: | |
deploy: | |
description: 'Deploy documentation' | |
type: boolean | |
required: true | |
default: false | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-linux: | |
name: CI py${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10'] | |
max-parallel: 5 | |
env: | |
python_version: ${{ matrix.python-version }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Deploy Information | |
if: ${{ github.event.inputs.deploy && env.python_version == '3.7' }} | |
run: | | |
echo "The HTML NeXus User Manual will be pushed to" | |
echo " https://github.com/nexusformat/definitions/tree/gh-pages" | |
echo "The HTML NeXus User Manual will be deployed on" | |
echo " https://nexusformat.github.io/definitions/" | |
- name: Install Requirements | |
run: | | |
python3 -m pip install --upgrade pip setuptools | |
make install | |
python3 -m pip list | |
- name: Check Code Style | |
run: | | |
make style | |
- name: Run Tests | |
run: | | |
make test | |
- name: Install LaTeX | |
run: | | |
sudo apt-get update -y && \ | |
sudo apt-get install -y \ | |
latexmk \ | |
texlive-latex-recommended \ | |
texlive-latex-extra \ | |
texlive-fonts-recommended | |
- name: Generate build files | |
run: | | |
make prepare | |
- name: Build Impatient Guid | |
run: | | |
make impatient-guide | |
ls -lAFgh build/impatient-guide/build/html/index.html | |
ls -lAFgh build/impatient-guide/build/latex/NXImpatient.pdf | |
- name: Build User Manual | |
run: | | |
make pdf | |
make html | |
ls -lAFgh build/manual/build/html/index.html | |
ls -lAFgh build/manual/build/latex/nexus.pdf | |
- name: Build and Commit the User Manual | |
if: ${{ github.event.inputs.deploy && env.python_version == '3.7' }} | |
uses: sphinx-notes/pages@master | |
with: | |
# path to the conf.py directory | |
documentation_path: build/manual/source | |
- name: Deploy the User Manual | |
if: ${{ github.event.inputs.deploy && env.python_version == '3.7' }} | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages |