2222jobs :
2323 macos-cran :
2424 name : " macOS similar to CRAN"
25- runs-on : macOS-14
25+ runs-on : macOS-latest
2626 strategy :
2727 fail-fast : false
2828
@@ -80,3 +80,114 @@ jobs:
8080 name : test-output
8181 path : arrow-tests/testthat.Rout*
8282 if : always()
83+
84+
85+ # R-universe style build and check (macOS only)
86+ # Adapted from https://github.com/r-universe-org/workflows/blob/v3/.github/workflows/build.yml
87+ r-universe-source :
88+ name : " R-universe: Build source package"
89+ runs-on : ubuntu-latest
90+ timeout-minutes : 90
91+ outputs :
92+ sourcepkg : {{ "${{ steps.build.outputs.sourcepkg }}" }}
93+ package : {{ "${{ steps.build.outputs.package }}" }}
94+ version : {{ "${{ steps.build.outputs.version }}" }}
95+ steps :
96+ {{ macros.github_checkout_arrow()|indent }}
97+
98+ - name : Setup R
99+ uses : r-lib/actions/setup-r@v2
100+ with :
101+ use-public-rspm : true
102+
103+ - name : Build source package
104+ id : build
105+ run : |
106+ cd arrow/r
107+ PACKAGE=$(grep '^Package:' DESCRIPTION | cut -d' ' -f2)
108+ VERSION=$(grep '^Version:' DESCRIPTION | cut -d' ' -f2)
109+ echo "package=${PACKAGE}" >> $GITHUB_OUTPUT
110+ echo "version=${VERSION}" >> $GITHUB_OUTPUT
111+ R CMD build .
112+ SOURCEPKG="${PACKAGE}_${VERSION}.tar.gz"
113+ echo "sourcepkg=${SOURCEPKG}" >> $GITHUB_OUTPUT
114+ mv ${SOURCEPKG} ../
115+
116+ - name : Upload source package
117+ uses : actions/upload-artifact@v4
118+ with :
119+ name : r-universe-source
120+ path : arrow/${{ "${{ steps.build.outputs.sourcepkg }}" }}
121+
122+ r-universe-macos :
123+ needs : [r-universe-source]
124+ if : {{ "${{ !cancelled() && needs.r-universe-source.outputs.sourcepkg }}" }}
125+ runs-on : macos-{{ "${{ matrix.arch == 'x86_64' && '15-intel' || '15' }}" }}
126+ timeout-minutes : 120
127+ name : " R-universe: R-${{ " ${{ matrix.r }}" }} macOS ${{ "${{ matrix.arch }}" }}"
128+ strategy :
129+ fail-fast : false
130+ matrix :
131+ r : [ 'devel', 'release' ]
132+ arch : [ 'x86_64', 'arm64' ]
133+ steps :
134+ - name : Download source package
135+ uses : actions/download-artifact@v4
136+ with :
137+ name : r-universe-source
138+
139+ - name : " Prepare macOS system"
140+ timeout-minutes : 10
141+ uses : r-universe-org/actions/macos-prep@v11
142+ with :
143+ version : {{ "${{ matrix.r }}" }}
144+ fortran : ' true'
145+
146+ - name : Install R-${{ "${{ matrix.r }}" }} for macOS
147+ timeout-minutes : 10
148+ uses : r-universe-org/actions/setup-r@v11
149+ id : install-r
150+ with :
151+ r-version : {{ "${{ matrix.r }}" }}
152+
153+ - name : " Get dependencies"
154+ id : deps
155+ uses : r-universe-org/actions/macos-deps@v11
156+ timeout-minutes : 60
157+ env :
158+ GITHUB_PAT : {{ "${{ secrets.GITHUB_TOKEN }}" }}
159+ with :
160+ sourcepkg : {{ "${{ needs.r-universe-source.outputs.sourcepkg }}" }}
161+
162+ - name : Build package "${{ "${{ needs.r-universe-source.outputs.package }}" }}"
163+ uses : r-universe-org/actions/macos-build@v11
164+ timeout-minutes : 90
165+ env :
166+ GITHUB_PAT : {{ "${{ secrets.GITHUB_TOKEN }}" }}
167+ with :
168+ sourcepkg : {{ "${{ needs.r-universe-source.outputs.sourcepkg }}" }}
169+
170+ - name : " R CMD check"
171+ uses : r-universe-org/actions/macos-check@v11
172+ id : check
173+ timeout-minutes : 60
174+ env :
175+ GITHUB_PAT : {{ "${{ secrets.GITHUB_TOKEN }}" }}
176+ with :
177+ sourcepkg : {{ "${{ needs.r-universe-source.outputs.sourcepkg }}" }}
178+
179+ - name : " Store binaries"
180+ id : artifact
181+ uses : r-universe-org/actions/store-package@v11
182+ if : {{ "${{ always() && steps.check.outputs.binarypkg }}" }}
183+ with :
184+ name : package-macos-{{ "${{ matrix.r }}" }}-{{ "${{ matrix.arch }}" }}
185+ JOB_STATUS : {{ "${{ job.status }}" }}
186+ DISTRO : macos
187+ FILE : {{ "${{ steps.check.outputs.binarypkg }}" }}
188+ CHECKSTATUS : {{ "${{ steps.check.outputs.checkstatus }}" }}
189+ TARGET : macos
190+
191+ - name : " Summary: macos-${{ " ${{ matrix.r }}" }}-${{ "${{ matrix.arch }}" }}: ${{ "${{ steps.deps.outputs.rversion }}" }}: ${{ "${{ steps.check.outputs.checkstatus || 'FAIL' }}" }}"
192+ run : echo "Artifact URL ${{ "${{ steps.artifact.outputs.artifact-url }}" }}"
193+ if : always()
0 commit comments