Skip to content

Commit 43f5de2

Browse files
authored
ci: test bin lib on arm64 linux (#334)
1 parent 704b8de commit 43f5de2

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

.github/workflows/release-lib.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,17 @@ jobs:
7474
if: runner.os != 'Windows'
7575
uses: r-lib/actions/setup-r@v2
7676
with:
77-
use-public-rspm: true
77+
# TODO: `true` after rspm supports arm linux <https://github.com/r-lib/actions/issues/960>
78+
use-public-rspm: ${{ matrix.os != 'ubuntu-22.04-arm' }}
7879
Ncpus: 2
7980

81+
- uses: r-lib/actions/setup-r-dependencies@v2
82+
if: runner.os != 'Windows'
83+
with:
84+
# TODO: uncomment after <https://github.com/r-lib/actions/pull/961>
85+
# dependencies: 'FALSE'
86+
extra-packages: any::pkgload
87+
8088
- name: build lib
8189
env:
8290
NOT_CRAN: "true"
@@ -92,7 +100,6 @@ jobs:
92100
if [[ "${{ runner.os }}" != "Windows" ]]; then
93101
# Rinternals header is needed
94102
pushd ..
95-
Rscript -e 'install.packages("pkgbuild")'
96103
Rscript -e 'pkgbuild::compile_dll()'
97104
popd
98105
else
@@ -130,6 +137,8 @@ jobs:
130137
include:
131138
- os: macos-13
132139
r: release
140+
- os: ubuntu-22.04-arm
141+
r: release
133142

134143
permissions:
135144
contents: read
@@ -145,7 +154,7 @@ jobs:
145154
if [[ "${{ runner.os }}" == "Windows" ]]; then
146155
echo "LIB_TARGET=x86_64-pc-windows-gnu" >>"$GITHUB_ENV"
147156
elif [[ "${{ runner.os }}" == "Linux" ]]; then
148-
echo "LIB_TARGET=x86_64-unknown-linux-musl" >>"$GITHUB_ENV"
157+
echo "LIB_TARGET=$(uname -m)-unknown-linux-musl" >>"$GITHUB_ENV"
149158
else
150159
echo "LIB_TARGET=$(rustc -vV | grep host | cut -d' ' -f2)" >>"$GITHUB_ENV"
151160
fi
@@ -167,10 +176,13 @@ jobs:
167176
- uses: r-lib/actions/setup-r@v2
168177
with:
169178
r-version: ${{ matrix.r }}
170-
use-public-rspm: true
179+
# TODO: `true` after rspm supports arm linux <https://github.com/r-lib/actions/issues/960>
180+
use-public-rspm: ${{ matrix.os != 'ubuntu-22.04-arm' }}
171181
Ncpus: "2"
172182

173183
- uses: r-lib/actions/setup-r-dependencies@v2
184+
# TODO: uncomment after <https://github.com/r-lib/actions/pull/961>
185+
# dependencies: 'FALSE'
174186
with:
175187
extra-packages: any::pkgload, any::testthat
176188

tests/testthat/test-knitr-engine.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
test_that("Set prql knitr engine", {
2+
skip_if_not_installed("knitr")
3+
24
expect_true("prql" %in% names(knitr::knit_engines$get()))
35
})
46

@@ -19,6 +21,8 @@ test_that("Set prql knitr engine", {
1921
}
2022

2123
test_that("Snapshot test of knitr-engine", {
24+
skip_if_not_installed("knitr")
25+
2226
expect_snapshot(.knit_file("r-style-opts.Rmd"), cran = TRUE)
2327
expect_snapshot(.knit_file("yaml-style-opts.Rmd"), cran = TRUE)
2428
expect_snapshot(

0 commit comments

Comments
 (0)