Skip to content

CI, python, and cmake cleanup #7

CI, python, and cmake cleanup

CI, python, and cmake cleanup #7

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 }}
channels: conda-forge
use-only-tar-bz2: true
- 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 -l {0}
env:
PY_VER: ${{ matrix.python-version }}
run: |
conda config --set always_yes yes --set changeps1 no
conda config --add channels conda-forge
conda install conda-devenv
conda devenv
- name: Build and test
shell: bash -l {0}
env:
PY_VER: ${{ matrix.python-version }}
run: |
source activate pyre2
python -m pip install .[test] -vv
python -m pytest -v .