Skip to content

Commit c7660eb

Browse files
authored
Merge branch 'master' into hines-grok/ctest-wheels
2 parents b7b9829 + dc3ebb2 commit c7660eb

27 files changed

Lines changed: 1521 additions & 63 deletions

.github/workflows/neuron-ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,17 @@ jobs:
217217
# A automake >= 1.16.5 is needed for python 3.12 because it generates a python script
218218
# called py-compile and the original one is not supporting this version of python
219219
# Once ubuntu got a newer version of automake we can remove this part.
220+
# Tarball from ci-deps-v1 via ci/deps (see MANIFEST id automake-1.16.5-src).
220221
if: matrix.config.music == 'ON' && startsWith(matrix.os, 'ubuntu')
221222
run: |
222-
curl -L -o automake.tar.xz https://ftpmirror.gnu.org/gnu/automake/automake-1.16.5.tar.xz
223-
tar -xf automake.tar.xz
224-
cd automake-1.16.5/
223+
export NRN_CI_DEPS_SOURCE=release
224+
bash "${{ github.workspace }}/ci/deps/fetch.sh" automake-1.16.5-src "${{ runner.temp }}"
225+
tar -xf "${{ runner.temp }}/automake-1.16.5.tar.xz" -C "${{ runner.temp }}"
226+
cd "${{ runner.temp }}/automake-1.16.5/"
225227
./configure --prefix=/usr/
226228
make -j
227229
sudo make -j install
228230
automake --version
229-
working-directory: ${{runner.temp}}
230231
231232
- name: Setup MUSIC@${{ env.MUSIC_VERSION }}
232233
if: matrix.config.music == 'ON'

.github/workflows/wheels-template.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,9 @@ jobs:
151151
run: |
152152
sudo apt update
153153
sudo apt install -y mpich openmpi-bin libopenmpi-dev libmpich-dev ninja-build
154-
155-
- name: "Apply workaround for MPICH on Ubuntu 24.04"
156-
if: inputs.platform == 'ubuntu-24.04'
157-
run: |
158-
# mpich is fundamentally broken on Ubuntu 24.04 LTS, for more details see:
159-
# https://bugs.launchpad.net/ubuntu/+source/mpich/+bug/2072338
160-
# This is fixed in version 4.2.0-5.1, but this version has not been
161-
# backported, so as a workaround, we install that version manually
162-
sudo apt install -y mpich
163-
wget 'https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/mpich_4.2.0-5.1_amd64.deb'
164-
wget 'https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/libmpich12_4.2.0-5.1_amd64.deb'
165-
sudo dpkg --install mpich_4.2.0-5.1_amd64.deb libmpich12_4.2.0-5.1_amd64.deb
154+
# Ubuntu 24.04: pin working mpich from ci/deps (no Launchpad download).
155+
# See ci/deps/README.md and LP#2072338.
156+
bash ci/deps/install_mpich_noble.sh
166157
167158
- name: Set env vars for testing (Linux)
168159
if: startsWith(inputs.platform, 'ubuntu')

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ virtualenv
2222
*.lo
2323
docs/_build
2424
docs/_generated
25+
# CI managed-download scratch (publish.sh); blobs live on GitHub Releases
26+
ci/deps/assets/
2527
.vscode
2628
.coverage*
2729
coverage*.xml

