Skip to content

Commit

Permalink
ci: test bin lib on arm64 linux (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi authored Jan 19, 2025
1 parent 704b8de commit 43f5de2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/release-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,17 @@ jobs:
if: runner.os != 'Windows'
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
# TODO: `true` after rspm supports arm linux <https://github.com/r-lib/actions/issues/960>
use-public-rspm: ${{ matrix.os != 'ubuntu-22.04-arm' }}
Ncpus: 2

- uses: r-lib/actions/setup-r-dependencies@v2
if: runner.os != 'Windows'
with:
# TODO: uncomment after <https://github.com/r-lib/actions/pull/961>
# dependencies: 'FALSE'
extra-packages: any::pkgload

- name: build lib
env:
NOT_CRAN: "true"
Expand All @@ -92,7 +100,6 @@ jobs:
if [[ "${{ runner.os }}" != "Windows" ]]; then
# Rinternals header is needed
pushd ..
Rscript -e 'install.packages("pkgbuild")'
Rscript -e 'pkgbuild::compile_dll()'
popd
else
Expand Down Expand Up @@ -130,6 +137,8 @@ jobs:
include:
- os: macos-13
r: release
- os: ubuntu-22.04-arm
r: release

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

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

Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-knitr-engine.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test_that("Set prql knitr engine", {
skip_if_not_installed("knitr")

expect_true("prql" %in% names(knitr::knit_engines$get()))
})

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

test_that("Snapshot test of knitr-engine", {
skip_if_not_installed("knitr")

expect_snapshot(.knit_file("r-style-opts.Rmd"), cran = TRUE)
expect_snapshot(.knit_file("yaml-style-opts.Rmd"), cran = TRUE)
expect_snapshot(
Expand Down

0 comments on commit 43f5de2

Please sign in to comment.