Skip to content

Commit

Permalink
chg: revert to latest action and package versions
Browse files Browse the repository at this point in the history
* leave default PY_VER but do not specify version for action
* use proper activate command workflow in build step
* add some path and prefix introspection, try find/which
* bump windows ci runner version, list env, cat dirent.h
* do not use jinja compier templates, revert to py39 default

Signed-off-by: Stephen L Arnold <[email protected]>
  • Loading branch information
sarnold committed Dec 10, 2023
1 parent 972b165 commit 1a0cf86
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/conda-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ jobs:
build:
name: abc ${{ matrix.python-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-22.04', 'ubuntu-20.04', 'macOS-11', 'windows-2019']
os: ['ubuntu-22.04', 'ubuntu-20.04', 'macOS-11', 'windows-2022']
python-version: ['3.11']
use_namespace: [false, true]
include:
Expand All @@ -31,13 +28,13 @@ jobs:
- os: 'macOS-11'
generator: 'Ninja'
build_type: 'Release'
- os: 'windows-2019'
- os: 'windows-2022'
generator: 'Ninja'
build_type: 'Release'
extra_args: '-DABC_USE_NO_PTHREADS=ON -DABC_USE_NO_READLINE=ON'
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
PY_VER: ${{ matrix.python-version }}
PYTHONIOENCODING: utf-8
CMAKE_ARGS: ${{ matrix.use_namespace && '-DABC_USE_NAMESPACE=xxx' || '' }}

Expand All @@ -54,36 +51,42 @@ jobs:
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
auto-activate-base: true
python-version: ${{ matrix.python-version }}
activate-environment: ''
channels: conda-forge
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 install conda-devenv=2.1.1
conda install conda-devenv=3.2.0
conda info
conda list
- name: Build and test
shell: bash -l {0}
env:
PY_VER: ${{ matrix.python-version }}
run: |
conda devenv
conda activate abc
conda info --envs
source activate abc
conda list dirent
conda list
echo $CONDA_PREFIX
find $CONDA_PREFIX -maxdepth 2 -type d -name bin
cat $(find $CONDA_PREFIX -maxdepth 5 -type f -name dirent.h) || true
echo $PATH
ctest --build-generator "${{ matrix.generator }}" \
--build-and-test . build \
--build-options ${CMAKE_ARGS} ${{ matrix.extra_args }} \
Expand Down
6 changes: 4 additions & 2 deletions environment.devenv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ dependencies:
- python ={{ get_env("PY_VER", default="3.10") }}
- cmake>=3.18
- ninja
- c-compiler
- cxx-compiler
- gxx_linux-64 # [linux]
- ccache # [not win]
- clcache # [win] Windows has clcache
- make # [unix]
- nmake # [win]
- readline=8.1 # [unix]
- zlib
- libpng
Expand Down

0 comments on commit 1a0cf86

Please sign in to comment.