CI #1364
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
name: CI | |
env: {} | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "00 17 * * *" | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.8"] | |
steps: | |
- name: install glut | |
run: sudo apt-get update && sudo apt-get install -y procps freeglut3-dev libglu1-mesa unzip | |
- name: Check out source code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: ~/.mantid | |
run: git clone https://github.com/yxqd/dotmantid ~/.mantid | |
# setup conda | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
activate-environment: testenv | |
python-version: ${{ matrix.python-version }} | |
channels: mantid,mcvine,conda-forge | |
# use mamba solver | |
- name: use mamba solver in conda | |
shell: pwsh | |
run: | | |
# conda update -n base conda | |
conda install -n base conda-libmamba-solver | |
conda config --set solver libmamba | |
# install deps and build | |
- name: install / build | |
shell: pwsh | |
run: | | |
conda install pytest pytest-cov coveralls openmpi mcvine-core=1.4.12 | |
python -c "import matplotlib; import mantid" | |
mcvine | |
conda install numba=0.53.1 cupy cudatoolkit=11.2.2 | |
python setup.py sdist | |
pip install --no-deps . | |
python -m "mcvine.acc.patch_numba" | |
# test | |
- name: test | |
shell: pwsh | |
run: | | |
cd tests | |
py.test | |
python instruments/VERDI/test_verdi_cpu.py | |
env: | |
NUMBA_ENABLE_CUDASIM: 1 | |
build-and-test-self-hosted: | |
runs-on: self-hosted | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8"] | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
# install deps and build | |
- name: install / build | |
run: | | |
eval "$(/home/docker/miniconda3/bin/conda shell.bash hook)" | |
conda remove -n testenv --all | |
conda create -n testenv python=${{ matrix.python-version }} | |
conda activate testenv | |
conda install pytest pytest-cov coveralls openmpi mcvine-core=1.4.12 | |
python -c "import matplotlib" | |
mcvine | |
conda install numba=0.53.1 cupy cudatoolkit=11.2.2 | |
python setup.py sdist | |
pip install --no-deps . | |
python -m "mcvine.acc.patch_numba" | |
# test | |
- name: test | |
run: | | |
eval "$(/home/docker/miniconda3/bin/conda shell.bash hook)" | |
conda activate testenv | |
cd tests | |
py.test | |
python instruments/VERDI/test_verdi_cpu.py | |