Skip to content

Merge pull request #219 from constantinpape/env-update #143

Merge pull request #219 from constantinpape/env-update

Merge pull request #219 from constantinpape/env-update #143

Workflow file for this run

---
name: build
on: [push, pull_request]
jobs:
test:
name: ${{ matrix.os }} ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
# this will set the system compiler;
# I don't know how to set the conda compilers for windows
# This must be done *before* setting up miniconda, see:
# https://github.com/ilammy/msvc-dev-cmd/issues/34
- name: Set windows env
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: z5-build-env
auto-update-conda: true
channels: conda-forge
environment-file: .github/workflows/environment.yaml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Build unix
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
shell: bash -l {0}
run: .github/workflows/build_unix.sh
- name: Build win
if: matrix.os == 'windows-latest'
shell: bash -l {0}
run: .github/workflows/build_win.bat
- name: Run tests
shell: bash -l {0}
run: python -m unittest discover -s src/python/test -v