Skip to content

Commit 9543483

Browse files
committed
feat: Add windows specific build workflow
1 parent 229b09f commit 9543483

2 files changed

Lines changed: 71 additions & 3 deletions

File tree

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2-
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
32
on:
43
push:
54
branches: [main, master, dev]
65
pull_request:
76

8-
name: R-CMD-check.yaml
7+
name: R-CMD-check (Unix)
98

109
permissions: read-all
1110

@@ -20,7 +19,6 @@ jobs:
2019
matrix:
2120
config:
2221
- { os: macos-latest, r: "release" }
23-
- { os: windows-latest, r: "release" }
2422
- { os: ubuntu-latest, r: "devel", http-user-agent: "release" }
2523
- { os: ubuntu-latest, r: "release" }
2624
- { os: ubuntu-latest, r: "oldrel-1" }
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Workflow optimized for Windows I/O performance
2+
# Insights from: https://chadgolden.com/blog/github-actions-hosted-windows-runners-slower-than-expected-ci-and-you
3+
on:
4+
push:
5+
branches: [main, master, dev]
6+
pull_request:
7+
8+
name: R-CMD-check (Windows)
9+
10+
permissions: read-all
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: windows-latest
15+
16+
name: windows-latest (release)
17+
18+
env:
19+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
20+
R_KEEP_PKG_SOURCE: yes
21+
# Move R library and temp files to the faster Dev Drive (mounted as R: below)
22+
R_LIBS_USER: R:\R\library
23+
TMP: R:\temp
24+
TEMP: R:\temp
25+
26+
steps:
27+
- name: Setup Dev Drive
28+
uses: samypr100/setup-dev-drive@v3
29+
with:
30+
drive-letter: "R"
31+
size: "10GB"
32+
33+
- name: Create directories on Dev Drive
34+
run: |
35+
mkdir R:\R\library -Force
36+
mkdir R:\temp -Force
37+
shell: pwsh
38+
39+
- uses: actions/checkout@v4
40+
with:
41+
# Checkout directly into the Dev Drive
42+
path: 'R:\repo'
43+
44+
# Update workspace to point to the Dev Drive
45+
# This ensures subsequent steps run in the faster storage
46+
- name: Change workspace
47+
run: |
48+
echo "GITHUB_WORKSPACE=R:\repo" >> $env:GITHUB_ENV
49+
shell: pwsh
50+
51+
- uses: r-lib/actions/setup-pandoc@v2
52+
53+
- uses: r-lib/actions/setup-r@v2
54+
with:
55+
r-version: "release"
56+
use-public-rspm: true
57+
58+
- uses: r-lib/actions/setup-r-dependencies@v2
59+
with:
60+
extra-packages: any::rcmdcheck
61+
needs: check
62+
# Ensure working directory is correctly set for the action
63+
working-directory: R:\repo
64+
65+
- name: Run R CMD check
66+
uses: r-lib/actions/check-r-package@v2
67+
with:
68+
upload-snapshots: true
69+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
70+
working-directory: R:\repo

0 commit comments

Comments
 (0)