-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Developer tools to clarify build steps
- Loading branch information
1 parent
ca8a3d5
commit aa9ca3b
Showing
36 changed files
with
2,388 additions
and
211 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # push commit to the main branch | ||
tags: | ||
- 'v2*' # push tag starting with "v2" to the main branch | ||
pull_request: | ||
branches: | ||
- main # pull request to the main branch | ||
workflow_dispatch: # allow manual triggering | ||
|
||
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 | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Requirements | ||
run: | | ||
python3 -m pip install --upgrade pip setuptools | ||
python3 -m pip install -r dev_tools/requirements.txt | ||
- name: Check Code Style | ||
run: | | ||
cd dev_tools | ||
black . | ||
flake8 . | ||
isort . | ||
- name: Run Tests | ||
run: | | ||
pytest dev_tools -v | ||
- 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: NeXus User Manual (Prepare) | ||
run: | | ||
python3 -m dev_tools manual --prepare | ||
- name: NeXus User Manual (PDF) | ||
run: | | ||
sphinx-build build/manual/source/ build/manual/build/pdf -b latex | ||
cd build/manual/build/pdf | ||
pdflatex nexus | ||
cd ../../../../ | ||
cp build/manual/build/pdf/nexus.pdf build/manual/source/_static/NeXusManual.pdf | ||
- name: NeXus User Manual (HTML) | ||
run: | | ||
sphinx-build build/manual/source/ build/manual/build/html -b html | ||
- name: NeXus Impatient Guide (Prepare) | ||
run: | | ||
python3 -m dev_tools impatient --prepare | ||
- name: NeXus Impatient Guide (PDF) | ||
run: | | ||
sphinx-build build/impatient-guide/ build/impatient-guide/build/pdf -b latex | ||
cd build/impatient-guide/build/pdf | ||
pdflatex NXImpatient | ||
cd ../../../../ | ||
cp build/impatient-guide/build/pdf/NXImpatient.pdf build/impatient-guide/_static/NXImpatient.pdf | ||
- name: NeXus Impatient Guide (HTML) | ||
run: | | ||
sphinx-build build/impatient-guide/ build/impatient-guide/build/html -b html | ||
- name: Build and Commit the NeXus User Manual | ||
uses: sphinx-notes/pages@master | ||
with: | ||
# path to the conf.py directory | ||
documentation_path: build/manual/source | ||
|
||
- name: Publish the NeXus User Manual | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.