azure-pipelines.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,9 @@ stages:
8181
- script: |
8282
sudo apt update
8383
sudo apt install -y mpich openmpi-bin libopenmpi-dev libmpich-dev
84-
# mpich is fundamentally broken on Ubuntu 24.04 LTS, for more details see:
85-
# https://bugs.launchpad.net/ubuntu/+source/mpich/+bug/2072338
86-
# This is fixed in version 4.2.0-5.1, but this version has not been
87-
# backported, so as a workaround, we install that version manually
88-
source /etc/os-release
89-
if [[ "$ID" == "ubuntu" && "$VERSION_ID" == "24.04" ]]; then
90-
# mpich is fundamentally broken on Ubuntu 24.04 LTS, for more details see:
91-
# https://bugs.launchpad.net/ubuntu/+source/mpich/+bug/2072338
92-
# This is fixed in version 4.2.0-5.1, but this version has not been
93-
# backported, so as a workaround, we install that version manually
94-
sudo apt install -y mpich
95-
wget 'https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/mpich_4.2.0-5.1_amd64.deb'
96-
wget 'https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/libmpich12_4.2.0-5.1_amd64.deb'
97-
sudo dpkg --install mpich_4.2.0-5.1_amd64.deb libmpich12_4.2.0-5.1_amd64.deb
98-
fi
84+
# Ubuntu 24.04: pin working mpich from ci/deps (no Launchpad download).
85+
# See ci/deps/README.md and LP#2072338.
86+
ci/deps/install_mpich_noble.sh
9987
displayName: 'Install Test System Dependencies'
10088
10189
- template: ci/azure-wheel-test-upload.yml

