-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github action script replacing travis
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
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,64 @@ | ||
# main test workflow; ported from .travis.yaml | ||
|
||
name: main | ||
|
||
on: | ||
push: | ||
branches: [ '*', $default-branch ] | ||
pull_request: | ||
branches: [ $default-branch ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
NUMPY_VERSION: 1.15 | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
matrix: | ||
python-version: ['2.7', '3.7','3.10', '3.12'] | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache conda | ||
uses: actions/cache@v4 | ||
env: | ||
# Increase this value to reset cache. | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: | ||
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }} | ||
|
||
- name: Setup Conda Environment | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniconda-version: latest | ||
activate-environment: test | ||
environment-file: maintainer/conda-env.yaml | ||
channels: bccp | ||
show-channel-urls: true | ||
use-only-tar-bz2: true | ||
|
||
- run: | ||
conda info | ||
|
||
- name: Build | ||
run: | | ||
conda install --yes numpy cython mpi4py nose | ||
python -m build | ||
- name: Unit tests | ||
run: | | ||
pip install runtests | ||
python ./runtests.py --mpirun="mpirun -np 4" | ||
mpirun -n 1 python $PWD/scripts/pfft-roundtrip-matrix.py -v -diag -Nproc 1 1 -Nmesh 13 15 16 | ||
mpirun -n 2 python $PWD/scripts/pfft-roundtrip-matrix.py -v -diag -Nproc 2 1 -Nproc 1 2 -Nmesh 13 15 16 | ||
mpirun -n 4 python $PWD/scripts/pfft-roundtrip-matrix.py -v -diag -Nproc 2 2 -Nmesh 13 15 16 | ||
mpirun -n 4 python $PWD/scripts/pfft-roundtrip-matrix.py -v -diag -Nproc 2 2 -Nmesh 13 15 | ||
bash check_tag.sh pfft/version.py |