Matrix macOS ARM64 binary releases for R 4.3/4.4/4.5 with versioned asset naming#14
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Update macOS ARM64 binary build workflow for multiple R versions
Matrix macOS ARM64 binary releases for R 4.3/4.4/4.5 with versioned asset naming
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The macOS ARM64 binary workflow only produced a single R 4.4 artifact (
Hotgenes_X.X.X.tgz), which is incompatible with downstream publishing that expects per-R-version assets. This updates the workflow to build and publish binaries for R 4.3, 4.4, and 4.5 using the required naming convention.Workflow matrix
build-macos-arm64into a matrix job overr-version: ["4.3", "4.4", "4.5"].Artifact naming contract
R CMD INSTALL --build ., the generated.tgzis renamed to:Hotgenes_{package_version}_R{r-version}_macOS-arm64.tgzBINARYandPKG_VERSIONvia$GITHUB_ENVfor subsequent release steps.Release coordination across matrix jobs
4.4job.4.3and4.5jobs wait for the release to exist, then upload their matrix-specific artifact.gh release upload ... --clobberto avoid duplicate-name collisions on reruns.Original prompt
Context
Open-Hotgenesis a public R package (pfizer-opensource/Open-Hotgenes) with a macOS ARM64 binary build workflow. The current workflow only builds for R 4.4 and produces assets namedHotgenes_X.X.X.tgz.A companion publishing script (
publish_binaries.R) will be added separately and it expects assets named with the pattern:Hotgenes_{version}_R{rv}_macOS-arm64.tgzfor each R version (4.3, 4.4, 4.5).Change —
.github/workflows/build-macos-arm64-binary.ymlCurrent workflow issues:
4.4(hardcoded insetup-r)Hotgenes_X.X.X.tgz— no R version or platform in the nameRequired changes:
Add a matrix strategy for
r-version: ["4.3", "4.4", "4.5"]After
R CMD INSTALL --build ., rename the asset to include the R version and platform before uploading:Handle the GitHub Release creation cleanly across matrix jobs. Recommended approach:
gh release createonly from the4.4matrix job (withif: matrix.r-version == '4.4')gh release uploadfor the4.3and4.5jobs, but ensure the release exists first (add a small retry/wait or usegh release create --skip-if-existsif available, or usegh release create ... || true+gh release upload)gh release createstep with|| gh release uploadfallback for all matrix jobsPick whichever approach is most reliable and clean.
The rest of the workflow steps (checkout, setup-r, setup-r-dependencies, build) remain unchanged per matrix job — just wrapped in the matrix.
The workflow uses
secrets.ACTION_TOKENfor bothGITHUB_PATandGH_TOKEN— keep that unchanged.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: que tal con este PR?
Assistant: Aquí está el resumen del PR #21:
🥜 En pocas palabras
Este PR agrega un script en R para publicar binarios de macOS ARM64 de
css-DataFerryen múltiples versiones de R (4.3, 4.4 y 4.5) en el CRAN local de BioMarks. También actualiza la documentación para indicar qué versiones de R tienen binarios disponibles para macOS ARM64.📋 Resumen
Cambios en detalle
css-repo/dev_scripts/publish_binaries.R(nuevo archivo)css-DataFerrydownload_binary_to_biomarks()para registrar cada binario en el CRAN localif (FALSE)para evitar ejecución accidental al hacersource()css-repo/index.Rmd(modificado)¿Quieres que…?
download_binary_to_biomarks()y cómo encaja este script con el resto del repoUser: es compatible con esto: @pfizer-rd/css-DataFerry/files/BuildSupport/BuildME.R
Assistant: ## Análisis de compatibilidad: PR #21 vs
BuildME.RHay incompatibilidades importantes entre el nuevo script de PR #21 y el flujo actual en
BuildME.R. Aquí el detalle:❌ 1. Naming del asset — incompatible
BuildME.R(actual)DataFerry_{pkg_version}.tgzpublish_binaries.R)DataFerry_{pkg_version}_R{rv}_macOS-arm64.tgzSi el workflow de GitHub Actions (
build-macos-arm64-binary.yml) sigue produciendo assets con el nombre antiguo (DataFerry_X.X.X.tgz), el nuevo script no encontrará los archivos y fallará en la descarga.❌ 2. Versión de R — hardcodeada vs multi-versión
BuildME.R"4.4"(hardcodeado)This pull request was created from Copilot chat.