Skip to content

Commit

Permalink
ci: enable github actions (#5)
Browse files Browse the repository at this point in the history
* ci: enable github actions

* ci: add pyvkfft to conda env
  • Loading branch information
alexfikl authored Mar 25, 2024
1 parent 07c6ca8 commit 59b718b
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 46 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: CI
on:
push:
branches: [ 'main' ]
pull_request: [ 'main' ]
schedule:
- cron: '17 3 * * 0'

jobs:
flake8:
name: Linting (flake8)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# matches compat target in setup.py
python-version: '3.8'
- name: "Main Script"
run: |
export CONDA_ENVIRONMENT=.test-conda-env-py3.yml
curl -L -O https://tiker.net/ci-support-v0
. ci-support-v0
build_py_project_in_conda_env
install_and_run_flake8 "$(get_proj_name)" examples/*.py test/*.py benchmarks/*.py
pytest:
name: Testing (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: "Main Script"
run: |
export CONDA_ENVIRONMENT=.test-conda-env-py3.yml
export PYTEST_FLAGS="--cov=volumential"
curl -L -O https://tiker.net/ci-support-v0
. ci-support-v0
build_py_project_in_conda_env
test_py_project
pytest_mac:
name: Testing (macOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: "Main Script"
run: |
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export CONDA_ENVIRONMENT=.test-conda-env-py3-macos.yml
export PYTEST_FLAGS="--cov=volumential"
curl -L -O https://tiker.net/ci-support-v0
. ci-support-v0
build_py_project_in_conda_env
test_py_project
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: "Main Script"
run: |
export CONDA_ENVIRONMENT=.test-conda-env-py3.yml
curl -L -O https://tiker.net/ci-support-v0
. ci-support-v0
build_py_project_in_conda_env
build_docs
examples:
name: Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: "Main Script"
run: |
export CONDA_ENVIRONMENT=.test-conda-env-py3.yml
curl -L -O https://tiker.net/ci-support-v0
. ci-support-v0
build_py_project_in_conda_env
run_examples
# vim: sw=2
50 changes: 25 additions & 25 deletions .test-conda-env-py3-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@ channels:
- conda-forge
- defaults
dependencies:
- git
- python>=3.8
- dealii
- pocl
- pyopencl
- pyfmmlib
- scipy
- numpy
- sympy
- symengine
- python-symengine
- cython
- cgen
- toml
- py
- pluggy
- packaging
- iniconfig
- attrs
- genpy
- cgen
- clangdev
- cmake
- colorama
- islpy
- pyrsistent
- cython
- dealii
- genpy
- git
- h5py
- iniconfig
- islpy
- numpy
- openmp
- packaging
- pluggy
- pocl
- py
- pyevtk
- pyfmmlib
- pyopencl
- pyrsistent
- pytest
- pytest-cov
- cmake
# enable openmp on osx
- openmp
- clangdev
- python-symengine
- python>=3.8
- pyvkfft
- scipy
- symengine
- sympy
- toml

- pip
- pip:
Expand Down
43 changes: 22 additions & 21 deletions .test-conda-env-py3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,36 @@ channels:
- conda-forge
- defaults
dependencies:
- git
- python>=3.8
- dealii
- pocl
- pyopencl
- pyfmmlib
- scipy
- numpy
- sympy
- matplotlib-base
- attrs
- cgen
- cmake
- colorama
- cython
- toml
- py
- pluggy
- packaging
- iniconfig
- attrs
- dealii
- genpy
- colorama
- islpy
- pyrsistent
- git
- h5py
- iniconfig
- islpy
- matplotlib-base
- numpy
- packaging
- pluggy
- pocl
- py
- pyevtk
- pyfmmlib
- pyopencl
- pyrsistent
- pytest
- pytest-cov
- cmake
- symengine
- python-symengine
- python>=3.8
- pyvkfft
- scipy
- symengine
- sympy
- toml

- pip
- pip:
Expand Down

0 comments on commit 59b718b

Please sign in to comment.