Skip to content

docs: refresh benchmark medians after STE and full re-run #60

docs: refresh benchmark medians after STE and full re-run

docs: refresh benchmark medians after STE and full re-run #60

Workflow file for this run

name: jseek CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: test (${{ matrix.os }}, go ${{ matrix.go }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
go: ["1.23.x"]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: true
cache-dependency-path: |
go.mod
go.sum
bench/go.mod
bench/go.sum
- name: Report environment
run: |
go env GOARCH GOOS GOVERSION
go version
- name: Build
run: go build ./...
- name: Vet
run: go vet ./...
- name: Test (default)
run: go test -count=1 ./...
- name: Test (race)
run: go test -race -count=1 ./...
- name: Test (jseeksafe)
run: go test -tags jseeksafe -count=1 ./...
- name: Test (purego)
run: go test -tags purego -count=1 ./...
fuzz-smoke:
name: fuzz smoke (${{ matrix.os }})
needs: [test]
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23.x"
cache: true
cache-dependency-path: go.mod
- name: Fuzz seed corpus
run: |
set -euo pipefail
targets=(
FuzzGetAgainstStdlib
FuzzDocumentMatchesGet
FuzzTapeMatchesGet
FuzzEachKeyMatchesGet
FuzzPinMatchesGet
)
for t in "${targets[@]}"; do
echo "::group::seed $t"
go test -count=1 -run="^${t}$" .
echo "::endgroup::"
done
- name: Fuzz generative smoke
continue-on-error: true
run: |
set -euo pipefail
targets=(
FuzzGetAgainstStdlib
FuzzDocumentMatchesGet
FuzzTapeMatchesGet
FuzzEachKeyMatchesGet
FuzzPinMatchesGet
)
for t in "${targets[@]}"; do
echo "::group::fuzz $t"
go test -run=^$ -fuzz="^${t}$" -fuzztime=3s .
echo "::endgroup::"
done
bench:
name: benchmark (informational)
needs: [test]
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 15
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23.x"
cache: true
cache-dependency-path: |
go.mod
bench/go.mod
bench/go.sum
- name: Run core benchmarks
working-directory: bench
run: |
go test -bench='BenchmarkSmall_|BenchmarkLargeShallow_|BenchmarkLargeIndexed_|BenchmarkLargeArrayEach_' \
-benchmem -benchtime=50ms -count=1 ./...
ci-success:
name: ci success
if: always()
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Require test matrix green
run: |
echo "test result: ${{ needs.test.result }}"
test "${{ needs.test.result }}" = "success"