Skip to content

Github action script replacing travis #2

Github action script replacing travis

Github action script replacing travis #2

Workflow file for this run

# 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

Check failure on line 15 in .github/workflows/main.yaml

View workflow run for this annotation

GitHub Actions / main

Invalid workflow file

The workflow is not valid. .github/workflows/main.yaml (Line: 15, Col: 9): Unexpected value 'NUMPY_VERSION=1.15' .github/workflows/main.yaml (Line: 25, Col: 25): A sequence was not expected
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ['2.7', '3.7','3.10', '3.12']
- 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