background thread preview #867
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '**.md' | |
| - 'Docs/**' | |
| pull_request: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '**.md' | |
| - 'Docs/**' | |
| # 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: Setup VillageSQL build environment | |
| uses: ./source/.github/actions/setup-villagesql-build | |
| with: | |
| cache-key-prefix: build | |
| - name: Build VillageSQL | |
| working-directory: ./source | |
| run: ./scripts/build-ci.sh | |
| env: | |
| PARALLEL_JOBS: 16 | |
| - name: Evict stale ccache entries | |
| run: ccache --evict-older-than 3600s | |
| - name: Show ccache statistics | |
| run: ccache -s | |
| - name: Run tests | |
| uses: ./source/.github/actions/run-tests | |
| with: | |
| artifact-name: test-logs |