ci/deps/MANIFEST.yml

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# NEURON CI dependency archive (catalog)
2+
#
3+
# Purpose: pin external CI downloads on a GitHub Release, prefer those over flaky
4+
# third-party hosts, and make upgrades explicit (update this file; re-publish;
5+
# run check-upstream.sh). Binary blobs are NOT committed under ci/deps/assets/
6+
# (that directory is gitignored scratch for publish.sh).
7+
#
8+
# Fetch order used by fetch.sh (unless NRN_CI_DEPS_SOURCE is set):
9+
# 1. local — ci/deps/assets/<file> (optional local scratch; not in git)
10+
# 2. release — ${NRN_CI_DEPS_BASE_URL}/<file> or default_release_base_url
11+
# 3. upstream — upstream_url (last resort)
12+
#
13+
# managed:
14+
# true — pin hosted on our GitHub Release (ci-deps-vN); CI should use fetch.sh
15+
# false — catalog row only; not yet switched off upstream
16+
#
17+
# See ci/deps/README.md
18+
19+
version: 1
20+
21+
# GitHub Release assets for managed pins (override with NRN_CI_DEPS_BASE_URL).
22+
# Host repo is neuronsimulator/nrn-ci-deps (not product releases on nrn).
23+
# Navigate: https://github.com/neuronsimulator/nrn-ci-deps/releases → tag ci-deps-v1
24+
default_release_base_url: "https://github.com/neuronsimulator/nrn-ci-deps/releases/download/ci-deps-v1"
25+
26+
assets:
27+
# --- P0: wheel-test MPICH workaround (Ubuntu 24.04 / noble) ---
28+
- id: mpich-noble-4.2.0-5.1
29+
file: mpich_4.2.0-5.1_amd64.deb
30+
sha256: c696dff0975f1857faaae0e450ce6262d13693a7894e523741e6b7581beee0ad
31+
upstream_url: https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/mpich_4.2.0-5.1_amd64.deb
32+
managed: true
33+
consumers:
34+
- azure-pipelines.yml
35+
- .github/workflows/wheels-template.yml
36+
- ci/deps/install_mpich_noble.sh
37+
notes: >
38+
Ubuntu 24.04 LP#2072338 workaround. Pair with libmpich12-noble-4.2.0-5.1.
39+
Only needed while distro mpich remains broken for our tests.
40+
41+
- id: libmpich12-noble-4.2.0-5.1
42+
file: libmpich12_4.2.0-5.1_amd64.deb
43+
sha256: 13a233b7dd6d8a51eccf58d981cdb1ae110b673e4dfdeb607fe439918340238f
44+
upstream_url: https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/libmpich12_4.2.0-5.1_amd64.deb
45+
managed: true
46+
consumers:
47+
- azure-pipelines.yml
48+
- .github/workflows/wheels-template.yml
49+
- ci/deps/install_mpich_noble.sh
50+
notes: Runtime library package for mpich-noble-4.2.0-5.1.
51+
52+
# --- P0/P1: static readline/ncurses sources (GNU mirrors flake) ---
53+
- id: ncurses-6.4-src
54+
file: ncurses-6.4.tar.gz
55+
sha256: 6931283d9ac87c5073f30b6290c4c75f21632bb4fc3603ac8100812bed248159
56+
upstream_url: https://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz
57+
managed: true
58+
consumers:
59+
- packaging/python/build_static_readline_osx.bash
60+
- packaging/python/Dockerfile
61+
notes: Hosted on ci-deps-v1; consumers must not use ftpmirror.gnu.org.
62+
63+
- id: readline-7.0-src
64+
file: readline-7.0.tar.gz
65+
sha256: 750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334
66+
upstream_url: https://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz
67+
managed: true
68+
consumers:
69+
- packaging/python/Dockerfile
70+
notes: >
71+
Linux manylinux Dockerfile uses 7.0. Azure Mac wheels use prebuilt secure
72+
file readline7.0-ncurses6.4.tar.gz (not in this manifest yet).
73+
74+
- id: readline-8.3-src
75+
file: readline-8.3.tar.gz
76+
sha256: fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc
77+
upstream_url: https://ftp.gnu.org/gnu/readline/readline-8.3.tar.gz
78+
managed: true
79+
consumers:
80+
- packaging/python/build_static_readline_osx.bash
81+
notes: >
82+
GH Actions Mac wheels rebuild from 8.3 every job — version skew vs Azure 7.0
83+
prebuilt. Unify in a later PR.
84+
85+
# --- P1: Windows installer toolchain ---
86+
- id: nsis-3.05
87+
file: nsis-3.05-setup.exe
88+
sha256: "" # fill when vendoring; SourceForge redirects make automated HEAD unreliable
89+
upstream_url: http://prdownloads.sourceforge.net/nsis/nsis-3.05-setup.exe
90+
managed: false
91+
consumers:
92+
- ci/win_download_deps.cmd
93+
notes: SourceForge historically flaky.
94+
95+
- id: envar-plugin-0.3.1
96+
file: EnVar-Plugin.zip
97+
sha256: e5b337fcad68252d18282f7259a0306053626e41b9480fa09df3fab012b85e00
98+
upstream_url: https://github.com/GsNSIS/EnVar/releases/download/v0.3.1/EnVar-Plugin.zip
99+
managed: false
100+
consumers:
101+
- ci/win_download_deps.cmd
102+
103+
- id: msmpi-runtime
104+
file: msmpisetup.exe
105+
sha256: ""
106+
upstream_url: https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe
107+
managed: false
108+
consumers:
109+
- ci/win_download_deps.cmd
110+
notes: Opaque Microsoft CDN path; pin by URL + hash when vendoring.
111+
112+
- id: msmpi-sdk
113+
file: msmpisdk.msi
114+
sha256: ""
115+
upstream_url: https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisdk.msi
116+
managed: false
117+
consumers:
118+
- ci/win_download_deps.cmd
119+
120+
# --- P1/P2: occasional CI tools ---
121+
- id: ccache-4.11.3-linux-x86_64
122+
file: ccache-4.11.3-linux-x86_64.tar.xz
123+
sha256: 7766991b91b3a5a177ab33fa043fe09e72c68586d5a86d20a563a05b74f119c0
124+
upstream_url: https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3-linux-x86_64.tar.xz
125+
managed: false
126+
consumers:
127+
- .github/workflows/coverage.yml
128+
notes: Already on GitHub releases; low flake priority.
129+
130+
- id: automake-1.16.5-src
131+
file: automake-1.16.5.tar.xz
132+
sha256: f01d58cd6d9d77fbdca9eb4bbd5ead1988228fdb73d6f7a201f5f8d6b118b469
133+
upstream_url: https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz
134+
managed: true
135+
consumers:
136+
- .github/workflows/neuron-ci.yml
137+
notes: Ubuntu MUSIC job path (neuron-ci); needs automake >= 1.16.5 for Python 3.12.
138+
139+
# --- Azure-only secure files (document; not managed by fetch.sh yet) ---
140+
- id: azure-secure-readline7.0-ncurses6.4
141+
file: readline7.0-ncurses6.4.tar.gz
142+
sha256: ""
143+
upstream_url: ""
144+
managed: false
145+
consumers:
146+
- azure-pipelines.yml
147+
notes: Azure Pipelines secure file (prebuilt Mac static libs). Prefer migrating to this archive.
148+
149+
- id: azure-secure-mpt-headers-2.21
150+
file: mpt_headears.2.21.tar.gz
151+
sha256: ""
152+
upstream_url: ""
153+
managed: false
154+
consumers:
155+
- azure-pipelines.yml
156+
notes: Azure secure file for SGI MPT headers (dynamic MPI in Linux wheels). Typo "headears" is the uploaded name.
157+
158+
# --- Tier B (large; usually reliable; managed: false for now) ---
159+
- id: python-3.10.0-amd64-exe
160+
file: python-3.10.0-amd64.exe
161+
sha256: ""
162+
upstream_url: https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe
163+
managed: false
164+
consumers:
165+
- ci/win_download_deps.cmd
166+
notes: ~28 MB; self-host only if python.org flakes.
167+
168+
- id: python-3.14.0-macos11-pkg
169+
file: python-3.14.0-macos11.pkg
170+
sha256: ""
171+
upstream_url: https://www.python.org/ftp/python/3.14.0/python-3.14.0-macos11.pkg
172+
managed: false
173+
consumers:
174+
- azure-pipelines.yml
175+
- .github/workflows/wheels-template.yml
176+
notes: Representative Mac python.org installer; matrix has one pkg per Python version.

