Skip to content

Commit

Permalink
Github action script replacing travis
Browse files Browse the repository at this point in the history
  • Loading branch information
sbird committed Aug 20, 2024
1 parent 9e0e0a0 commit 4ee79f7
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/main.yaml
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

0 comments on commit 4ee79f7

Please sign in to comment.