name: Benchmark on: schedule: - cron: '0 5 * * 1' workflow_dispatch: {} jobs: build: runs-on: ubuntu-latest strategy: matrix: go: [ '1.17.x', '1.16.x' ] name: "Test [ Go ${{ matrix.go }} / JSON Backend ${{ matrix.json_backend }} ]" steps: - name: Checkout repository uses: actions/checkout@v2 - name: Cache Go modules uses: actions/cache@v2 with: path: | ~/go/pkg/mod ~/.cache/go-build key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - name: Install Go stable version uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }} - name: Install benchstat run: | go install golang.org/x/perf/cmd/benchstat@latest - name: Benchmark (comparison) run: | cd bench/comparison && make stdlib && make goccy - name: Benchmark (performance) run: | cd bench/performance && make stdlib && make goccy && make benchstat