diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e9b2462 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 ./... \ No newline at end of file diff --git a/Makefile b/Makefile index cc1a67c..0c93e96 100644 --- a/Makefile +++ b/Makefile @@ -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 \ No newline at end of file + @rm -f codex-go \ No newline at end of file