Skip to content

Commit 7549a09

Browse files
authored
feat: Use Ubuntu noble for touchstone (#314)
* Use noble * load_all() * Rename * All of them * Reduce number of runs * Reverse
1 parent 9ccac24 commit 7549a09

File tree

4 files changed

+1164
-26
lines changed

4 files changed

+1164
-26
lines changed

.github/workflows/touchstone-receive.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ on:
1717

1818
jobs:
1919
build:
20-
runs-on: ubuntu-22.04
20+
runs-on: ubuntu-24.04
2121
env:
2222
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
23-
RSPM: "https://packagemanager.rstudio.com/all/__linux__/jammy/latest"
23+
RSPM: "https://packagemanager.rstudio.com/all/__linux__/noble/latest"
2424
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2525
steps:
2626
- uses: lorenzwalthert/touchstone/actions/receive@main

tools/31-tpch-load-qs.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
pkgload::load_all()
2+
13
tables <- c("lineitem", "partsupp", "part", "supplier", "nation", "orders", "customer", "region")
24

35
data <- lapply(tables, function(t) {
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ branch_install()
1111

1212
header <- paste0("# Generated by 60-touchstone-gen.R, ", "do not edit by hand\n\n")
1313

14-
body <- function(sf, test) paste0('benchmark_run(
15-
expr_before_benchmark = {
14+
body <- function(sf, test, n) glue::glue('benchmark_run(
15+
expr_before_benchmark = {{
1616
library(duckplyr)
17-
data <- qs::qread("tools/tpch/', sf, '.qs")
17+
data <- qs::qread("tools/tpch/{sf}.qs")
1818
.mapply(assign, list(names(data), data), list(pos = .GlobalEnv))
1919
2020
customer <- as_duckplyr_df(customer)
@@ -25,24 +25,22 @@ body <- function(sf, test) paste0('benchmark_run(
2525
partsupp <- as_duckplyr_df(partsupp)
2626
region <- as_duckplyr_df(region)
2727
supplier <- as_duckplyr_df(supplier)
28-
},
29-
`', sf, '_tpch_', test, '` = collect(duckplyr:::tpch_', test, '()),
30-
n = 30
28+
}},
29+
`{sf}_tpch_{test}` = collect(duckplyr:::tpch_', test, '()),
30+
n = {n}
3131
)\n\n')
3232

3333
footer <- 'benchmark_analyze()'
3434

3535
bodies <-
3636
crossing(
37-
sf = c("001", "010"),
38-
test = c("01", "02", "03"),
39-
# sf = c("001", "010", "100"),
40-
# test = c("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22"),
37+
tibble(n = c(3, 10, 30), sf = c("100", "010", "001")),
38+
test = c("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22"),
4139
) |>
4240
rowwise() |>
43-
mutate(code = body(sf, test)) |>
41+
mutate(code = body(sf, test, n)) |>
4442
ungroup() |>
45-
summarize(code = paste(code, collapse = "")) |>
43+
summarize(code = paste(code, collapse = "\n")) |>
4644
pull(code)
4745

4846
code <- paste0(

0 commit comments

Comments
 (0)