Repository navigation
158 lines (158 loc) · 8.14 KB
/
Copy pathci.yml
File metadata and controls
158 lines (158 loc) · 8.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# SPDX-License-Identifier: MPL-2.0
# SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
name: CI
on:
push:
branches: [main, 'fix/issue-23-reference-pins', 'audit/issue-23-fuzz-correctness']
tags: ['v*']
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Julia ${{ matrix.version }}
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
version: ['1.10', '1.12.5']
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: julia-actions/setup-julia@4c0cb0fce8556fdb04a90347310e5db8b1f98fb9 # v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@d10a6fd8f31b12404a54613ebad242900567f2b9 # v2
- uses: julia-actions/julia-buildpkg@e3eb439fad4f9aba7da2667e7510e4a46ebc46e1 # v1
- uses: julia-actions/julia-runtest@6e050c8013b833b1195105ff2fce9cd802f53271 # v1
proofs:
name: Agda proofs (Debian 2.6.4.3, stdlib 2.1)
runs-on: ubuntu-24.04
timeout-minutes: 30
# Same recipe as MetaManifold-Evidence and residual-evidence-types: Debian's
# agda and agda-stdlib packages at exact versions inside a digest-pinned
# image. Nothing is fetched from GitHub releases or vendored by SHA;
# proofs/lib.sh refuses any other Agda.
container: debian:13-slim@sha256:d7e12182ce18b85b93007c1dedf31f2d29e01ccf3182cc4017c709b6259bc132
env:
LANG: C.UTF-8
LC_ALL: C.UTF-8
steps:
- name: Install the pinned Debian toolchain
run: |
apt-get update
apt-get install --no-install-recommends -y ca-certificates git agda-bin=2.6.4.3-1+b2 agda-stdlib=2.1-4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- name: Proof gate (axiom audit, type-check, reject controls, gate self-test)
run: proofs/check.sh
oracle:
name: ${{ matrix.reference }} oracle (R 4.5.0, Bioconductor 3.22)
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- reference: ALDEx2
version: '1.42.0'
script: runoracle.jl
- reference: ANCOMBC
version: '2.12.0'
script: ancombc_oracle.jl
env:
R_LIBS_USER: ${{ github.workspace }}/.r-lib
REFERENCE_PACKAGE: ${{ matrix.reference }}
REFERENCE_VERSION: ${{ matrix.version }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: r-lib/actions/setup-r@f9a764fea8d5c63df6ef9a5c7795bf7deb5d7e05 # v2
with:
r-version: '4.5.0'
use-public-rspm: true
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: .r-lib
key: r-4.5.0-bioc-3.22-cran-2026-02-13-${{ matrix.reference }}-oracle-v3
- name: Install reference build dependencies
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libcurl4-openssl-dev libssl-dev libxml2-dev libuv1-dev libgsl-dev
- name: Install the Bioconductor 3.22 references
run: |
export R_LIBS_USER="$GITHUB_WORKSPACE/.r-lib"
echo "R_LIBS_USER=$R_LIBS_USER" >> "$GITHUB_ENV"
mkdir -p "$R_LIBS_USER"
Rscript -e 'options(Ncpus = 2, timeout = 3600)
# ANCOMBC 2.12.0 imports the pre-S7 CVXR API. Freeze CRAN as well
# as Bioconductor; latest CRAN no longer supplies that API.
options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/noble/2026-02-13"))
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
BiocManager::install(version = "3.22", ask = FALSE, update = FALSE)
p <- Sys.getenv("REFERENCE_PACKAGE")
if (!requireNamespace(p, quietly = TRUE)) BiocManager::install(p, ask = FALSE, update = FALSE)
stopifnot(packageVersion(p) == Sys.getenv("REFERENCE_VERSION"))
if (p == "ANCOMBC") stopifnot(packageVersion("CVXR") == "1.0.15")
if (p == "ALDEx2" && !requireNamespace("testthat", quietly=TRUE)) install.packages("testthat")
cat(p, as.character(packageVersion(p)), "\n")'
- uses: julia-actions/setup-julia@4c0cb0fce8556fdb04a90347310e5db8b1f98fb9 # v2
with:
version: '1.12.5'
- uses: julia-actions/cache@d10a6fd8f31b12404a54613ebad242900567f2b9 # v2
# RCall.jl's own CI does the same: libR's directory must be on the loader path.
- name: Put libR on the loader path
run: echo "LD_LIBRARY_PATH=$(R RHOME)/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
- name: R can load the pinned reference
run: Rscript -e 'p <- Sys.getenv("REFERENCE_PACKAGE"); library(p, character.only=TRUE); cat(R.version.string, p, as.character(packageVersion(p)), "\n")'
- name: Julia can start R through RCall
run: |
export R_HOME="$(R RHOME)"
echo "R_HOME=$R_HOME"
JULIA_PKG_PRECOMPILE_AUTO=0 julia --project=test/oracle -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()'
shopt -s nullglob # no build.log is not an error
for l in ~/.julia/scratchspaces/*/*/build.log; do echo "== $l"; cat "$l"; done
julia --project=test/oracle -e 'using RCall; println(rcopy(R"R.version.string"))'
julia --project=test/oracle -e 'using CompositionalDA, RCall; @assert Base.get_extension(CompositionalDA, :CompositionalDARCallExt) !== nothing; println("extension loaded")'
- name: Pristine ALDEx2 discrete-tail defect control
if: matrix.reference == 'ALDEx2'
run: |
export R_HOME="$(R RHOME)"
julia --project=test/oracle test/oracle/aldex2_tail_control.jl
- name: ALDEx2 conformance with the pinned inclusive-tail repair
if: always() && matrix.reference == 'ALDEx2'
run: |
mkdir -p /tmp/aldex-tail-repair
for source in stats.fast.R clr_ttest.r; do
curl --fail --location --retry 3 "https://raw.githubusercontent.com/hyperpolymath/ALDEx_bioc/c1217796f551373cfd942d5e272cd56e05ce77a9/R/$source" -o "/tmp/aldex-tail-repair/$source"
done
for source in test-directional-tails.R test-aldex.ttest.R; do
curl --fail --location --retry 3 "https://raw.githubusercontent.com/hyperpolymath/ALDEx_bioc/c1217796f551373cfd942d5e272cd56e05ce77a9/tests/testthat/$source" -o "/tmp/aldex-tail-repair/$source"
done
export R_HOME="$(R RHOME)"
ALDEX2_REPAIR_DIR=/tmp/aldex-tail-repair julia --project=test/oracle test/oracle/runoracle.jl
- name: Pristine ANCOMBC known-defect control (three expected failures)
if: matrix.reference == 'ANCOMBC'
run: |
export R_HOME="$(R RHOME)"
ANCOMBC_PRISTINE_DEFECT_CONTROL=1 julia --project=test/oracle test/oracle/ancombc_oracle.jl
- name: ANCOMBC conformance with the pinned upstream variance repair
if: always() && matrix.reference == 'ANCOMBC'
run: |
curl --fail --location --retry 3 https://raw.githubusercontent.com/hyperpolymath/ANCOMBC/6d094731ed85e9b0458053ad3510e9bdc238e152/R/ancombc_bias_correct.R -o /tmp/ancombc-variance-repair.R
export R_HOME="$(R RHOME)"
ANCOMBC_ESTIMATOR_SOURCE=/tmp/ancombc-variance-repair.R julia --project=test/oracle test/oracle/ancombc_oracle.jl
- name: Investigate the small-unbalanced calibration failure
if: matrix.reference == 'ANCOMBC'
run: |
julia --project=test/oracle benchmark/export_calibration_case.jl /tmp/calibration/small-unbalanced-inputs
Rscript benchmark/calibration_reference.R /tmp/calibration/small-unbalanced-inputs /tmp/ancombc-variance-repair.R
- name: Preserve calibration investigation evidence
if: always() && matrix.reference == 'ANCOMBC'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: small-unbalanced-calibration
path: /tmp/calibration
if-no-files-found: error
retention-days: 30