1- # For help debugging build failures open an issue on the RStudio community with the ' github- actions' tag.
2- # https://community.rstudio. com/new-topic?category=Package%20development&tags=github- actions
1+ # Workflow derived from https:// github.com/r-lib/ actions/tree/v2/examples
2+ # Need help debugging build failures? Start at https://github. com/r-lib/ actions#where-to-find-help
33on :
44 push :
5- branches :
6- - main
7- - master
5+ branches : [main, master]
86 pull_request :
9- branches :
10- - main
11- - master
127
13- name : R-CMD-check
8+ name : R-CMD-check.yaml
9+
10+ permissions : read-all
1411
1512jobs :
1613 R-CMD-check :
17- runs-on : ubuntu-latest
14+ runs-on : ${{ matrix.config.os }}
15+
16+ name : ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+ strategy :
19+ fail-fast : false
20+ matrix :
21+ config :
22+ - {os: macos-latest, r: 'release'}
23+ - {os: windows-latest, r: 'release'}
24+ - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
25+ - {os: ubuntu-latest, r: 'release'}
26+ - {os: ubuntu-latest, r: 'oldrel-1'}
27+
1828 env :
19- R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
2029 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
21- CHUNKEDGRAPH_SECRET : ${{ secrets.CHUNKEDGRAPH_SECRET }}
22- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
23- FLYTABLE_TOKEN : ${{ secrets.FLYTABLE_TOKEN }}
24- RETICULATE_MINICONDA_PYTHON_VERSION : 3.8
25- RGL_USE_NULL : TRUE
26- _R_CHECK_DONTTEST_EXAMPLES_ : FALSE
27- _R_CHECK_TESTS_NLINES_ : 0
28- _R_CHECK_CRAN_INCOMING_REMOTE_ : false
30+ R_KEEP_PKG_SOURCE : yes
31+ RGL_USE_NULL : " TRUE"
32+ CRANT_ON_CI : " true"
2933
3034 steps :
3135 - uses : actions/checkout@v4
3236
37+ # Unix (macOS + Linux) – bash + heredoc
38+ - name : Write CRANT cave secret (Unix)
39+ if : runner.os != 'Windows'
40+ shell : bash
41+ run : |
42+ mkdir -p ~/.cloudvolume/secrets
43+ cat << 'EOF' > ~/.cloudvolume/secrets/proofreading.zetta.ai-cave-secret.json
44+ ${{ secrets.CRANT_CHUNKEDGRAPH_SECRET_JSON }}
45+ EOF
46+ cp ~/.cloudvolume/secrets/proofreading.zetta.ai-cave-secret.json \
47+ ~/.cloudvolume/secrets/data.proofreading.zetta.ai-cave-secret.json
48+
49+ # Windows – PowerShell + Set-Content
50+ - name : Write CRANT cave secret (Windows)
51+ if : runner.os == 'Windows'
52+ shell : pwsh
53+ run : |
54+ $secretDir = Join-Path $env:USERPROFILE ".cloudvolume\secrets"
55+ New-Item -ItemType Directory -Force -Path $secretDir | Out-Null
56+ $secret = '${{ secrets.CRANT_CHUNKEDGRAPH_SECRET_JSON }}'
57+ $path1 = Join-Path $secretDir "proofreading.zetta.ai-cave-secret.json"
58+ $path2 = Join-Path $secretDir "data.proofreading.zetta.ai-cave-secret.json"
59+ Set-Content -Path $path1 -Value $secret -NoNewline
60+ Set-Content -Path $path2 -Value $secret -NoNewline
61+
62+ - uses : r-lib/actions/setup-pandoc@v2
63+
3364 - uses : r-lib/actions/setup-r@v2
3465 with :
66+ r-version : ${{ matrix.config.r }}
67+ http-user-agent : ${{ matrix.config.http-user-agent }}
3568 use-public-rspm : true
3669
37- - uses : r-lib/actions/setup-pandoc@v2
38-
3970 - uses : r-lib/actions/setup-r-dependencies@v2
4071 with :
41- extra-packages : any::rcmdcheck, any::pkgdown, catmaid=natverse/rcatmaid
72+ extra-packages : any::rcmdcheck
4273 needs : check
4374
44- - name : Fix Conda permissions on macOS
45- if : runner.os == 'macOS'
46- run : sudo chown -R $UID $CONDA
47-
48- - name : Install fafbseg + python
49- run : |
50- pak::local_install()
51- library(crantr)
52- library(fafbseg)
53- simple_python()
54- simple_python('none', pkgs='cloud-volume~=8.32.1')
55- dr_fafbseg()
56- shell : Rscript {0}
57-
58- - name : writetoken
59- run : |
60- if(nzchar(Sys.getenv("CHUNKEDGRAPH_SECRET"))) {
61- fafbseg::flywire_set_token(token = Sys.getenv("CHUNKEDGRAPH_SECRET"))
62- } else {
63- message("CHUNKEDGRAPH_SECRET not set, skipping token configuration")
64- }
65- shell : Rscript {0}
66-
6775 - uses : r-lib/actions/check-r-package@v2
68-
69- - name : Upload check results
70- if : failure()
71- uses : actions/upload-artifact@v4
7276 with :
73- name : ${{ runner.os }}-r${{ matrix.config.r }}-results
74- path : check
75-
76- - name : Upload check log results
77- if : failure()
78- uses : actions/upload-artifact@v4
79- with :
80- name : ${{ matrix.config.tag }}-results
81- path : ${{ github.event.repository.name }}.Rcheck/00check.log
82-
83- - name : Test coverage
84- # if: runner.os == 'macOS'
85- if : ${{ runner.os == 'Linux' && matrix.config.r == 'release'}}
86- run : covr::codecov(errorsAreFatal=FALSE)
87- shell : Rscript {0}
77+ upload-snapshots : true
78+ build_args : ' c("--no-manual","--compact-vignettes=gs+qpdf")'
0 commit comments