CI #222
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: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: "25 19 * * *" | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.9"] | |
steps: | |
- 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: test | |
python-version: ${{ matrix.python-version }} | |
channels: 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 / test | |
shell: pwsh | |
run: | | |
conda install -c mcvine/label/unstable mcvine-core tqdm multiphonon periodictable | |
mcvine | |
./builders/github-actions/build_and_test.sh | |
env: | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
- name: conda build and upload | |
shell: pwsh | |
run: | | |
./builders/github-actions/conda_build_and_upload.sh | |
env: | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
CONDA_UPLOAD_TOKEN: ${{ secrets.ANACONDA_TOKEN }} |