Skip to content

Windows ARM in CI

Windows ARM in CI #366

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, winarm]
pull_request:
branches: [main, master]
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
#- {os: macos-latest, r: 'devel'}
#- {os: macos-latest, r: 'release'}
#- {os: macos-latest, r: 'oldrel'}
#- {os: windows-latest, r: 'devel'}
#- {os: windows-latest, r: 'release'}
- {os: windows-11-arm, r: 'release'}
#- {os: windows-latest, r: 'oldrel'}
#- {os: ubuntu-24.04-arm, r: 'devel'}
#- {os: ubuntu-latest, r: 'devel'}
#- {os: ubuntu-latest, r: 'release'}
#- {os: ubuntu-latest, r: 'oldrel'}
#- {os: ubuntu-latest, r: '4.1'}
#- {os: ubuntu-latest, r: '4.0'}
#- {os: ubuntu-latest, r: '3.6'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
MAKEFLAGS: -j4
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
if: matrix.config.os != 'windows-11-arm'
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
- name: Install R & RTools (ARM64)
if: matrix.config.os == 'windows-11-arm'
run: |
$url = "https://www.r-project.org/nosvn/winutf8/aarch64/R-4-signed/R-4.5.0-aarch64.exe"
Invoke-WebRequest -Uri "$url" -OutFile R-4.5.0-aarch64.exe -UseBasicParsing -UserAgent "NativeHost"
Start-Process -FilePath R-4.5.0-aarch64.exe -ArgumentList "/install /norestart /verysilent /SUPPRESSMSGBOXES" -NoNewWindow -Wait
# Installation will hang if the toolchain is already installed
if (-Not $(Test-Path -Path "C:/rtools45-aarch64")) {
Invoke-WebRequest `
-Uri https://github.com/r-hub/rtools45/releases/download/latest/rtools45-aarch64.exe `
-OutFile "rtools45-aarch64.exe"
Start-Process -FilePath "rtools45-aarch64.exe" -ArgumentList "/INSTALL /VERYSILENT /SUPPRESSMSGBOXES" -Wait
}
echo "C:/rtools45-aarch64/usr/bin;C:/rtools45-aarch64/aarch64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install dependencies & Check Package (ARM64)
if: matrix.config.os == 'windows-11-arm'
run: |
C:\Program Files\R-aarch64\R-4.5.0\bin\Rscript.exe -e " `
install.packages(c('tinytest', 'rmarkdown', 'knitr', 'rcmdcheck'), repos = c(CRAN = 'https://cran.rstudio.com')); `
rcmdcheck::rcmdcheck(args = c('--no-manual', '--as-cran')) `
"
- uses: r-lib/actions/setup-r-dependencies@v2
if: matrix.config.os != 'windows-11-arm'
with:
extra-packages: |
any::rcmdcheck
needs: check
- uses: r-lib/actions/check-r-package@v2
if: matrix.config.os != 'windows-11-arm'
with:
upload-snapshots: true
check-dir: '"check"'