Skip to content

Commit c081ae0

Browse files
committed
ci: run inherited smoke tests
1 parent d77bb2d commit c081ae0

4 files changed

Lines changed: 37 additions & 3 deletions

File tree

.github/workflows/build-ssdb.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
description: 'enable ccache for non-reproducibility builds'
1212
type: boolean
1313
default: true
14+
run_smoke_tests:
15+
description: 'run a focused inherited test.py smoke suite after building'
16+
type: boolean
17+
default: false
1418
outputs:
1519
md5sum:
1620
description: 'the md5sum for the inherited database executable'
@@ -52,10 +56,29 @@ jobs:
5256
- name: Generate the building system
5357
run: |
5458
git config --global --add safe.directory $GITHUB_WORKSPACE
59+
artifacts=(--with scylla)
60+
if [ "${{ inputs.run_smoke_tests }}" = "true" ]; then
61+
artifacts+=(--with test/boost/UUID_test)
62+
fi
5563
# The .#cpp shell's compiler wrappers use ccache when CCACHE_DIR is set.
56-
nix develop .#cpp -c ./configure.py --mode ${{ inputs.build_mode }} --with scylla --no-seastar-unused-result-error
64+
nix develop .#cpp -c ./configure.py --mode ${{ inputs.build_mode }} "${artifacts[@]}" --no-seastar-unused-result-error
5765
- run: |
5866
nix develop .#cpp -c ninja build/${{ inputs.build_mode }}/scylla
67+
- name: Build inherited smoke tests
68+
if: ${{ inputs.run_smoke_tests }}
69+
run: |
70+
nix develop .#cpp -c ninja build/${{ inputs.build_mode }}/test/boost/UUID_test
71+
- name: Run inherited smoke tests
72+
if: ${{ inputs.run_smoke_tests }}
73+
run: |
74+
nix develop .#cpp -c ./test.py --mode ${{ inputs.build_mode }} --jobs 1 --timeout 900 --tmpdir testlog boost/UUID_test
75+
- name: Upload inherited test logs
76+
if: ${{ always() && inputs.run_smoke_tests }}
77+
uses: actions/upload-artifact@v4
78+
with:
79+
name: inherited-testlog-${{ inputs.build_mode }}
80+
path: testlog
81+
if-no-files-found: ignore
5982
- id: checksum
6083
run: |
6184
checksum=$(md5sum build/${{ inputs.build_mode }}/scylla | cut -c -32)

.github/workflows/pr-builds.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
uses: ./.github/workflows/build-ssdb.yaml
3434
with:
3535
build_mode: dev
36+
run_smoke_tests: true
3637

3738
rust:
3839
name: Rust checks and tests

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ MAKEFLAGS += --no-builtin-rules
99
INVENTORY_GENERATOR := docs/relicensing/generate-inventory.py
1010
INVENTORY_OUTPUTS := docs/relicensing/inventory.md docs/relicensing/inventory.tsv
1111
RUST_MANIFEST ?= rust/Cargo.toml
12+
CPP_TEST_MODE ?= dev
13+
CPP_TEST_SMOKE ?= boost/UUID_test
14+
CPP_TEST_SMOKE_ARTIFACTS ?= test/boost/UUID_test
15+
CPP_TEST_SMOKE_TARGETS ?= build/$(CPP_TEST_MODE)/test/boost/UUID_test
1216

1317
.PHONY: help
1418
help: ## Show available targets.
@@ -54,6 +58,12 @@ rust-fmt-check: ## Check Rust formatting in the current Rust workspace.
5458
cpp-configure: ## Configure the inherited C++ build inside the Linux C++ shell.
5559
$(NIX) develop .#cpp -c ./configure.py --mode dev --with scylla --disable-dpdk
5660

61+
.PHONY: cpp-test-smoke
62+
cpp-test-smoke: ## Build and run the focused inherited C++ test.py smoke suite.
63+
$(NIX) develop .#cpp -c ./configure.py --mode $(CPP_TEST_MODE) --with scylla $(addprefix --with ,$(CPP_TEST_SMOKE_ARTIFACTS)) --disable-dpdk --no-seastar-unused-result-error
64+
$(NIX) develop .#cpp -c ninja build/$(CPP_TEST_MODE)/scylla $(CPP_TEST_SMOKE_TARGETS)
65+
$(NIX) develop .#cpp -c ./test.py --mode $(CPP_TEST_MODE) --jobs 1 --timeout 900 --tmpdir testlog $(CPP_TEST_SMOKE)
66+
5767
.PHONY: inventory
5868
inventory: ## Regenerate relicensing inventory files.
5969
@$(PYTHON) $(INVENTORY_GENERATOR)

docs/ci/workflow-audit.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ changes, and which should be removed.
2020

2121
| Workflow | File | Category | Current role | Audit note |
2222
|-----------------------------------|------------------------------------------|-------------|-------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
23-
| SSDB Build and Test | `.github/workflows/pr-builds.yml` | Core PR CI | Installs Nix, validates the flake, runs the C++ configure smoke through the C++ shell, runs the reusable inherited binary build, and runs Rust checks/tests through Makefile/Nix targets. | Keep as the fork's primary PR signal. Expand as Rust replacement modules become testable. |
23+
| SSDB Build and Test | `.github/workflows/pr-builds.yml` | Core PR CI | Installs Nix, validates the flake, runs the C++ configure smoke through the C++ shell, runs the reusable inherited binary build with a focused `test.py` smoke test, and runs Rust checks/tests through Makefile/Nix targets. | Keep as the fork's primary PR signal. Expand inherited test coverage and Rust replacement modules as they become testable. |
2424
| SSDB PR | `.github/workflows/ssdb-pr.yaml` | Core PR CI | Runs relicensing Phase 1 checks and prints relicensing status. | Keep until provenance checks are merged into broader CI. |
2525
| PR Conventional Commit Validation | `.github/workflows/commits.yml` | Core PR CI | Validates conventional PR titles without adding labels. | Keep for release-note hygiene. |
2626
| codespell | `.github/workflows/codespell.yaml` | Core PR CI | Warns on spelling issues. | Keep, but consider making it fail once inherited false positives are cleaned up. |
27-
| Build SSDB | `.github/workflows/build-ssdb.yaml` | Reusable CI | Installs Nix, enters the C++ shell, and builds the inherited database executable for a requested mode. | Keep as reusable CI. Internal target paths still use `scylla` until the build tree is renamed. |
27+
| Build SSDB | `.github/workflows/build-ssdb.yaml` | Reusable CI | Installs Nix, enters the C++ shell, builds the inherited database executable for a requested mode, and can optionally run focused inherited `test.py` smoke tests. | Keep as reusable CI. Internal target paths still use `scylla` until the build tree is renamed. |
2828

2929
## Modify
3030

0 commit comments

Comments
 (0)