Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
122d75a
Make `nC()` work
perrydv Aug 12, 2025
c8bb1e7
support nimble's core-R blockTests
perrydv Aug 12, 2025
f5d6b9f
wrap indexing macro args in extra parentheses
perrydv Aug 14, 2025
14059c6
add NC_find_method as part of support for nested nClass usages.
perrydv Aug 27, 2025
677c9c3
save and load predefined as RcppPackets. Allow predefined nFunctions.…
perrydv Aug 31, 2025
7948a33
unify use of getOperatorDef to support user-defined handlers
perrydv Aug 31, 2025
01e1be7
update a few comments
perrydv Sep 1, 2025
f697c47
Move compile-time arg separation to normalizeCalls. Change NFCALL_ to…
perrydv Sep 2, 2025
cc66181
organize tests into subdirectories and create test-suites.yaml with c…
perrydv Sep 2, 2025
4271ee3
yaml -> yml
perrydv Sep 2, 2025
f499e8d
mv .github dir
perrydv Sep 2, 2025
9cac63d
work around setup-r-dependencies' sleuthing of package requirements
perrydv Sep 2, 2025
8420ab4
get old tests out of the way of setup-r-dependencies by renaming .R e…
perrydv Sep 2, 2025
a1ea392
more evasion of setup-r-dependencies static code analysis of dependen…
perrydv Sep 2, 2025
ffe6ffd
Don't let setup-r-dependencies think nCompiler is a dependency of nCo…
perrydv Sep 2, 2025
2acc1a0
Keep working around setup-r-dependencies
perrydv Sep 3, 2025
cc67be1
More working around setup-r-dependencies
perrydv Sep 3, 2025
95be0d8
Work around all uses of `nCompiler:::` in testing to avoid setup-r-de…
perrydv Sep 3, 2025
19cb477
More removing of "nCompiler:::"
perrydv Sep 3, 2025
ca5a8a3
try turning off the setup-r-dependencies cache
perrydv Sep 3, 2025
31c7bcf
change more yaml settings
perrydv Sep 3, 2025
ac317f3
Missed some saving
perrydv Sep 3, 2025
dbe605d
trying to fix test-suites.yml
perrydv Sep 3, 2025
08ccb05
new approach to dependencies in test-suites.yml
perrydv Sep 3, 2025
3d63748
fix install_deps location of package
perrydv Sep 3, 2025
b975eed
add caching and make a file of packages to install
perrydv Sep 3, 2025
a13ccdf
Revert "More working around setup-r-dependencies"
perrydv Sep 3, 2025
36246c4
clean up exports in NAMESPACE
perrydv Sep 3, 2025
31f10d0
change yml to workflow_dispatch to manually cache installation results
perrydv Sep 3, 2025
40c31f5
fix yml indentation
perrydv Sep 3, 2025
3a23d04
fix yml typos
perrydv Sep 3, 2025
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
167 changes: 167 additions & 0 deletions .github/workflows/test-suites.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# .github/workflows/test-suites.yml
name: Test Suites

on:
workflow_dispatch:
inputs:
run_cache_only:
description: 'Run and cache dependency installations only'
required: true
default: 'no'

env:
RSPM: https://packagemanager.posit.co/cran/latest # Enables Linux binaries from Posit
R_KEEP_PKG_SOURCE: yes # Keeps sources for debugging if needed


jobs:
install-cache:
runs-on: ubuntu-latest
if: github.event.inputs.run_cache_only == 'yes' || github.event.inputs.run_cache_only == 'no'
steps:
- uses: actions/checkout@v4

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

- name: Cache R packages
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ hashFiles('nCompiler/DESCRIPTION', 'ci-extra-packages.txt') }}
restore-keys: ${{ runner.os }}-r-

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
libcurl4-openssl-dev \
libssl-dev

- name: Install R dependencies
run: |
Rscript -e 'install.packages("remotes")'
Rscript -e 'remotes::install_deps("nCompiler", dependencies = TRUE)'

- name: Install extra packages
run: |
Rscript -e '
pkgs <- readLines("ci-extra-packages.txt")
new_pkgs <- pkgs[!pkgs %in% installed.packages()[,"Package"]]
if(length(new_pkgs)) install.packages(new_pkgs)
'

- name: Install package
run: R CMD INSTALL nCompiler

# Job 1: nCompile and specific operator tests
test-nCompile:
runs-on: ubuntu-latest
needs: install-cache
if: github.event.inputs.run_cache_only == 'no'
name: nCompile and specific operator tests

steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true

- name: Restore cache
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ hashFiles('nCompiler/DESCRIPTION', 'ci-extra-packages.txt') }}
restore-keys: ${{ runner.os }}-r-

- name: Run nCompile and other tests
run: |
testthat::test_dir("tests/testthat/uncompiled_tests", reporter = "progress")
testthat::test_dir("tests/testthat/nCompile_tests", reporter = "progress")
testthat::test_dir("tests/testthat/cpp_tests", reporter = "progress")
testthat::test_dir("tests/testthat/specificOp_tests", reporter = "progress")
shell: Rscript {0}

# Job 2: nClass, types and serialization tests
test-nClass:
runs-on: ubuntu-latest
needs: install-cache
if: github.event.inputs.run_cache_only == 'no'
name: nClass, types and serialization tests

steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true

- name: Restore cache
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ hashFiles('nCompiler/DESCRIPTION', 'ci-extra-packages.txt') }}
restore-keys: ${{ runner.os }}-r-

- name: Run nClass, types and serialization tests
run: |
testthat::test_dir("tests/testthat/nClass_tests", reporter = "progress")
testthat::test_dir("tests/testthat/types_tests", reporter = "progress")
testthat::test_dir("tests/testthat/serialization_tests", reporter = "progress")
shell: Rscript {0}

# Job 3: Math tests
test-math:
runs-on: ubuntu-latest
needs: install-cache
if: github.event.inputs.run_cache_only == 'no'
name: Math Tests

steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true

- name: Restore cache
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ hashFiles('nCompiler/DESCRIPTION', 'ci-extra-packages.txt') }}
restore-keys: ${{ runner.os }}-r-

- name: Run Math tests
run: |
testthat::test_dir("tests/testthat/math_tests", reporter = "progress")
shell: Rscript {0}

# Job 4: tensorOps
test-tensorOps:
runs-on: ubuntu-latest
needs: install-cache
if: github.event.inputs.run_cache_only == 'no'
name: TensorOps Tests

steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true

- name: Restore cache
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ hashFiles('nCompiler/DESCRIPTION', 'ci-extra-packages.txt') }}
restore-keys: ${{ runner.os }}-r-

- name: Run TensorOps tests
run: |
testthat::test_dir("tests/testthat/tensorOps_tests", reporter = "progress")
shell: Rscript {0}
1 change: 1 addition & 0 deletions archived_tests/tests_to_be_fixed/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See README_noscan.txt in ../v1tests.
Loading
Loading