diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e045614a..16c33780 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Tests env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/extensions.yml b/.github/workflows/extensions.yml index 24307e8e..3f98e8db 100644 --- a/.github/workflows/extensions.yml +++ b/.github/workflows/extensions.yml @@ -42,13 +42,23 @@ jobs: Copy-Item sqlite-amalgamation-3470200\sqlite3.h . Copy-Item sqlite-amalgamation-3470200\sqlite3ext.h . - - name: Debug uname -m - if: runner.os != 'Windows' - run: uname -m + - name: Set up QEMU (Linux cross-compilation) + if: runner.os == 'Linux' && matrix.arch == 'ARM64' + uses: docker/setup-qemu-action@v3 - name: Build C files + if: ! (runner.os == 'Linux' && matrix.arch == 'ARM64') run: cd extensions && make + - name: Build C files (Linux cross-compilation) + if: runner.os == 'Linux' && matrix.arch == 'ARM64' + run: + cd extensions + docker run --platform linux/arm64 \ + -v .:/extensions \ + debian:slim \ + bash -c "apt-get update && apt-get install -y make gcc && cd /extensions && make" + - name: Commit output files shell: bash run: | diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 3931ca36..73f6355b 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,3 +1,5 @@ +name: Validate code + on: [push, pull_request] jobs: diff --git a/extensions/Makefile b/extensions/Makefile index 1c738ebd..17783e8c 100644 --- a/extensions/Makefile +++ b/extensions/Makefile @@ -4,11 +4,11 @@ OUTPUT := ifeq ($(OS),Windows_NT) OUTPUT = lib/noattach.dll - CCFLAGS = -shared -Wl,--exclude-libs,ALL + CCFLAGS += -shared -Wl,--exclude-libs,ALL CC = clang else UNAME := $(shell uname) - CCFLAGS = -fPIC -Os -shared + CCFLAGS += -fPIC -Os -shared ifeq ($(UNAME),Darwin) ifeq ($(shell uname -m),arm64) OUTPUT = lib/arm/noattach.dylib