From 095ffed06407ba44384e9e5506b6a5d7d8350abf Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 6 Oct 2025 11:45:52 +0200 Subject: [PATCH] Setup CI --- .github/workflows/ci.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9b2462..07f781f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,15 +20,30 @@ jobs: with: go-version-file: go.mod + - name: Record submodule commit + run: git -C vendor/nim-codex rev-parse HEAD > vendor/nim-codex/.codex-commit + + - name: Cache libcodex build + id: cache-libcodex + uses: actions/cache@v4 + with: + path: vendor/nim-codex/build + key: ${{ runner.os }}-libcodex-${{ hashFiles('vendor/nim-codex/.codex-commit') }} + - name: Build libcodex + if: steps.cache-libcodex.outputs.cache-hit != 'true' 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: Build codex go + run: | + cd codex + go build -o codex-go - name: Go test env: CGO_ENABLED: 1 - run: go test ./... \ No newline at end of file + run: go test ./...