ci: add debug steps #11
Workflow file for this run
This file contains 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 extensions | |
on: | |
push: | |
branches: | |
- '*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: X64 | |
- os: ubuntu-latest | |
arch: ARM64 | |
- os: windows-latest | |
arch: X64 | |
- os: macos-latest | |
arch: X64 | |
- os: macos-latest | |
arch: ARM64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download SQLite headers (Unix) | |
if: runner.os != 'Windows' | |
run: cd extensions && make headers | |
- name: Download SQLite headers (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
cd extensions | |
curl.exe -L https://www.sqlite.org/2024/sqlite-amalgamation-3470200.zip -o sqlite-src.zip | |
Expand-Archive -Path sqlite-src.zip -DestinationPath . | |
Copy-Item sqlite-amalgamation-3470200\sqlite3.h . | |
Copy-Item sqlite-amalgamation-3470200\sqlite3ext.h . | |
- name: Debug PATH | |
if: runner.os == 'Windows' | |
run: | | |
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
echo $env:PATH | |
where cl | |
- name: Debug uname -m | |
if: runner.os != 'Windows' | |
run: uname -m | |
- name: Build C files (Unix) | |
if: runner.os != 'Windows' | |
run: cd extensions && make | |
- name: Build C files (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
cd extensions && make | |
- name: Commit output files | |
run: | | |
cd extensions | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add lib/ | |
git commit -m "Auto-build: Update extensions [skip ci]" || echo "No changes to commit" | |
- name: Push files (Unix) | |
if: runner.os != 'Windows' | |
run: | | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
for attempt in {1..3}; do | |
git pull --rebase origin $CURRENT_BRANCH && git push origin $CURRENT_BRANCH && exit 0 || { | |
echo "Attempt $attempt failed. Retrying in 5 seconds..." | |
sleep 5 | |
} | |
done | |
echo "Failed to push changes after 3 attempts." | |
exit 1 | |
- name: Push files (Windows) | |
if: runner.os == 'Windows' | |
run: git pull --rebase && git push |