Skip to content

CI, python, and cmake cleanup #8

CI, python, and cmake cleanup

CI, python, and cmake cleanup #8

Workflow file for this run

name: CondaDev
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
jobs:
build:
name: Test on Python ${{ matrix.python-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-22.04', 'macos-13']
python-version: ['3.9', '3.10', '3.11', '3.12']
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
PYTHONIOENCODING: utf-8
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: pyre2
environment-file: environment.devenv.yml
- name: Cache conda packages
id: cache
uses: actions/cache@v4
env:
# Increase this value to reset cache and rebuild the env during the PR
CACHE_NUMBER: 0
with:
path: /home/runner/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('environment.devenv.yml') }}
restore-keys: |
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
- name: Configure condadev environment
shell: bash -el {0}
env:
PY_VER: ${{ matrix.python-version }}
run: |
conda config --set always_yes yes --set changeps1 no
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Build and test
shell: bash -el {0}
env:
PY_VER: ${{ matrix.python-version }}
run: |
python -m pip install .[test] -vv
python -m pytest -v .