File: config.yml

package info (click to toggle)
neuron 8.2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,768 kB
  • sloc: cpp: 149,571; python: 58,449; ansic: 50,329; sh: 3,510; xml: 213; pascal: 51; makefile: 35; sed: 5
file content (114 lines) | stat: -rw-r--r-- 3,551 bytes parent folder | download | duplicates (2)
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
version: 2.1

orbs:
  python: circleci/python@0.3.2

jobs:
  manylinux2014-aarch64:

    parameters:
      NRN_PYTHON_VERSION:
        type: string
      NRN_NIGHTLY_UPLOAD:
        type: string

    machine:
      image: ubuntu-2004:202101-01

    resource_class: arm.medium

    steps:
      - checkout
      - run:
          name: Build manylinux AArch64 wheel
          command: |
            docker run --rm \
                -w /root/nrn \
                -v $PWD:/root/nrn \
                -v /opt/nrnwheel/mpt:/nrnwheel/mpt \
                -e NEURON_NIGHTLY_TAG \
                -e NRN_NIGHTLY_UPLOAD \
                -e NRN_RELEASE_UPLOAD \
                -e NEURON_WHEEL_VERSION \
                -e NRN_BUILD_FOR_UPLOAD=1 \
                'neuronsimulator/neuron_wheel:latest-gcc9-aarch64' \
                packaging/python/build_wheels.bash linux << parameters.NRN_PYTHON_VERSION >> coreneuron

      - store_artifacts:
          path: ./wheelhouse
          destination: artifacts

      - run:
          name: Test manylinux AArch64 wheel
          command: |

            # install mpi dependencies
            sudo apt update
            sudo apt install -y mpich openmpi-bin libopenmpi-dev libmpich-dev

            # choose available python versions from pyenv
            pyenv_py_ver=""
            case << parameters.NRN_PYTHON_VERSION >> in
              37) pyenv_py_ver="3.7.9" ;;
              38) pyenv_py_ver="3.8.7" ;;
              39) pyenv_py_ver="3.9.1" ;;
              310) pyenv_py_ver="3.10.1" ;;
              311) pyenv_py_ver="3.11.0" ;;
              *) echo "Error: pyenv python version not specified!" && exit 1;;
            esac

            # install python dependencies: .10 is not available pyenv
            if [ "<< parameters.NRN_PYTHON_VERSION >>" == "310" ]; then
              sudo apt install software-properties-common -y
              sudo add-apt-repository ppa:deadsnakes/ppa -y
              sudo apt install python3.10 libpython3.10 python3.10-venv
              export PYTHON_EXE=$(which python3.10)
            else
              cd /opt/circleci/.pyenv/plugins/python-build/../.. && git pull && cd -
              env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $pyenv_py_ver --force
              pyenv global $pyenv_py_ver
              export PYTHON_EXE=$(which python)
            fi

            # test wheel
            packaging/python/test_wheels.sh $PYTHON_EXE $(ls -t wheelhouse/*.whl)

      - run:
          name: Upload nightly wheel to pypi.org
          command: |
            if [ "<< parameters.NRN_NIGHTLY_UPLOAD >>" == "true" ]; then
              python -m pip install twine
              python -m twine upload --verbose --skip-existing -u $TWINE_USERNAME -p $TWINE_PASSWORD  wheelhouse/*.whl
            else
              echo "Skipping pypi.org upload!"
            fi

workflows:

  build-workflow:
    jobs:
      - manylinux2014-aarch64:
          filters:
            branches:
              only:
                - /release\/.*/
                - /circleci\/.*/
          matrix:
            parameters:
              NRN_PYTHON_VERSION: ["311"]
              NRN_NIGHTLY_UPLOAD: ["false"]

  nightly:
    triggers:
      - schedule:
          cron: "0 0 * * *"
          filters:
            branches:
              only:
                - master
    jobs:
      - manylinux2014-aarch64:
          matrix:
            parameters:
              NRN_PYTHON_VERSION: ["37", "38", "39", "310", "311"]
              NRN_NIGHTLY_UPLOAD: ["true"]