From 1465367ab228e1ceae8bb28f624bf2bb602fcffa Mon Sep 17 00:00:00 2001 From: Stephen Arnold Date: Sat, 7 Sep 2024 22:12:24 -0700 Subject: [PATCH] chg: switch conda workflow to condadev environment Signed-off-by: Stephen Arnold --- .github/workflows/{conda.yml => conda-dev.yml} | 17 +++++++---------- environment.devenv.yml | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 13 deletions(-) rename .github/workflows/{conda.yml => conda-dev.yml} (87%) diff --git a/.github/workflows/conda.yml b/.github/workflows/conda-dev.yml similarity index 87% rename from .github/workflows/conda.yml rename to .github/workflows/conda-dev.yml index 6312fc2..41e5da7 100644 --- a/.github/workflows/conda.yml +++ b/.github/workflows/conda-dev.yml @@ -2,10 +2,10 @@ name: CondaDev on: workflow_dispatch: - #push: - #branches: - #- master - #pull_request: + push: + branches: + - master + pull_request: jobs: build: @@ -14,8 +14,8 @@ jobs: strategy: fail-fast: false matrix: - os: ['macos-11', 'ubuntu-22.04'] - python-version: ['3.8', '3.11'] + os: ['ubuntu-22.04', 'macos-13'] + python-version: ['3.9', '3.10', '3.11', '3.12'] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} @@ -23,15 +23,12 @@ jobs: steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true python-version: ${{ matrix.python-version }} channels: conda-forge - channel-priority: strict use-only-tar-bz2: true - name: Cache conda packages @@ -39,7 +36,7 @@ jobs: uses: actions/cache@v4 env: # Increase this value to reset cache and rebuild the env during the PR - CACHE_NUMBER: 3 + CACHE_NUMBER: 0 with: path: /home/runner/conda_pkgs_dir key: diff --git a/environment.devenv.yml b/environment.devenv.yml index dcdee67..1e45b2b 100644 --- a/environment.devenv.yml +++ b/environment.devenv.yml @@ -1,11 +1,22 @@ name: pyre2 +{% set python_version = os.environ.get("PY_VER", "3.11") %} + +channels: + - conda-forge + dependencies: - - python ==3.11 - - cmake >=3.18 + - cmake>=3.18 - ninja + - ccache + - clangxx_osx-64 # [osx] + - gxx_linux-64 # [linux] + - pybind11-abi + - pybind11-stubgen + - vs2019_win-64 # [win] + - pkgconfig # [win] + - python={{ python_version }} - cython - - cxx-compiler - pybind11 - pip - re2