Skip to content

Commit

Permalink
chg: usr: update devenv file and conda-dev workflow, update win path
Browse files Browse the repository at this point in the history
* update setup-miniconda config to get latest pkg versions
* add more workflow output, reset cache number

Signed-off-by: Stephen L Arnold <sarnold@vctlabs.com>
  • Loading branch information
sarnold committed Dec 4, 2023
1 parent 6307b35 commit 8dc9cdd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/conda-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
build:
name: abc ${{ matrix.python-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -44,38 +47,45 @@ jobs:
- name: Setup base python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: '3.10'

- name: Cache conda
id: cache
uses: actions/cache@v3
env:
# Increase this value to reset cache if environment.devenv.yml has not changed
CACHE_NUMBER: 1
CACHE_NUMBER: 2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.devenv.yml') }}

- uses: conda-incubator/setup-miniconda@v2
- 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
channel-priority: flexible

- 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=2.1.1
conda install conda-devenv=3.2.0
conda devenv
- name: Display condadev environment
env:
PY_VER: ${{ matrix.python-version }}
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Build and test
shell: bash -l {0}
env:
PY_VER: ${{ matrix.python-version }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ abc.history

.tox/
staging/
environment.yml
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ if(WIN32)
add_definitions(-DWIN32 -D__MINGW32__ -DHAVE_STRUCT_TIMESPEC)
if(DEFINED ENV{CONDA_PREFIX})
target_include_directories(abc_interface
INTERFACE $ENV{CONDA_PREFIX}/include
INTERFACE $ENV{CONDA_PREFIX}/Library/include
)
endif()
endif()
Expand Down
9 changes: 8 additions & 1 deletion environment.devenv.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: abc-test

dependencies:
- python ={{ get_env("PY_VER", default="3.9") }}
- python ={{ get_env("PY_VER", default="3.10") }}
- cmake>=3.18
- ninja
- c-compiler
Expand All @@ -11,3 +11,10 @@ dependencies:
- zlib
- libpng
- dirent >=1.21,<2.0 # [win]

environment:
CPATH:
- $CONDA_PREFIX/include # [unix]
- $CONDA_PREFIX/Library/include # [win]

LD_LIBRARY_PATH: $CONDA_PREFIX/lib # [unix]

0 comments on commit 8dc9cdd

Please sign in to comment.