Some checks failed
Checkout test / test (push) Waiting to run
Documentation / build-and-publish (push) Waiting to run
CI with Native Libraries / test-native (push) Failing after 5m35s
CI with Native Libraries / build-release (push) Has been skipped
Test / test (push) Successful in 1s
76 lines
2 KiB
YAML
76 lines
2 KiB
YAML
name: CI with Native Libraries
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
test-native:
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25'
|
|
|
|
- name: Setup CMake
|
|
run: |
|
|
# Install cmake if not present (adjust for your self-hosted OS)
|
|
which cmake || (apt-get update && apt-get install -y cmake zlib1g-dev 2>/dev/null || brew install cmake zlib)
|
|
|
|
- name: Build Native Libraries
|
|
run: make native-build
|
|
|
|
- name: Test with Native Libraries
|
|
run: FETCHML_NATIVE_LIBS=1 go test -v ./tests/...
|
|
env:
|
|
FETCHML_NATIVE_LIBS: "1"
|
|
|
|
- name: Test Fallback (Go only)
|
|
run: FETCHML_NATIVE_LIBS=0 go test -v ./tests/...
|
|
env:
|
|
FETCHML_NATIVE_LIBS: "0"
|
|
|
|
- name: Run Benchmarks
|
|
run: |
|
|
echo "=== Go Implementation ==="
|
|
FETCHML_NATIVE_LIBS=0 go test -bench=. ./tests/benchmarks/ -benchmem
|
|
echo ""
|
|
echo "=== Native Implementation ==="
|
|
FETCHML_NATIVE_LIBS=1 go test -bench=. ./tests/benchmarks/ -benchmem
|
|
|
|
- name: Lint
|
|
run: |
|
|
make lint || true
|
|
|
|
build-release:
|
|
runs-on: self-hosted
|
|
needs: test-native
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25'
|
|
|
|
- name: Setup Build Tools
|
|
run: |
|
|
which cmake || (apt-get update && apt-get install -y cmake zlib1g-dev 2>/dev/null || brew install cmake zlib)
|
|
|
|
- name: Build Release Libraries
|
|
run: make native-release
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: native-libs-${{ runner.os }}-${{ runner.arch }}
|
|
path: |
|
|
native/build/lib*.so
|
|
native/build/lib*.dylib
|