forked from duckdb/duckdb
-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (93 loc) · 2.96 KB
/
R_CMD_CHECK.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
on:
workflow_dispatch:
repository_dispatch:
push:
branches:
- '**'
- '!main'
- '!feature'
paths-ignore:
- '**.md'
- 'examples/**'
- 'test/**'
- 'tools/**'
- '!tools/swift/**'
- '.github/patches/duckdb-wasm/**'
- '.github/workflows/**'
- '!.github/workflows/R_CMD_CHECK.yml'
pull_request:
types: [ opened, reopened, ready_for_review ]
paths-ignore:
- '**.md'
- 'tools/**'
- '.github/patches/duckdb-wasm/**'
- '.github/workflows/**'
- '!.github/workflows/R_CMD_CHECK.yml'
name: R-CMD-check
env:
DUCKDB_R_REPO: 'duckdb/duckdb-r'
TARGET_REF: 'main'
DUCKDB_R_REF: '0ed106a71c6e54a509e693a71aba49145c0a3a0f'
DUCKDB_R_SRC: 'duckdb-r'
DUCKDB_SRC: 'duckdb'
GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: true
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
env:
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.DUCKDB_SRC }}
- uses: actions/checkout@v4
with:
repository: ${{ env.DUCKDB_R_REPO }}
path: ${{ env.DUCKDB_R_SRC }}
ref: ${{ env.DUCKDB_R_REF }}
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: ${{ env.DUCKDB_R_SRC }}
extra-packages: any::rcmdcheck
needs: check
- name: Apply duckdb-r patches
shell: bash
working-directory: ${{ env.DUCKDB_R_SRC }}
run: |
shopt -s nullglob
for filename in $GITHUB_WORKSPACE/$DUCKDB_SRC/.github/patches/duckdb-r/*.patch; do
git apply $filename
done
# needed so we can run git commit in vendor.sh
- name: setup github and create parallel builds
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "mr. duck"
mkdir -p ~/.R
echo 'MAKEFLAGS = -j2' >> ~/.R/Makevars
# error is from git_dev_version() but does not affect this workflow
- name: update duckdb-r src code with PR code
shell: bash
working-directory: ${{ env.DUCKDB_R_SRC }}
env:
DUCKDB_PATH: ${{ env.DUCKDB_SRC }}
run: ./vendor.sh
- uses: r-lib/actions/check-r-package@v2
with:
# Fails on R 3.6 on Windows, remove when this job is removed?
args: 'c("--no-tests", "--no-manual", "--as-cran", "--no-multiarch")'
working-directory: ${{ env.DUCKDB_R_SRC }}