mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-07-09 03:58:34 +00:00
Merge pull request #366 from ahrtr/workflow_windows_20221227
Support running workflow on Windows-latest
This commit is contained in:
commit
5dbd2ec7f3
7
.github/workflows/tests.yaml
vendored
7
.github/workflows/tests.yaml
vendored
@ -2,7 +2,10 @@ name: Tests
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
@ -12,4 +15,4 @@ jobs:
|
||||
- run: make race
|
||||
- run: make test
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # v3.3.1
|
||||
|
4
Makefile
4
Makefile
@ -14,12 +14,12 @@ lint:
|
||||
golangci-lint run ./...
|
||||
|
||||
test:
|
||||
TEST_FREELIST_TYPE=hashmap go test -timeout 20m -v -coverprofile cover.out -covermode atomic
|
||||
TEST_FREELIST_TYPE=hashmap go test -timeout 30m -v -coverprofile cover.out -covermode atomic
|
||||
TEST_FREELIST_TYPE=hashmap go test -v ./cmd/bbolt
|
||||
|
||||
@echo "array freelist test"
|
||||
|
||||
@TEST_FREELIST_TYPE=array go test -timeout 20m -v -coverprofile cover.out -covermode atomic
|
||||
@TEST_FREELIST_TYPE=array go test -timeout 30m -v -coverprofile cover.out -covermode atomic
|
||||
@TEST_FREELIST_TYPE=array go test -v ./cmd/bbolt
|
||||
|
||||
.PHONY: race fmt test lint
|
||||
|
3
db.go
3
db.go
@ -129,6 +129,9 @@ type DB struct {
|
||||
path string
|
||||
openFile func(string, int, os.FileMode) (*os.File, error)
|
||||
file *os.File
|
||||
// `dataref` isn't used at all on Windows, and the golangci-lint
|
||||
// always fails on Windows platform.
|
||||
//nolint
|
||||
dataref []byte // mmap'ed readonly, write throws SEGV
|
||||
data *[maxMapSize]byte
|
||||
datasz int
|
||||
|
Loading…
x
Reference in New Issue
Block a user