Skip to content

Commit 5b7dd9c

Browse files
committed
Publish main release instead of nightly
1 parent 3144837 commit 5b7dd9c

4 files changed

Lines changed: 55 additions & 45 deletions

File tree

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
name: Nightly Open MPI Extensions
1+
name: Main Open MPI Extensions
22

33
on:
44
workflow_dispatch:
5-
schedule:
6-
- cron: "37 2 * * *"
5+
pull_request:
6+
branches:
7+
- main
78
push:
89
branches:
910
- main
@@ -140,8 +141,11 @@ jobs:
140141
if: always()
141142
run: ccache -s
142143

143-
publish-nightly:
144-
name: Publish nightly pre-release
144+
publish-main:
145+
name: Publish main pre-release
146+
if: >-
147+
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
148+
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
145149
needs: build
146150
runs-on: ubuntu-24.04
147151

@@ -155,33 +159,33 @@ jobs:
155159
path: _release_assets
156160
merge-multiple: true
157161

158-
- name: Replace nightly release assets
162+
- name: Replace main release assets
159163
env:
160164
GH_TOKEN: ${{ github.token }}
161165
run: |
162166
set -euo pipefail
163167
test -n "$(find _release_assets -maxdepth 1 -type f -print -quit)"
164168
165-
git tag -f nightly "$GITHUB_SHA"
166-
git push origin refs/tags/nightly --force
169+
git tag -f main "$GITHUB_SHA"
170+
git push origin refs/tags/main --force
167171
168-
notes="Moving nightly Open MPI binary packages for parallel_programming_course. This release is replaced by every scheduled or manual run."
169-
if gh release view nightly >/dev/null 2>&1; then
170-
gh release edit nightly \
171-
--title "Nightly Open MPI Extensions" \
172+
notes="Moving main-branch Open MPI binary packages for parallel_programming_course. This release is replaced after every successful main build."
173+
if gh release view main >/dev/null 2>&1; then
174+
gh release edit main \
175+
--title "Main Open MPI Extensions" \
172176
--notes "$notes" \
173177
--prerelease \
174178
--latest=false
175-
mapfile -t old_assets < <(gh release view nightly --json assets --jq '.assets[].name')
179+
mapfile -t old_assets < <(gh release view main --json assets --jq '.assets[].name')
176180
for asset in "${old_assets[@]}"; do
177-
gh release delete-asset nightly "$asset" -y
181+
gh release delete-asset main "$asset" -y
178182
done
179183
else
180-
gh release create nightly \
181-
--title "Nightly Open MPI Extensions" \
184+
gh release create main \
185+
--title "Main Open MPI Extensions" \
182186
--notes "$notes" \
183187
--prerelease \
184188
--latest=false
185189
fi
186190
187-
gh release upload nightly _release_assets/* --clobber
191+
gh release upload main _release_assets/* --clobber

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ The packages are built from pinned git submodules and are intended for rootless
66
CI use: download, extract, and pass the unpacked package prefix to the course
77
CMake configure step.
88

9-
This repository publishes only one public binary channel: the moving `nightly`
10-
pre-release named `Nightly Open MPI Extensions`. Stable versioned releases are
11-
not supported here.
9+
This repository publishes only one public binary channel: the moving `main`
10+
pre-release named `Main Open MPI Extensions`. It is replaced only after
11+
successful builds from the `main` branch. Stable versioned releases and
12+
scheduled nightly releases are not supported here.
1213

1314
## Source Pins
1415

@@ -35,9 +36,9 @@ MPI and Sandia OpenSHMEM/SOS for SHMEM. SOS is built against the package's Open
3536
MPI PMIx/hwloc install and libfabric/OFI, then packaged with the needed runtime
3637
libraries for rootless CI use.
3738

38-
## Nightly assets
39+
## Main Assets
3940

40-
The workflow publishes these archive assets to the `nightly` pre-release:
41+
The workflow publishes these archive assets to the `main` pre-release:
4142

4243
- `mpi-extensions-openmpi-v5.0.10-linux-x86_64.tar.gz`
4344
- `mpi-extensions-openmpi-v5.0.10-macos-arm64.tar.gz`
@@ -50,18 +51,18 @@ Each archive is uploaded with:
5051
Archives unpack under a single top-level directory and contain `bin/`, `lib/`,
5152
`include/`, `share/`, `manifest.json`, and `LICENSES/`.
5253

53-
## Install from the nightly release
54+
## Install From The Main Release
5455

5556
For local use from this repository:
5657

5758
```bash
58-
./scripts/install_from_nightly_release.py \
59+
./scripts/install_from_main_release.py \
5960
--repo learning-process/mpi-extensions \
6061
--platform auto \
6162
--prefix "$PWD/_deps/mpi-extensions-openmpi"
6263
```
6364

64-
The installer downloads only the `nightly` pre-release, verifies the SHA256
65+
The installer downloads only the `main` pre-release, verifies the SHA256
6566
checksum, extracts into the requested prefix, and prints environment values for
6667
manual debugging.
6768

@@ -70,7 +71,7 @@ installer script directly from this repository:
7071

7172
```bash
7273
curl -fsSL \
73-
https://raw.githubusercontent.com/learning-process/mpi-extensions/main/scripts/install_from_nightly_release.py \
74+
https://raw.githubusercontent.com/learning-process/mpi-extensions/main/scripts/install_from_main_release.py \
7475
-o /tmp/install_mpi_extensions.py
7576
python3 /tmp/install_mpi_extensions.py \
7677
--repo learning-process/mpi-extensions \
@@ -178,11 +179,12 @@ a stable tag or explicit commit, never a floating branch.
178179

179180
## Workflow
180181

181-
`.github/workflows/nightly-openmpi.yml` supports:
182+
`.github/workflows/main-openmpi.yml` supports:
182183

183184
- `workflow_dispatch`
184-
- nightly schedule at `02:37 UTC`
185+
- pull request validation targeting `main`
185186
- push builds on `main`
186187

187-
Pushes to `main`, scheduled runs, and manual runs replace the assets in the same
188-
`nightly` pre-release after successful builds.
188+
Pull requests build and validate packages but do not publish. Pushes to `main`
189+
replace the assets in the same `main` pre-release after successful builds. A
190+
manual run from the `main` branch follows the same publish path.

docs/parallel_programming_course_integration.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ supplier only. Do not install Homebrew or apt Open MPI in the course CI job.
55

66
## GitHub Actions usage
77

8-
Install the current nightly package before configuring the course build:
8+
Install the current `main` pre-release package before configuring the course
9+
build:
910

1011
```bash
1112
curl -fsSL \
12-
https://raw.githubusercontent.com/learning-process/mpi-extensions/main/scripts/install_from_nightly_release.py \
13+
https://raw.githubusercontent.com/learning-process/mpi-extensions/main/scripts/install_from_main_release.py \
1314
-o /tmp/install_mpi_extensions.py
1415
python3 /tmp/install_mpi_extensions.py \
1516
--repo learning-process/mpi-extensions \
@@ -37,8 +38,9 @@ packages provide MPI through Open MPI and SHMEM through Sandia OpenSHMEM/SOS
3738
built against the same Open MPI PMIx/hwloc prefix and libfabric/OFI. macOS
3839
packages are also validated with two-rank MPI and SHMEM C smoke tests.
3940

40-
## Nightly channel
41+
## Main Channel
4142

42-
Only the `nightly` pre-release is public. Scheduled and manual workflow runs
43-
replace assets in that same release, including the archive, SHA256 checksum,
44-
and JSON manifest for every platform.
43+
Only the moving `main` pre-release is public. Pull requests validate package
44+
builds but do not publish. Successful builds from the `main` branch replace
45+
assets in that same release, including the archive, SHA256 checksum, and JSON
46+
manifest for every platform.
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
"""Install the current nightly Open MPI package from GitHub Releases."""
2+
"""Install the current main Open MPI package from GitHub Releases."""
33

44
from __future__ import annotations
55

@@ -13,6 +13,8 @@
1313
import tempfile
1414
from pathlib import Path, PurePosixPath
1515

16+
RELEASE_TAG = "main"
17+
1618
try:
1719
import requests
1820
except ImportError as exc: # pragma: no cover - depends on caller environment
@@ -83,7 +85,7 @@ def github_session() -> requests.Session:
8385
{
8486
"Accept": "application/vnd.github+json",
8587
"X-GitHub-Api-Version": "2022-11-28",
86-
"User-Agent": "mpi-extensions-nightly-installer",
88+
"User-Agent": "mpi-extensions-main-installer",
8789
}
8890
)
8991
token = os.environ.get("GITHUB_TOKEN")
@@ -95,7 +97,7 @@ def github_session() -> requests.Session:
9597
def request_json(session: requests.Session, url: str) -> dict[str, object]:
9698
response = session.get(url, timeout=60)
9799
if response.status_code == 404:
98-
die(f"nightly pre-release not found at {url}")
100+
die(f"main pre-release not found at {url}")
99101
response.raise_for_status()
100102
return response.json()
101103

@@ -154,14 +156,14 @@ def validate_archive_link(
154156

155157

156158
def select_assets(release: dict[str, object], platform: str) -> tuple[dict[str, object], dict[str, object], dict[str, object]]:
157-
if release.get("tag_name") != "nightly":
158-
die("release tag is not nightly")
159+
if release.get("tag_name") != RELEASE_TAG:
160+
die(f"release tag is not {RELEASE_TAG}")
159161
if not release.get("prerelease", False):
160-
die("nightly release is not marked as a prerelease")
162+
die("main release is not marked as a prerelease")
161163

162164
assets = release.get("assets")
163165
if not isinstance(assets, list):
164-
die("nightly release metadata does not contain assets")
166+
die("main release metadata does not contain assets")
165167

166168
archive = None
167169
for asset in assets:
@@ -170,7 +172,7 @@ def select_assets(release: dict[str, object], platform: str) -> tuple[dict[str,
170172
archive = asset
171173
break
172174
if archive is None:
173-
die(f"no nightly archive asset found for platform {platform}")
175+
die(f"no main archive asset found for platform {platform}")
174176

175177
by_name = {str(asset.get("name", "")): asset for asset in assets}
176178
checksum = by_name.get(f"{archive['name']}.sha256")
@@ -230,7 +232,7 @@ def main() -> int:
230232
platform = detect_platform() if args.platform == "auto" else args.platform
231233
prefix = Path(args.prefix).expanduser().resolve()
232234
session = github_session()
233-
release_url = f"https://api.github.com/repos/{args.repo}/releases/tags/nightly"
235+
release_url = f"https://api.github.com/repos/{args.repo}/releases/tags/{RELEASE_TAG}"
234236
release = request_json(session, release_url)
235237
archive_asset, checksum_asset, manifest_asset = select_assets(release, platform)
236238

0 commit comments

Comments
 (0)