mirror of https://github.com/etcd-io/bbolt.git
Merge pull request #366 from ahrtr/workflow_windows_20221227
Support running workflow on Windows-latestpull/367/head
commit
5dbd2ec7f3
|
@ -2,7 +2,10 @@ name: Tests
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v3
|
||||||
|
@ -12,4 +15,4 @@ jobs:
|
||||||
- run: make race
|
- run: make race
|
||||||
- run: make test
|
- run: make test
|
||||||
- name: golangci-lint
|
- 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 ./...
|
golangci-lint run ./...
|
||||||
|
|
||||||
test:
|
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
|
TEST_FREELIST_TYPE=hashmap go test -v ./cmd/bbolt
|
||||||
|
|
||||||
@echo "array freelist test"
|
@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
|
@TEST_FREELIST_TYPE=array go test -v ./cmd/bbolt
|
||||||
|
|
||||||
.PHONY: race fmt test lint
|
.PHONY: race fmt test lint
|
||||||
|
|
3
db.go
3
db.go
|
@ -129,6 +129,9 @@ type DB struct {
|
||||||
path string
|
path string
|
||||||
openFile func(string, int, os.FileMode) (*os.File, error)
|
openFile func(string, int, os.FileMode) (*os.File, error)
|
||||||
file *os.File
|
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
|
dataref []byte // mmap'ed readonly, write throws SEGV
|
||||||
data *[maxMapSize]byte
|
data *[maxMapSize]byte
|
||||||
datasz int
|
datasz int
|
||||||
|
|
Loading…
Reference in New Issue