.github/workflows: only run bench all on packages with benchmarks

Drops time by several minutes.

Also, on top of that: skip building variant CLIs on the race builder
(29s), and getting qemu (15s).

Updates #9182

Change-Id: I979e02ab8c0daeebf5200459c9e4458a1f62f728
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
bradfitz/wait_unpause
Brad Fitzpatrick 1 year ago committed by Brad Fitzpatrick
parent 96277b63ff
commit 346445acdd

@ -74,6 +74,7 @@ jobs:
env: env:
GOARCH: ${{ matrix.goarch }} GOARCH: ${{ matrix.goarch }}
- name: build variant CLIs - name: build variant CLIs
if: matrix.buildflags == '' # skip on race builder
run: | run: |
export TS_USE_TOOLCHAIN=1 export TS_USE_TOOLCHAIN=1
./build_dist.sh --extra-small ./cmd/tailscaled ./build_dist.sh --extra-small ./cmd/tailscaled
@ -83,7 +84,7 @@ jobs:
env: env:
GOARCH: ${{ matrix.goarch }} GOARCH: ${{ matrix.goarch }}
- name: get qemu # for tstest/archtest - name: get qemu # for tstest/archtest
if: matrix.goarch == 'amd64' && matrix.variant == '' if: matrix.goarch == 'amd64' && matrix.buildflags == ''
run: | run: |
sudo apt-get -y update sudo apt-get -y update
sudo apt-get -y install qemu-user sudo apt-get -y install qemu-user
@ -94,7 +95,7 @@ jobs:
env: env:
GOARCH: ${{ matrix.goarch }} GOARCH: ${{ matrix.goarch }}
- name: bench all - name: bench all
run: ./tool/go test ./... ${{matrix.buildflags}} -bench=. -benchtime=1x -run=^$ run: ./tool/go test ${{matrix.buildflags}} -bench=. -benchtime=1x -run=^$ $(for x in $(git grep -l "^func Benchmark" | xargs dirname | sort | uniq); do echo "./$x"; done)
env: env:
GOARCH: ${{ matrix.goarch }} GOARCH: ${{ matrix.goarch }}
- name: check that no tracked files changed - name: check that no tracked files changed

Loading…
Cancel
Save