Skip to content

deny UNINSTALL EXTENSION if indexes exist (#508) #1041

deny UNINSTALL EXTENSION if indexes exist (#508)

deny UNINSTALL EXTENSION if indexes exist (#508) #1041

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- 'Docs/**'
pull_request:
branches: [ main ]
# No paths-ignore here — the job must always run on PRs so the required
# status check is always reported. Docs-only detection happens inside the job.
# Cancel superseded runs on the same PR branch. main pushes are not cancelled
# so each merged commit gets its own pass.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-and-test:
name: Build and Test VillageSQL
runs-on: self-hosted
permissions:
actions: write # Required to read/write caches
contents: read
env:
SOURCE_DIR: ${{ github.workspace }}/source
BUILD_DIR: ${{ github.workspace }}/build
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Get enough history for submodules and dependencies
fetch-depth: 50
path: source
- name: Check if build is needed
id: check-paths
working-directory: ./source
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
git fetch origin ${{ github.base_ref }} --depth=50
CHANGED=$(git diff --name-only FETCH_HEAD...HEAD)
if echo "$CHANGED" | grep -qvE '\.(md)$|^Docs/'; then
echo "needed=true" >> $GITHUB_OUTPUT
else
echo "All changed files are documentation — skipping build"
echo "needed=false" >> $GITHUB_OUTPUT
fi
else
echo "needed=true" >> $GITHUB_OUTPUT
fi
- name: Setup VillageSQL build environment
if: steps.check-paths.outputs.needed == 'true'
uses: ./source/.github/actions/setup-villagesql-build
with:
cache-key-prefix: build
- name: Build VillageSQL
if: steps.check-paths.outputs.needed == 'true'
working-directory: ./source
run: ./scripts/build-ci.sh
env:
PARALLEL_JOBS: 16
BUILD_TYPE: debug
CMAKE_EXTRA_FLAGS: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Evict stale ccache entries
if: steps.check-paths.outputs.needed == 'true'
run: ccache --evict-older-than 3600s
- name: Show ccache statistics
if: steps.check-paths.outputs.needed == 'true'
run: ccache -s
- name: Run tests
if: steps.check-paths.outputs.needed == 'true'
uses: ./source/.github/actions/run-tests
with:
artifact-name: test-logs