Skip to content

Commit 99abe9b

Browse files
committed
GH-48461: [R][CI] Migrate Azure pipelines to GitHub actions
1 parent aeb6486 commit 99abe9b

File tree

1 file changed

+173
-0
lines changed

1 file changed

+173
-0
lines changed

.github/workflows/r_extra.yml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: R Extra
19+
20+
on:
21+
push:
22+
branches:
23+
- '**'
24+
- '!dependabot/**'
25+
paths:
26+
- '.dockerignore'
27+
- '.github/workflows/check_labels.yml'
28+
- '.github/workflows/r_extra.yml'
29+
- '.github/workflows/report_ci.yml'
30+
- "ci/docker/**"
31+
- "ci/etc/rprofile"
32+
- "ci/scripts/PKGBUILD"
33+
- "ci/scripts/cpp_*.sh"
34+
- "ci/scripts/install_minio.sh"
35+
- "ci/scripts/r_*.sh"
36+
- "cpp/**"
37+
- "compose.yaml"
38+
- "r/**"
39+
tags:
40+
- '**'
41+
pull_request:
42+
paths:
43+
- '.dockerignore'
44+
- '.github/workflows/check_labels.yml'
45+
- '.github/workflows/r_extra.yml'
46+
- '.github/workflows/report_ci.yml'
47+
- "ci/docker/**"
48+
- "ci/etc/rprofile"
49+
- "ci/scripts/PKGBUILD"
50+
- "ci/scripts/cpp_*.sh"
51+
- "ci/scripts/install_minio.sh"
52+
- "ci/scripts/r_*.sh"
53+
- "cpp/**"
54+
- "compose.yaml"
55+
- "r/**"
56+
types:
57+
- labeled
58+
- opened
59+
- reopened
60+
- synchronize
61+
schedule:
62+
- cron: |
63+
0 4 * * *
64+
65+
concurrency:
66+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
67+
cancel-in-progress: true
68+
69+
permissions:
70+
contents: read
71+
72+
jobs:
73+
check-labels:
74+
if: github.event_name != 'schedule' || github.repository == 'apache/arrow'
75+
uses: ./.github/workflows/check_labels.yml
76+
secrets: inherit
77+
with:
78+
parent-workflow: cpp_extra
79+
80+
docker:
81+
needs: check-labels
82+
name: ${{ matrix.title }}
83+
runs-on: ${{ matrix.runs-on }}
84+
if: >-
85+
needs.check-labels.outputs.force == 'true' ||
86+
contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
87+
contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: R')
88+
timeout-minutes: 75
89+
strategy:
90+
fail-fast: false
91+
matrix:
92+
include:
93+
- envs:
94+
ARROW_R_DEV: "TRUE"
95+
R_ORG: rocker
96+
R_IMAGE: r-ver
97+
R_TAG: latest
98+
image: r
99+
runs-on: ubuntu-latest
100+
run-options: >-
101+
-e ARROW_DEPENDENCY_SOURCE=BUNDLED
102+
title: Rocker R-ver Latest - Bundled Dependencies
103+
env:
104+
ARCHERY_DEBUG: 1
105+
ARROW_ENABLE_TIMING_TESTS: OFF
106+
DOCKER_VOLUME_PREFIX: ".docker/"
107+
steps:
108+
- name: Checkout Arrow
109+
uses: actions/checkout@v6
110+
with:
111+
fetch-depth: 0
112+
submodules: recursive
113+
- name: Cache Docker Volumes
114+
uses: actions/cache@v5
115+
with:
116+
path: .docker
117+
key: extra-${{ matrix.image }}-${{ hashFiles('cpp/**') }}
118+
restore-keys: extra-${{ matrix.image }}-
119+
- name: Setup Python
120+
uses: actions/setup-python@v6
121+
with:
122+
python-version: 3
123+
- name: Setup Archery
124+
run: python3 -m pip install -e dev/archery[docker]
125+
- name: Execute Docker Build
126+
continue-on-error: ${{ matrix.continue-on-error || false }}
127+
env:
128+
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
129+
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
130+
ENVS: ${{ toJSON(matrix.envs) }}
131+
run: |
132+
# GH-40558: reduce ASLR to avoid ASAN/LSAN crashes
133+
sudo sysctl -w vm.mmap_rnd_bits=28
134+
source ci/scripts/util_enable_core_dumps.sh
135+
if [ "${ENVS}" != "null" ]; then
136+
echo "${ENVS}" | jq -r '.[]' | while read env; do
137+
echo "${env}" >> .env
138+
done
139+
fi
140+
archery docker run ${{ matrix.run-options || '' }} ${{ matrix.image }}
141+
- name: Docker Push
142+
if: >-
143+
success() &&
144+
github.event_name == 'push' &&
145+
github.repository == 'apache/arrow' &&
146+
github.ref_name == 'main'
147+
env:
148+
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
149+
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
150+
continue-on-error: true
151+
run: archery docker push ${{ matrix.image }}
152+
- name: Dump install logs
153+
run: cat arrow/r/check/arrow.Rcheck/00install.out
154+
if: always()
155+
continue-on-error: true
156+
- name: Dump test logs
157+
run: cat arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
158+
if: always()
159+
continue-on-error: true
160+
- name: Save the test output
161+
if: always()
162+
uses: actions/upload-artifact@v4
163+
with:
164+
name: test-output-{{ "${{ matrix.config.r_image }}" }}
165+
path: arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
166+
continue-on-error: true
167+
168+
report-extra-cpp:
169+
if: github.event_name == 'schedule' && always()
170+
needs:
171+
- docker
172+
uses: ./.github/workflows/report_ci.yml
173+
secrets: inherit

0 commit comments

Comments
 (0)