Skip to content

update doc string #189

update doc string

update doc string #189

Workflow file for this run

name: build
on:
push:
branches: [main]
pull_request:
branches: ['main**']
release:
types: [created]
env:
BUILD_TYPE: Debug
jobs:
pypi-linux:
name: Build wheels for linux
runs-on: ubuntu-latest
#container:
#image: quay.io/pypa/manylinux2014_x86_64:latest
#image: sameli/manylinux2014_x86_64_cuda_11
steps:
- name: clear cache
run: rm -rf /opt/hostedtoolcache
- uses: actions/checkout@v4
with:
submodules: 'True'
path: 'NGSTrefftz'
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: pull manylinux
run: docker pull sameli/manylinux2014_x86_64_cuda_11.7
- name: run test
run: docker run -v $GITHUB_WORKSPACE:/workspace sameli/manylinux2014_x86_64_cuda_11.7 /bin/sh /workspace/NGSTrefftz/.github/workflows/build_linux_test.sh
- name: build pip
run: docker run -v $GITHUB_WORKSPACE:/workspace sameli/manylinux2014_x86_64_cuda_11.7 /bin/sh /workspace/NGSTrefftz/.github/workflows/build_pip.sh
- name: Store the binary wheel
uses: actions/upload-artifact@v4
with:
name: python-package-distributions-linux
path: NGSTrefftz/wheelhouse
pypi-mac:
name: Build wheels for macOS
strategy:
matrix:
py: ['3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: macos-11
env:
MACOSX_DEPLOYMENT_TARGET: '10.15'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
path: 'NGSTrefftz'
- name: Get Python ${{ matrix.py }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Run build script
run: cd NGSTrefftz/.github/workflows && bash build_pip_mac.sh ${{ matrix.py }}
- name: Store the binary wheel
uses: actions/upload-artifact@v4
with:
name: python-package-distributions-mac-${{ matrix.py }}
path: NGSTrefftz/wheelhouse
pypi-win:
name: Build wheels for Windows
strategy:
matrix:
py: ['3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
path: 'NGSTrefftz'
- name: Get Python ${{ matrix.py }}
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Run build script
run: Set-Location NGSTrefftz/.github/workflows; ./build_pip.ps1 ${{ env.pythonLocation }}
- name: Store the binary wheel
uses: actions/upload-artifact@v4
with:
name: python-package-distributions-win-${{ matrix.py }}
path: NGSTrefftz/wheelhouse
pypi-src:
name: pypi src
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'True'
fetch-depth: 0
path: 'NGSTrefftz'
- name: install pkgs
run: |
sudo apt-get update && DEBIAN_FRONTEND="noninteractive" sudo apt-get -y install vim python3 python3-pip python3-distutils python3-tk libpython3-dev libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev libblas-dev liblapack-dev
- name: Update pip and Install setuptools
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -U pytest-check numpy wheel scikit-build mkl==2023.* mkl-devel==2023.* setuptools setuptools_scm
python3 -m pip install ngsolve --pre
- name: Package ngstrefftz sources for PyPI
run: cd NGSTrefftz && python3 setup.py sdist -d wheelhouse
#- name: pip install ngstrefftz
#run: pip install dist/*
- name: Store the sdist
uses: actions/upload-artifact@v4
with:
name: python-package-distributions-src
path: NGSTrefftz/wheelhouse
publish-pypi:
name: Publish to PyPI
#if: github.event_name == 'release' && github.event.action == 'created'
needs: [pypi-linux, pypi-mac, pypi-win, pypi-src]
runs-on: ubuntu-latest
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
pattern: python-package-distributions-*
merge-multiple: true
path: NGSTrefftz/wheelhouse/
- name: Publish binary distributions to PyPI
if: github.ref == 'refs/heads/main' || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: NGSTrefftz/wheelhouse/
#repository-url: https://test.pypi.org/legacy/
docker:
needs: [publish-pypi]
runs-on: ubuntu-latest
steps:
- name: clear cache
run: rm -rf /opt/hostedtoolcache
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: paulstdocker/ngstrefftz
# generate Docker tags based on the following events/attributes
tags: type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/#-action@v3
if: github.event_name == 'release' && github.event.action == 'created'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: "Dockerfile"
push: ${{ github.event_name == 'release' && github.event.action == 'created' }}
tags: ${{ steps.meta.outputs.tags }}
#labels: ${{ steps.meta.outputs.labels }}
pyodide:
#needs: [publish-pypi]
if: false
runs-on: ubuntu-latest
steps:
- name: clear cache
run: rm -rf /opt/hostedtoolcache
- uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
submodules: 'True'
path: 'NGSTrefftz'
- name: install pkgs
run: sudo apt-get update && DEBIAN_FRONTEND="noninteractive" sudo apt-get -y install docker
- name: build docker
run: cd $GITHUB_WORKSPACE/NGSTrefftz && docker build -t ngstpyodide -f .github/workflows/pyodide/Dockerfile .
- name: retrieve tar
run: id=$(docker create ngstpyodide) && docker cp $id:/root/output/ngstrefftz_pyodide.tar.bz2 $GITHUB_WORKSPACE/
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build the JupyterLite site
run: |
cd $GITHUB_WORKSPACE/NGSTrefftz/.github/workflows/pyodide && python -m pip install -r requirements.txt
cd $GITHUB_WORKSPACE && jupyter lite build --pyodide ngstrefftz_pyodide.tar.bz2 --contents ./NGSTrefftz/docs/notebooks/ --output-dir ngst-pyodide
#- name: upload
#uses: actions/upload-pages-artifact@v3
- name: Store the sdist
uses: actions/upload-artifact@v4
with:
name: ngst-pyodide
path: ./ngst-pyodide
docs:
needs: [publish-pypi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
submodules: 'True'
path: 'NGSTrefftz'
- name: install pkgs
run: sudo apt-get update && DEBIAN_FRONTEND="noninteractive" sudo apt-get -y install libxmu-dev tk-dev tcl-dev git libglu1-mesa-dev libblas-dev liblapack-dev python3 python3-pip python3-distutils python3-tk libpython3-dev python3-testresources npm nodejs pandoc -y
#- name: pip pkgs
#run: python3 -m pip list
- name: pip install requirements
run: pip install --user -r $GITHUB_WORKSPACE/NGSTrefftz/docs/requirements.txt
- name: set path
run: |
echo "NETGENDIR=/usr/bin/" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }}:/home/runner/.local/lib:/usr/local/lib/" >> $GITHUB_ENV
- name: Build and Commit
uses: sphinx-notes/pages@v2
with:
repository_path: 'NGSTrefftz'
publish: false
#requirements_path: ./docs/requirements.txt
- name: Download pyodide stuff
if: false
uses: actions/download-artifact@v4
with:
name: ngst-pyodide
path: NGSTrefftz/ngst-pyodide
- run: tree -d .
- name: Upload
uses: actions/upload-pages-artifact@v3
with:
path: 'NGSTrefftz/'
deploy-docs:
needs: docs
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
#if: github.event_name == 'release' && github.event.action == 'created'
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
paper-path: docs/paper/paper.md
- name: Upload
uses: actions/upload-artifact@v4
with:
name: joss_paper
path: docs/paper/paper.pdf