Skip to content

Commit f668111

Browse files
committed
remove conda
1 parent 43a3008 commit f668111

13 files changed

Lines changed: 159 additions & 305 deletions

.github/workflows/linux.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,52 @@ jobs:
6868
env:
6969
QS_EXTENDED_TESTS: "1"
7070
run: ctest --test-dir build --output-on-failure -V
71+
72+
rcppparallel-flow-compat:
73+
name: Ubuntu (RcppParallel ${{ matrix.label }})
74+
runs-on: ubuntu-latest
75+
strategy:
76+
fail-fast: false
77+
matrix:
78+
include:
79+
- label: classic TBB
80+
variant: classic
81+
expected_api: source_node
82+
install_system_tbb: "false"
83+
- label: system oneTBB
84+
variant: onetbb
85+
expected_api: input_node
86+
install_system_tbb: "true"
87+
88+
defaults:
89+
run:
90+
shell: bash
91+
92+
steps:
93+
- name: Check out repository
94+
uses: actions/checkout@v4
95+
96+
- name: Install system oneTBB
97+
if: matrix.install_system_tbb == 'true'
98+
run: |
99+
sudo apt-get update
100+
sudo apt-get install -y pkg-config libtbb-dev
101+
102+
- name: Export system TBB paths
103+
if: matrix.install_system_tbb == 'true'
104+
run: |
105+
echo "TBB_INC=$(pkg-config --variable=includedir tbb)" >> "$GITHUB_ENV"
106+
echo "TBB_LIB=$(pkg-config --variable=libdir tbb)" >> "$GITHUB_ENV"
107+
108+
- name: Set up R
109+
uses: r-lib/actions/setup-r@v2
110+
with:
111+
use-public-rspm: true
112+
113+
- name: Install Rcpp and RcppParallel
114+
run: Rscript tests/rcpp/install_rcppparallel.R "${{ matrix.variant }}"
115+
116+
- name: Run flow-graph compatibility probe
117+
run: |
118+
Rscript tests/rcpp/tbb_flow_compat.R \
119+
"${{ matrix.expected_api }}"

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,3 @@ perf.data*
3939
core
4040
core.*
4141
docs/tmp/*
42-
tests/rcpp/.conda-envs/
43-
tests/rcpp/.conda-pkgs/

CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,4 @@ if(QDATA_BUILD_TESTS)
121121
$<TARGET_FILE:qdata_roundtrip_file>
122122
$<TARGET_FILE:qdata_roundtrip_memory>
123123
)
124-
find_program(CONDA_EXECUTABLE conda QUIET)
125-
if(CONDA_EXECUTABLE)
126-
set(QDATA_RCPP_TEST_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/tests/rcpp/run_flow_compat_test.sh)
127-
add_test(
128-
NAME qdata_rcppparallel_flow_compat
129-
COMMAND bash
130-
${QDATA_RCPP_TEST_SCRIPT}
131-
${CONDA_EXECUTABLE}
132-
)
133-
set_tests_properties(
134-
PROPERTIES
135-
TIMEOUT 1800
136-
)
137-
else()
138-
message(STATUS "conda not found; skipping RcppParallel conda-backed tests")
139-
endif()
140124
endif()

Makefile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ QS_EXTENDED_TESTS ?= 1
77
ROWS ?=
88
REPS ?=
99
LICENSE_DIR ?= LICENSES
10-
RCPP_TEST_ENVS_DIR ?= tests/rcpp/.conda-envs
1110

1211
BENCH_ARGS :=
1312
ifneq ($(strip $(ROWS)),)
@@ -17,7 +16,7 @@ ifneq ($(strip $(REPS)),)
1716
BENCH_ARGS += $(REPS)
1817
endif
1918

20-
.PHONY: all configure example bench benchmark benchmark-build test test-extended test-rcpp-parallel get-license-files clean distclean
19+
.PHONY: all configure example bench benchmark benchmark-build test test-extended get-license-files clean distclean
2120

2221
all: configure
2322
$(CMAKE) --build $(BUILD_DIR)
@@ -43,10 +42,6 @@ test-extended: configure
4342
$(CMAKE) --build $(BUILD_DIR)
4443
QS_EXTENDED_TESTS=$(QS_EXTENDED_TESTS) $(CTEST) --test-dir $(BUILD_DIR) $(CTEST_FLAGS)
4544

46-
test-rcpp-parallel: configure
47-
$(CTEST) --test-dir $(BUILD_DIR) $(CTEST_FLAGS) -R '^qdata_rcppparallel_flow_compat$$'
48-
49-
5045
get-license-files:
5146
@mkdir -p $(LICENSE_DIR)
5247
curl -fsSL https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE
@@ -55,10 +50,6 @@ get-license-files:
5550

5651
clean:
5752
@if [ -d "$(BUILD_DIR)" ]; then $(CMAKE) --build $(BUILD_DIR) --target clean; fi
58-
@if [ -d "$(RCPP_TEST_ENVS_DIR)" ]; then $(CMAKE) -E rm -rf "$(RCPP_TEST_ENVS_DIR)"; fi
59-
@if [ -d "tests/rcpp/.conda-pkgs" ]; then $(CMAKE) -E rm -rf "tests/rcpp/.conda-pkgs"; fi
6053

6154
distclean:
6255
$(CMAKE) -E rm -rf $(BUILD_DIR)
63-
$(CMAKE) -E rm -rf $(RCPP_TEST_ENVS_DIR)
64-
$(CMAKE) -E rm -rf tests/rcpp/.conda-pkgs

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ int main() {
4242
The test suite is driven through `Rscript` and requires the `qs2`, `stringi`,
4343
and `stringfish` packages when `QDATA_BUILD_TESTS=ON`.
4444
45+
The RcppParallel flow-graph compatibility probe runs in Linux CI only. It
46+
covers both the bundled classic TBB path and an external system oneTBB path
47+
configured through `TBB_INC` and `TBB_LIB`.
48+
4549
## Core qdata types
4650
4751
qdata is built around a small set of data types:

environment.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/rcpp/environment-conda.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/rcpp/environment-cran.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/rcpp/environment-mixed.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/rcpp/install_rcppparallel.R

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
args <- commandArgs(TRUE)
2+
stopifnot(length(args) == 1L)
3+
4+
variant <- args[[1]]
5+
repos <- c(CRAN = "https://cloud.r-project.org")
6+
ncpus <- max(1L, parallel::detectCores())
7+
8+
if (identical(variant, "classic")) {
9+
Sys.unsetenv(c("TBB", "TBB_ROOT", "TBB_INC", "TBB_LIB", "TBB_LINK_LIB", "TBB_AUTODETECT"))
10+
} else if (identical(variant, "onetbb")) {
11+
Sys.unsetenv("TBB_AUTODETECT")
12+
required <- c("TBB_INC", "TBB_LIB")
13+
missing <- required[!nzchar(Sys.getenv(required))]
14+
if (length(missing) > 0L) {
15+
stop("Missing required environment variables: ", paste(missing, collapse = ", "))
16+
}
17+
} else {
18+
stop("Unknown variant: ", variant)
19+
}
20+
21+
message("Installing RcppParallel variant: ", variant)
22+
install.packages("Rcpp", repos = repos, Ncpus = ncpus)
23+
install.packages("RcppParallel", repos = repos, type = "source", Ncpus = ncpus)
24+
25+
pkgs <- c("Rcpp", "RcppParallel")
26+
stopifnot(all(vapply(pkgs, requireNamespace, logical(1), quietly = TRUE)))

0 commit comments

Comments
 (0)