diff --git a/.github/workflows/python_wrapper.yml b/.github/workflows/python_wrapper.yml index 47f0ecc6..aa6c17f1 100644 --- a/.github/workflows/python_wrapper.yml +++ b/.github/workflows/python_wrapper.yml @@ -30,8 +30,11 @@ jobs: python -c "import spec; print('success')" conda-build-ubuntu: - runs-on: ubuntu-latest + runs-on: {{ matrix.os }} name: python_wrapper conda build + matrix: + python-version: ["3.9", "3.11", "3.12"] + os: ["ubuntu-latest", "macos-latest"] defaults: run: shell: bash -l {0} @@ -44,58 +47,13 @@ jobs: miniconda-version: "latest" environment-name: spec_wrapper environment-file: spec_env.yml + python-version: ${{ matrix.python-version }} activate-environment: spec_wrapper - # - name: Echo conda environment - # run: conda env export + - name: conda environment + run: conda env export + - name: pip environment + run: pip freeze - name: Test if installation is ok run: | - echo $CONDA_PREFIX - conda env export - pip freeze - python --version - python -c "import numpy; print('numpy')" python -c "import spec; print('success')" - python -c "import py_spec; print('py_spec success')" - - conda-test: - name: minimal conda example - runs-on: "ubuntu-latest" - defaults: - run: - shell: bash -l {0} - steps: - - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - miniconda-version: "latest" - environment-file: minimalenv.yml - activate-environment: test - - name: "Call conda install" - run: | - python --version - python -c "import numpy; print('numpy')" - - conda-build-macos: - name: Ex2 Mac - runs-on: "macos-latest" - steps: - - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - miniconda-version: "latest" - environment-file: minimalenv.yml - activate-environment: test - - name: Sh - shell: sh -l {0} - run: | - conda info - conda list - printenv | sort - - name: Bash - shell: bash -el {0} - run: | - conda info - conda list - printenv | sort - python --version - python -c "import numpy; print('numpy')" \ No newline at end of file + python -c "import py_spec; print('py_spec success')" \ No newline at end of file diff --git a/spec_env.yml b/spec_env.yml index 0e75cdb3..fa83d42b 100644 --- a/spec_env.yml +++ b/spec_env.yml @@ -2,7 +2,6 @@ channels: - conda-forge dependencies: # Common dependencies - - python=3.11 # Platform agnostic build dependencies - c-compiler @@ -27,18 +26,16 @@ dependencies: - cmake - ninja - f90nml - - f90wrap - pip # Install the spec wrapper and py_spec package in editable mode # as enabled by https://github.com/conda/conda/pull/3969 - pip: - - "." - - "./Utilities/pythontools" + - f90wrap + - -e "." + - -e "./Utilities/pythontools" # Set environment variables variables: # Append py_spec to the python path, so completion is availble in your IDE PYTHONPATH: "'$PYTHONPATH:$PWD'/Utilities/pythontools" - # Append the spec executable to the PATH, so it can be called from anywhere - # PATH: "'${PATH}:$PWD'"