Skip to content

CI modernization: current runners/actions, macOS ARM (supersedes #25) - #27

Open
Wid-L-Hacker wants to merge 42 commits into
mlin:mainfrom
Wid-L-Hacker:conrad/ci-modernization
Open

Wid-L-Hacker wants to merge 42 commits into
mlin:mainfrom
Wid-L-Hacker:conrad/ci-modernization

Conversation

@Wid-L-Hacker

Copy link
Copy Markdown

Modernize the build workflow so CI can run again: jobs targeted retired ubuntu-20.04 and macOS-11 images, actions/checkout@v2, and v2 artifact actions (shut off).

  • actions/checkout v2 -> v7; upload-artifact -> v7; download-artifact -> v8 (subsumes the Dependabot bump in Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #25, which can be closed as superseded when this lands)
  • Linux jobs: ubuntu-20.04 -> ubuntu-24.04
  • macOS job: macOS-11 (Intel) -> macos-15 (ARM64, per maintainer direction); job renamed macOS-arm64-dylib; -march=ivybridge dropped; brew paths made prefix-relative
  • Archived actions-rs/toolchain -> dtolnay/rust-toolchain@stable; setup-python -> v7 with Python 3.12
  • pip installs get --break-system-packages (PEP 668)
  • The portable-.so release job's CentOS 7 Dockerfile is deliberately untouched (release-toolchain decision pending).

Local validation (2026-10-17): C++ extension builds clean (Debug+Release); smoke + C-API tests pass; Python suite 29/29. Known-red expectations for the test job, both pre-existing and tracked as follow-ons: cargo_test fails on Rust dependency drift (unpinned rusqlite now resolves to a version whose load_extension signature changed), and JdbcTests is expected to fail because the JDBC pom targets Java 1.7, which modern JDKs reject.

Prepared by @Wid-L-Hacker (Conrad) under @mlin's supervision.

…cannot write .github/workflows/ - to be renamed into place)
rusqlite's load_extension gained a generic entry-point parameter
(bound: Name), so passing a bare None no longer infers (E0283 at
lib.rs:128 with rusqlite 0.40.2). Annotate None::<&str>; behavior
unchanged (default entry point). Verified locally: cargo test
--no-default-features passes in full against rusqlite 0.40.2
(2 integration tests + doc-test, 2026-10-17).

The JDBC pom targeted Java 1.7, which modern JDKs refuse
(javac 12+ dropped source/target 7). Bump maven.compiler.source/target
to 1.8, the modern minimum. Local Maven verification is blocked by
the sandbox JVM/proxy issue (runbook); CI will verify.
Drop libcurl4-openssl-dev from APT_DEPS (conflicts with libhts-dev's
libcurl4-gnutls-dev on Ubuntu 24.04; apt exit 100, conflict verified
against noble package metadata) and drop the invalid pip --system
flag from the lint/test/linux-x86-64-so installs (pip: no such
option, exit 2; verified with Ubuntu 24.04's pip 24.0).

Staged at the root because the connector cannot write workflow
paths; takes effect when renamed over .github/workflows/build.yml.
CMake 4 removed compatibility with projects declaring cmake_minimum_required() below 3.5; the pinned SQLiteCpp fetched via FetchContent declares 3.1, so configure fails outright under CMake 4 (e.g. the macos-15 runner image, CMake 4.4.4) in a matter of seconds. Setting CMAKE_POLICY_VERSION_MINIMUM=3.5 before FetchContent raises the policy-version floor for the fetched subprojects. Verified locally: CMake 4.4.4 configure+build green with the change (and the failure reproduced without it); CMake 3.28 configure unaffected.
The lint deps step's system-wide pip install fails on the current ubuntu-24.04 runner image (exit 1 in ~15s, both repos, while the identical commands succeed on a stock Ubuntu 24.04 image and the test jobs' smaller pip installs succeed on the runner). Install the lint toolchain (pre-commit, black, flake8, pylint, test deps) into an isolated venv instead of fighting the runner image's system-python state, and put it on PATH for the later steps via GITHUB_PATH. Adds python3-venv to the apt line so the venv can be created. Verified in a stock ubuntu:24.04 container: apt, venv creation, pip install, and pre-commit all succeed.
…kout failure

- pom.xml: define a default <revision> property (0.9.4-SNAPSHOT). Maven >= 3.9.10 (the ubuntu-24.04 runner's 3.9.11) refuses to read the POM at all when ${revision} is undefined; -Drevision override still works. Exact CI error reproduced locally pre-fix with Maven 3.9.11; POM parses post-fix.
- bindings/rust/cargo + test/cargo_smoke_test/cargo (identical wrappers): git describe --tags dies under set -e in tag-less checkouts (actions/checkout fetches no tags), failing cargo_test in 0.00s. Fall back to the latest release version with the short SHA as prerelease suffix (valid semver) when no tag is found. Verified in a tag-less shallow clone: full cargo test passes; tagged-checkout behavior unchanged.
Mike's formatter ruling (2026-10-17): one-time reformat with current tools instead of pinning era formatter versions. Tool versions (the same unpinned installs the CI lint venv makes): clang-format 18.1.3, black 26.10.1, flake8 7.4.1, pylint 4.1.3, pre-commit 4.7.0.

- clang-format: src/genomicsqlite.cc, loaders/vcf_into_sqlite.cc
- black: bindings/python/genomicsqlite/__init__.py, bindings/python/version.py, test/genomicsqlite_smoke_test.py, test/test_bam.py, test/test_ext.py, test/test_gri.py, test/test_vcf_lines.py
- flake8 E226 (missing whitespace around arithmetic operator): test/test_txdb.py, test/test_gri.py
- pylint R0917 too-many-positional-arguments (new in pylint 3.3) flags three established public API functions in bindings/python/genomicsqlite/__init__.py; added to the existing -d list in .pre-commit-config.yaml next to the already-disabled sibling check too-many-arguments. No signature changes (positional callers must keep working).
- pylint E0401 in bindings/python/setup.py: line-targeted import-error disable; setuptools is present by construction when setup.py runs, but is not installed in the lint venv.

Verified locally in the CI lint-venv shape: pre-commit run --all-files green (all hooks pass); Release build + smoke/capi/pytest ctest entries 100% passed.
…-format 1.9 cannot run on JDK >= 16); GJF reformat of GenomicSQLite.java + JdbcDriver.java (Mike ruling 2026-10-17)
Connector content-writes reset file modes to 100644 (verified empirically:
both create_or_update_file and push_files leave the mode at 100644, and every
file the connector has rewritten on this branch lost its 100755 bit).
The cargo wrapper therefore cannot be executed by path (EACCES/exit 126).

- CMakeLists.txt: invoke the wrapper through bash in the cargo_test ctest
  registration (content of the wrapper unchanged).
- build.yml STAGED at repo root (rename into .github/workflows/ pending):
  all six by-path wrapper invocations (rust lint step, linux-x86-64-so and
  macOS-arm64-dylib 'test rust crate' steps) now go through bash.
The genomicsqlite CLI wrapper passed its startup commands (.load,
.open, tuning PRAGMAs) to the sqlite3 shell as -cmd arguments,
including SQL -cmds, under -bail. Since SQLite 3.52 the shell exits
immediately -- successfully, without reading any input -- whenever
-bail is combined with an SQL -cmd, so on current shells (e.g.
Homebrew's) the wrapper silently did nothing.

Assemble the startup sequence (.load/.open/.once/tuning/.prompt,
plus the interactive version banner and .headers) into a temporary
-init file instead; no SQL remains in -cmd (there are no -cmd args
at all). The tuning SQL gains a terminating semicolon, which -init
file context requires. os.execvp replaces the process, so the temp
file is left for the OS reaper.

Verified: positional/stdin/interactive shapes behave identically
under sqlite 3.53.4 and 3.45.1 shells.
bundle_libgenomicsqlite() was defined only for linux+x86_64 and
macos+x86_64, but open() calls it unconditionally under default
features, so the crate never compiled with default features on
Apple Silicon (E0425) or linux/aarch64. Drop the target_arch gates
so bundling is keyed by OS; the bundled bytes are the per-platform
lib placed beside the crate.
… names) for rename to .github/workflows/build.yml
…entory, fallback to library search, legible load errors)
… historical C++ ABI; Alma stock GCC defaults to ABI=1, breaking ABI=0 loader/test executables)
…lite3 shell first on PATH) for rename to .github/workflows/build.yml
macOS CI is ARM-only (R1), so the supported bundled set is three
targets: linux x86_64, linux aarch64, macOS aarch64. macos/x86_64
now takes the catch-all fallback (system library search) like any
other unsupported target, with no build.rs warning.
Per the project's SQLite version policy: the bundled/portable build's pin
tracks the newest upstream release at each maintenance touch (3.54.1,
released 2026-10-16). Runtime floor (3.31.0) and version gates unchanged.

Rehearsed locally in AlmaLinux 8 (udocker): builder builds clean,
sqlite_version()=3.54.1; libsqlite3.so.0 GLIBC ceiling stays exactly
2.28; step-7-shaped ctest 5/5 with the paired portable shell.
Mike approved adopting ruff's stricter isort grouping on 2026-10-18
as a low-risk cleanup, superseding the tool swap's initial
deliberate non-adoption. ruff.toml now selects I001, and the tree
is import-sorted with ruff 0.17.1 --fix: pure import
regrouping/sorting in 11 Python files, no semantic changes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant