Try to setup CI

This commit is contained in:
Arnaud 2025-10-06 08:57:59 +02:00
parent 7e88bddce1
commit 6ec31d6c2f
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F
2 changed files with 36 additions and 2 deletions

34
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Go Tests
on:
push:
branches: master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build libcodex
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake curl git rustc cargo
make update
make libcodex
go build -o codex-go examples/golang/codex.go
- name: Go test
env:
CGO_ENABLED: 1
run: go test ./...

View File

@ -18,9 +18,9 @@ libcodex:
build:
@echo "Building Codex Go Bindings..."
go build ./...
go build -o codex-go examples/golang/codex.go
clean:
@echo "Cleaning up..."
@git submodule deinit -f $(NIM_CODEX_DIR)
@rm -f codex-go-bindings
@rm -f codex-go