Merge pull request #854 from CamillaLu/issue_forms #68
This file contains hidden or 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: pyGIMLi CI | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
branches: | |
- dev | |
jobs: | |
pgcore: | |
name: Building pgcore & bindings | |
runs-on: self-hosted | |
steps: | |
- name: Clean-up | |
run: rm -rf ~/.cache/pygimli | |
- name: Getting pyGIMLi sources | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.SECRET }} | |
fetch-depth: 0 # checks out all branches and tags | |
path: source | |
- name: Running cmake | |
run: | | |
mkdir -p build | |
cd build | |
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake ../source | |
- name: Build libgimli | |
run: make -j 8 gimli | |
working-directory: build | |
- name: Build Python bindings | |
run: make pygimli J=4 | |
working-directory: build | |
pgtest: | |
name: Running tests | |
runs-on: self-hosted | |
needs: pgcore | |
env: | |
OPENBLAS_CORETYPE: "ARMV8" # current bug in OpenBlas core detection | |
steps: | |
- name: Run pg.test() | |
run: python3 -c "import pygimli; pygimli.test(show=False, abort=True)" | |
working-directory: source | |
- name: Install as development package | |
working-directory: source | |
run: pip install -e . --break-system-packages --user # better to use virtual enviroment in the future | |
docs: | |
name: Build website with examples | |
needs: pgtest | |
runs-on: self-hosted | |
env: | |
DISPLAY: ":99.0" | |
PYVISTA_OFF_SCREEN: True | |
OPENBLAS_CORETYPE: "ARMV8" # current bug in OpenBlas core detection | |
steps: | |
- name: Clean gallery | |
working-directory: build | |
run: make clean-gallery | |
- name: Running sphinx | |
working-directory: build | |
run: xvfb-run make doc # xvfb is necessary for headless display of pyvista plots | |
merging: | |
name: Automerging | |
runs-on: self-hosted | |
needs: docs | |
if: github.ref == 'refs/heads/dev' # Only merge from dev | |
steps: | |
- name: Merge dev -> master | |
working-directory: source | |
run: | | |
git config user.name 'Florian Wagner' | |
git config user.email 'florian-wagner@users.noreply.github.com' | |
git checkout master | |
git merge dev --no-commit | |
git push origin master | |
upload-html: | |
name: Upload HTML to dev.pygimli.org | |
runs-on: self-hosted | |
needs: docs | |
if: github.ref == 'refs/heads/dev' # Only merge from dev | |
steps: | |
- name: Uploading built html files | |
working-directory: build | |
run: rsync -avP --delete doc/html/ /var/www/html | |