1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 05:14:03 +00:00

ci: try to get linux cross-compilation working

This commit is contained in:
Samuel Štancl 2025-01-02 08:41:50 +01:00
parent aca23594ad
commit 88855ec568
4 changed files with 18 additions and 6 deletions

View file

@ -1,4 +1,4 @@
name: CI
name: Tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -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: |

View file

@ -1,3 +1,5 @@
name: Validate code
on: [push, pull_request]
jobs:

View file

@ -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