ci/deps/README.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# CI dependency archive (`ci/deps`)
2+
3+
Pinned external downloads used by NEURON CI. Goal: **stop relying on flaky third-party hosts** (Launchpad, GNU mirrors, SourceForge) for known-good blobs, while keeping an explicit upgrade path.
4+
5+
**Managed binaries live on a dedicated GitHub repo’s Releases**, not in the `nrn` git tree and **not** on NEURON product Releases:
6+
7+
**https://github.com/neuronsimulator/nrn-ci-deps/releases** → tag **`ci-deps-v1`** (or later `ci-deps-vN`)
8+
9+
Sphinx / website entry point: [docs/install/ci_deps.md](../../docs/install/ci_deps.md).
10+
11+
## Layout
12+
13+
| Path | Role |
14+
|------|------|
15+
| `MANIFEST.yml` | Catalog: id, file, sha256, upstream URL, consumers, `managed`, release base URL |
16+
| `assets/` | **Not in git** (gitignored). Optional local scratch for `publish.sh` |
17+
| `fetch.sh` | Resolve one asset (local → release → upstream) + verify sha256 |
18+
| `check-upstream.sh` | Report when upstream no longer matches the pin |
19+
| `publish.sh` | Upload local scratch files to **nrn-ci-deps** Releases |
20+
| `install_mpich_noble.sh` | Ubuntu 24.04 wheel-test helper (first consumer) |
21+
22+
## `managed: true|false`
23+
24+
| Value | Meaning |
25+
|-------|---------|
26+
| **`true`** | We host the pin on **nrn-ci-deps** Releases. CI should use `fetch.sh` / install helpers. |
27+
| **`false`** | Catalog only: known URL/sha and consumers; not yet switched off upstream. |
28+
29+
`managed` answers “do **we** manage this pin’s content?” — not “is this from the original software vendor.”
30+
31+
## Fetch order
32+
33+
```text
34+
1. local: ci/deps/assets/<file> # optional gitignored scratch
35+
2. release: $NRN_CI_DEPS_BASE_URL/… # or MANIFEST default_release_base_url (nrn-ci-deps)
36+
3. upstream: upstream_url # last resort
37+
```
38+
39+
Override with `NRN_CI_DEPS_SOURCE=local|release|upstream`.
40+
41+
Wheel install helpers default to **`release`** so a missing Release asset fails loudly instead of silently re-hitting Launchpad.
42+
43+
## Adding / promoting the next blocker
44+
45+
1. Reproduce the failing URL; download once; `sha256sum` it.
46+
2. Add or update a row in `MANIFEST.yml` (`sha256`, `upstream_url`, consumers).
47+
3. Stage files only on disk (not for commit):
48+
49+
```bash
50+
mkdir -p ci/deps/assets
51+
# copy or: NRN_CI_DEPS_SOURCE=upstream ci/deps/fetch.sh <id> ci/deps/assets
52+
ci/deps/publish.sh --tag ci-deps-v1 # uploads to neuronsimulator/nrn-ci-deps
53+
rm -f ci/deps/assets/* # optional
54+
```
55+
56+
4. Set `managed: true`. Ensure `default_release_base_url` matches the release tag/repo.
57+
5. Point the pipeline at `ci/deps/fetch.sh <id>` or an install helper.
58+
6. Open a PR on **nrn** with **text only** (MANIFEST / scripts / docs).
59+
60+
## Upgrading a pin
61+
62+
```bash
63+
ci/deps/check-upstream.sh mpich-noble-4.2.0-5.1
64+
65+
# If STALE and you intend to move:
66+
# 1. download new upstream artifacts into a temp dir / assets/
67+
# 2. update sha256 (and file names if needed) in MANIFEST.yml
68+
# 3. publish.sh --tag ci-deps-v1 (or a new tag + update default_release_base_url)
69+
# 4. re-run check-upstream.sh
70+
# 5. PR the MANIFEST (and consumer) changes only
71+
```
72+
73+
There is no automatic upgrade. `check-upstream.sh` is awareness only.
74+
75+
## Currently managed assets (`managed: true`)
76+
77+
Hosted on **nrn-ci-deps** release **`ci-deps-v1`**:
78+
79+
- `mpich_4.2.0-5.1_amd64.deb` + `libmpich12_4.2.0-5.1_amd64.deb` — Ubuntu 24.04 wheel tests (LP#2072338)
80+
- `ncurses-6.4.tar.gz`, `readline-8.3.tar.gz` — Mac static readline (`build_static_readline_osx.bash`)
81+
- `readline-7.0.tar.gz`, `ncurses-6.4.tar.gz` — manylinux wheel image (`packaging/python/Dockerfile`)
82+
- `automake-1.16.5.tar.xz` — Ubuntu MUSIC path in `neuron-ci.yml`
83+
84+
## Related but not yet managed (`managed: false`)
85+
86+
- Azure secure files: `readline7.0-ncurses6.4.tar.gz`, `mpt_headears.2.21.tar.gz`
87+
- python.org installers (large)
88+
- Windows NSIS / MS-MPI installers
89+
- apt / brew / pip (package managers — different strategy)
90+
91+
## MPI coverage note
92+
93+
Wheel testing (`packaging/python/test_wheels.sh`) runs **serial** tests with MPI packages present, then **parallel** tests under both MPICH and OpenMPI. It does **not** currently isolate “MPI not installed.” Source CI mixes `NRN_ENABLE_MPI=OFF` with default MPI-linked builds; dynamic multi-MPI is primarily a **wheel** concern.
94+
95+
## Requirements
96+
97+
- `bash`, `curl` (or `wget`), `sha256sum` / `shasum`
98+
- `python3` (stdlib only; `ci/deps/_manifest.py` parses the restricted MANIFEST subset without PyYAML)
99+
- `gh` only for `publish.sh` (needs write access to `neuronsimulator/nrn-ci-deps`)

0 commit comments

Comments
 (0)