Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,84 @@ jobs:
uses: rstudio/shiny-workflows/.github/workflows/R-CMD-check.yaml@v1
with:
ubuntu: "ubuntu-22.04 ubuntu-latest"

system-libuv:
# Ubuntu 22.04 has libuv1-dev version 1.43, which is sufficient
runs-on: ubuntu-latest
name: Installed=${{ matrix.config.install }} Bundled=${{ matrix.config.use }}
strategy:
fail-fast: false
matrix:
config:
# This one should test that we've used system and everything runs ok
- {install: true}
# This one should test for bundling log message
- {install: true, use: true}
# This one should test for failure
- {install: false, use: false}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v7

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- name: Install libuv
if: ${{ matrix.config.install }}
# If we add tests for e.g. rhel/centos, we couldn't assume apt-get
run: |
sudo apt-get update -y
sudo apt-get install -y libuv1-dev

- name: Ensure libuv is not on the system
if: ${{ !matrix.config.install }}
run: |
sudo apt-get remove -y libuv1-dev || true

- uses: r-lib/actions/check-r-package@v2
if: ${{ matrix.config.install }}
env:
USE_BUNDLED_LIBUV: ${{ matrix.config.use }}
with:
upload-snapshots: true

- name: Confirm that USE_BUNDLED_LIBUV was respected
if: ${{ matrix.config.install }}
env:
USE_BUNDLED_LIBUV: ${{ matrix.config.use }}
run: |
if [ "$USE_BUNDLED_LIBUV" = "true" ]; then
grep "Using bundled copy of libuv" check/httpuv.Rcheck/00install.out
else
grep "Using libuv found by pkg-config" check/httpuv.Rcheck/00install.out
fi

- name: Confirm error if system libuv missing and use=false
if: ${{ !matrix.config.install && !matrix.config.use }}
env:
USE_BUNDLED_LIBUV: ${{ matrix.config.use }}
run: |
R CMD INSTALL . > install.log || true
grep "Did not find suitable libuv on your system" install.log

# Single stable context to mark as a required status check on `main`.
# Matrix job names are not stable enough to require individually.
done:
if: always()
needs: [website, routine, R-CMD-check, system-libuv]
runs-on: ubuntu-latest
steps:
# ponytail: `skipped` counts as success; add it here if any job above
# ever gains a path filter or `if:` condition.
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1
79 changes: 0 additions & 79 deletions .github/workflows/system-libuv.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ LinkingTo:
later,
Rcpp
Config/Needs/website: tidyverse/tidytemplate
Config/roxygen2/version: 8.1.0
Config/testthat/edition: 3
Config/usethis/last-upkeep: 2025-07-01
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.3
SystemRequirements: GNU make, zlib
Collate:
'RcppExports.R'
Expand Down
14 changes: 8 additions & 6 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ export(stopServer)
importFrom(R6,R6Class)
importFrom(Rcpp,evalCpp)
importFrom(later,run_now)
importFrom(promises,"%...!%")
importFrom(promises,"%...>%")
importFrom(promises,finally)
importFrom(promises,is.promise)
importFrom(promises,promise)
importFrom(promises,then)
importFrom(promises,
"%...!%",
"%...>%",
finally,
is.promise,
promise,
then
)
useDynLib(httpuv, .registration = TRUE)
2 changes: 1 addition & 1 deletion demo/daemon-echo.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ library(httpuv)

app <- list(
call = function(req) {
wsUrl = paste(
wsUrl <- paste(
sep = '',
'"',
"ws://",
Expand Down
2 changes: 1 addition & 1 deletion demo/echo.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library(httpuv)

app <- list(
call = function(req) {
wsUrl = paste(
wsUrl <- paste(
sep = '',
'"',
"ws://",
Expand Down
129 changes: 63 additions & 66 deletions man/PipeServer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading