Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Test
on: [ push ]
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

# Least-privilege token: the test jobs only read the checkout.
permissions:
Expand All @@ -22,6 +26,22 @@ jobs:
go-version: '1.25'

- run: make race
- run: make cc-warnings

gcc15:
runs-on: ubuntu-latest
container: gcc:15

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version: '1.25'

- run: make race
- run: make cc-warnings

win:
strategy:
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

.PHONY: deps all test race bin cp
.PHONY: deps all test race cc-warnings bin cp

MASTER_COMMIT=`git rev-parse --short origin/master`

Expand All @@ -14,6 +14,10 @@ test:
race:
go test -race ./mdbx ./exp/mdbxpool

# -a: a cached build does not run the C compiler, so it shows no warnings.
cc-warnings:
@out=$$(go build -a ./mdbx 2>&1) || { echo "$$out"; exit 1; }; echo "$$out"; ! echo "$$out" | grep -q 'warning:'

lint:
./build/bin/golangci-lint run ./...

Expand Down
Loading