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,110 @@ 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+ make build .
112+ SOURCEPKG="${PACKAGE}_${VERSION}.tar.gz"
113+ echo "sourcepkg=${SOURCEPKG}" >> $GITHUB_OUTPUT
114+
115+ - name : Upload source package
116+ uses : actions/upload-artifact@v4
117+ with :
118+ name : package-source
119+ path : arrow/r/{{ "${{ steps.build.outputs.sourcepkg }}" }}
120+
121+ r-universe-macos :
122+ needs : [r-universe-source]
123+ if : {{ "${{ !cancelled() && needs.r-universe-source.outputs.sourcepkg }}" }}
124+ runs-on : macos-{{ "${{ matrix.arch == 'x86_64' && '15-intel' || '15' }}" }}
125+ timeout-minutes : 120
126+ name : " R-universe: R-${{ " ${{ matrix.r }}" }} macOS ${{ "${{ matrix.arch }}" }}"
127+ strategy :
128+ fail-fast : false
129+ matrix :
130+ r : [ 'devel', 'release' ]
131+ arch : [ 'x86_64', 'arm64' ]
132+ steps :
133+ # r-universe actions internally download 'package-source' artifact
134+
135+ - name : " Prepare macOS system"
136+ timeout-minutes : 10
137+ uses : r-universe-org/actions/macos-prep@v11
138+ with :
139+ version : {{ "${{ matrix.r }}" }}
140+ fortran : ' true'
141+
142+ - name : Install R-${{ "${{ matrix.r }}" }} for macOS
143+ timeout-minutes : 10
144+ uses : r-universe-org/actions/setup-r@v11
145+ id : install-r
146+ with :
147+ r-version : {{ "${{ matrix.r }}" }}
148+
149+ - name : " Get dependencies"
150+ id : deps
151+ uses : r-universe-org/actions/macos-deps@v11
152+ timeout-minutes : 60
153+ env :
154+ GITHUB_PAT : {{ "${{ secrets.GITHUB_TOKEN }}" }}
155+ with :
156+ sourcepkg : {{ "${{ needs.r-universe-source.outputs.sourcepkg }}" }}
157+
158+ - name : Build package "${{ "${{ needs.r-universe-source.outputs.package }}" }}"
159+ uses : r-universe-org/actions/macos-build@v11
160+ timeout-minutes : 90
161+ env :
162+ GITHUB_PAT : {{ "${{ secrets.GITHUB_TOKEN }}" }}
163+ with :
164+ sourcepkg : {{ "${{ needs.r-universe-source.outputs.sourcepkg }}" }}
165+
166+ - name : " R CMD check"
167+ uses : r-universe-org/actions/macos-check@v11
168+ id : check
169+ timeout-minutes : 60
170+ env :
171+ GITHUB_PAT : {{ "${{ secrets.GITHUB_TOKEN }}" }}
172+ with :
173+ sourcepkg : {{ "${{ needs.r-universe-source.outputs.sourcepkg }}" }}
174+
175+ - name : " Store binaries"
176+ id : artifact
177+ uses : r-universe-org/actions/store-package@v11
178+ if : {{ "${{ always() && steps.check.outputs.binarypkg }}" }}
179+ with :
180+ name : package-macos-{{ "${{ matrix.r }}" }}-{{ "${{ matrix.arch }}" }}
181+ JOB_STATUS : {{ "${{ job.status }}" }}
182+ DISTRO : macos
183+ FILE : {{ "${{ steps.check.outputs.binarypkg }}" }}
184+ CHECKSTATUS : {{ "${{ steps.check.outputs.checkstatus }}" }}
185+ TARGET : macos
186+
187+ - name : " Summary: macos-${{ " ${{ matrix.r }}" }}-${{ "${{ matrix.arch }}" }}: ${{ "${{ steps.deps.outputs.rversion }}" }}: ${{ "${{ steps.check.outputs.checkstatus || 'FAIL' }}" }}"
188+ run : echo "Artifact URL ${{ "${{ steps.artifact.outputs.artifact-url }}" }}"
189+ if : always()
0 commit comments