Switch CI to use Makefile and fix sqlite3 cross-compilation flags in DockerfileUnverified
311c22b parent: 17db2c9 modified
.tangled/workflows/ci.yml +2 -2 | @@ -18,7 +18,7 @@ dependencies: | ||
| 18 | 18 | |
| 19 | 19 | steps: |
| 20 | 20 | - name: "Build glean" |
| 21 | - command: "go build -tags fts5 ./..." | |
| 21 | + command: "make build" | |
| 22 | 22 | |
| 23 | 23 | - name: "Run tests" |
| 24 | - command: "go test -tags fts5 ./... -v" | |
| 24 | + command: "make test" | |
| @@ -18,7 +18,7 @@ dependencies: | |||
| 18 | 18 | ||
| 19 | steps: | 19 | steps: |
| 20 | - name: "Build glean" | 20 | - name: "Build glean" |
| 21 | - command: "go build -tags fts5 ./..." | 21 | + command: "make build" |
| 22 | 22 | ||
| 23 | - name: "Run tests" | 23 | - name: "Run tests" |
| 24 | - command: "go test -tags fts5 ./... -v" | 24 | + command: "make test" |
modified
Dockerfile +1 -1 | @@ -13,7 +13,7 @@ COPY . . | ||
| 13 | 13 | RUN npx tailwindcss -i ./static/input.css -o ./static/output.css --minify |
| 14 | 14 | |
| 15 | 15 | RUN --mount=type=cache,target=/root/.cache/go-build \ |
| 16 | - CGO_CFLAGS="-I/src/internal/db/include -I$(go env GOMODCACHE)/github.com/mattn/go-sqlite3@$(grep 'mattn/go-sqlite3' go.mod | awk '{print $2}')" \ | |
| 16 | + CGO_CFLAGS="-I/src/internal/db/include -I$(go env GOMODCACHE)/github.com/mattn/go-sqlite3@$(grep 'mattn/go-sqlite3' go.mod | awk '{print $2}') -Du_int8_t=uint8_t -Du_int16_t=uint16_t -Du_int64_t=uint64_t" \ | |
| 17 | 17 | CGO_ENABLED=1 go build -tags fts5 -ldflags="-s -w" -o /glean . |
| 18 | 18 | |
| 19 | 19 | FROM alpine:3.21 |
| @@ -13,7 +13,7 @@ COPY . . | |||
| 13 | RUN npx tailwindcss -i ./static/input.css -o ./static/output.css --minify | 13 | RUN npx tailwindcss -i ./static/input.css -o ./static/output.css --minify |
| 14 | 14 | ||
| 15 | RUN --mount=type=cache,target=/root/.cache/go-build \ | 15 | RUN --mount=type=cache,target=/root/.cache/go-build \ |
| 16 | - CGO_CFLAGS="-I/src/internal/db/include -I$(go env GOMODCACHE)/github.com/mattn/go-sqlite3@$(grep 'mattn/go-sqlite3' go.mod | awk '{print $2}')" \ | 16 | + CGO_CFLAGS="-I/src/internal/db/include -I$(go env GOMODCACHE)/github.com/mattn/go-sqlite3@$(grep 'mattn/go-sqlite3' go.mod | awk '{print $2}') -Du_int8_t=uint8_t -Du_int16_t=uint16_t -Du_int64_t=uint64_t" \ |
| 17 | CGO_ENABLED=1 go build -tags fts5 -ldflags="-s -w" -o /glean . | 17 | CGO_ENABLED=1 go build -tags fts5 -ldflags="-s -w" -o /glean . |
| 18 | 18 | ||
| 19 | FROM alpine:3.21 | 19 | FROM alpine:3.21 |