From 5e8fa532ea6e925999ca29ab14aaaaf6cbe1e5db Mon Sep 17 00:00:00 2001 From: akdilsiz <15758169+akdilsiz@users.noreply.github.com> Date: Fri, 27 Nov 2026 14:48:27 +0300 Subject: [PATCH] CI: build with SQLITE3MC_SECURE_MEMORY=ON using clang No existing job defines SQLITE3MC_SECURE_MEMORY, so src/memory_secure.c is never compiled by CI. Add a CMake build job with clang on Linux and macOS that enables it; the CMake build keeps the default C standard of clang, which selects the C11 atomics branch. --- .github/workflows/ci4sqlite3mc.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ci4sqlite3mc.yml b/.github/workflows/ci4sqlite3mc.yml index b0e8c27..1a772db 100644 --- a/.github/workflows/ci4sqlite3mc.yml +++ b/.github/workflows/ci4sqlite3mc.yml @@ -161,3 +161,24 @@ jobs: -DANDROID_PLATFORM=${{ matrix.api-level }} - name: Build run: cmake --build build + + secure_memory_clang: + # The secure memory code (SQLITE3MC_SECURE_MEMORY=1) is compiled only when + # requested, and the other jobs never request it. The CMake build is used + # because the autotools build passes -std=c99, which selects a different + # atomics branch than the default C standard of clang. + name: Secure memory (clang, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + env: + CC: clang + steps: + - name: Checkout + uses: actions/checkout@v7 + - name: Configure + run: cmake -B build -DSQLITE3MC_SECURE_MEMORY=ON + - name: Build + run: cmake --build build