Skip to content

Commit

Permalink
Update Github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
msricher committed Oct 8, 2024
1 parent 84ae74f commit 5238f2f
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 64 deletions.
63 changes: 31 additions & 32 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,37 @@ jobs:

steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get install -y build-essential python-dev-is-python3 python3-numpy python3-pytest
- name: Build library
run: make PYTHON=python

- name: Run library tests
run: make test PYTHON=python

- name: Copy library to docs/ directory
run: cp -r permanent/ docs/permanent/

- name: Build documentation
uses: ammaraskar/sphinx-action@master
with:
build-command: "make html"
docs-folder: "docs/"

- name: Fix documentation permissions
run: |
chmod -c -R +rX "docs/build/html/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html/
- uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get install -y build-essential cmake

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install .

- name: PyTest
run: |
pip install pytest
pytest -v tests
- name: Build documentation
run: |
pip install sphinx sphinx_rtd_theme sphinx_copybutton
cd docs && make html
- name: Fix documentation permissions
run: |
chmod -c -R +rX "docs/build/html/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html/

deploy:

Expand Down
63 changes: 31 additions & 32 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,34 @@ jobs:

steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get install -y build-essential python-dev-is-python3 python3-numpy python3-pytest
- name: Build library
run: make PYTHON=python

- name: Run library tests
run: make test PYTHON=python

- name: Copy library to docs/ directory
run: cp -r permanent/ docs/permanent/

- name: Build documentation
uses: ammaraskar/sphinx-action@master
with:
build-command: "make html"
docs-folder: "docs/"

- name: Fix documentation permissions
run: |
chmod -c -R +rX "docs/build/html/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html/
- uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get install -y build-essential cmake

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install .

- name: PyTest
run: |
pip install pytest
pytest -v tests
- name: Build documentation
run: |
pip install sphinx sphinx_rtd_theme sphinx_copybutton
cd docs && make html
- name: Fix documentation permissions
run: |
chmod -c -R +rX "docs/build/html/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html/

0 comments on commit 5238f2f

Please sign in to comment.