diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..7ca1886 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,61 @@ +# 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} + 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