File: miniconda.yml

package info (click to toggle)
netcdf4-python 1.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,612 kB
  • sloc: python: 6,075; ansic: 854; makefile: 17; sh: 2
file content (100 lines) | stat: -rw-r--r-- 2,831 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build and Test

on:
  pull_request:
  push:
    branches: [master]

jobs:
  run-serial:
    runs-on: ${{ matrix.os }}
    #env:
    #  NO_NET: 1
    strategy:
      matrix:
        python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
        os: [windows-latest, ubuntu-latest, macos-latest]
        platform: [x64, x32]
        exclude:
          - os: macos-latest
            platform: x32
      fail-fast: false
    defaults:
      run:
        shell: bash -l {0}

    steps:
    - uses: actions/checkout@v6
      with:
        submodules: true

    - name: Setup Micromamba
      uses: mamba-org/setup-micromamba@v2
      with:
        environment-name: TEST
        init-shell: bash
        create-args: >-
          python=${{ matrix.python-version }}
          numpy cython pip setuptools pytest hdf5 libnetcdf cftime zlib certifi typing-extensions
          --channel conda-forge

    - name: Install netcdf4-python
      run: |
        export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
        python -m pip install -v -e . --no-deps --no-build-isolation --force-reinstall

    - name: Tests
      run: |
        if [ "$RUNNER_OS" == "Windows" ]; then
           export HDF5_PLUGIN_PATH="${CONDA_PREFIX}\\Library\\hdf5\\lib\\plugin"
        else
           export HDF5_PLUGIN_PATH="${CONDA_PREFIX}/hdf5/lib/plugin/"
        fi
        pytest -s -rxs -v test

  run-mpi:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        python-version: [ "3.12" ]
        os: [ubuntu-latest]
        platform: [x64]
    defaults:
      run:
        shell: bash -l {0}
    steps:
    - uses: actions/checkout@v6
      with:
        submodules: true

    - name: Setup Micromamba
      uses: mamba-org/setup-micromamba@v2
      with:
        environment-name: TEST
        init-shell: bash
        create-args: >-
          python=${{ matrix.python-version }}
          numpy cython pip pytest openmpi mpi4py hdf5=*=mpi* libnetcdf=*=mpi* cftime zlib certifi typing-extensions
          --channel conda-forge

    - name: Install netcdf4-python with mpi
      run: |
        export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
        nc-config --all
        python -m pip install -v -e . --no-build-isolation --no-deps --force-reinstall

    - name: Tests
      run: |
        cd test && python run_all.py
        cd ../examples
        export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH"
        which mpirun
        mpirun --version
        mpirun -np 4 --oversubscribe python mpi_example.py # for openmpi
        #mpirun -np 4 python mpi_example.py
        if [ $? -ne 0 ] ; then
          echo "hdf5 mpi test failed!"
          exit 1
        else
          echo "hdf5 mpi test passed!"
        fi