From 346445acddc18377e3efd1bdf2fc7a0e069d992a Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 31 Aug 2023 21:36:07 -0700 Subject: [PATCH] .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 --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6674fa47..e58b6ca4b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,6 +74,7 @@ jobs: env: GOARCH: ${{ matrix.goarch }} - name: build variant CLIs + if: matrix.buildflags == '' # skip on race builder run: | export TS_USE_TOOLCHAIN=1 ./build_dist.sh --extra-small ./cmd/tailscaled @@ -83,7 +84,7 @@ jobs: env: GOARCH: ${{ matrix.goarch }} - name: get qemu # for tstest/archtest - if: matrix.goarch == 'amd64' && matrix.variant == '' + if: matrix.goarch == 'amd64' && matrix.buildflags == '' run: | sudo apt-get -y update sudo apt-get -y install qemu-user @@ -94,7 +95,7 @@ jobs: env: GOARCH: ${{ matrix.goarch }} - 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: GOARCH: ${{ matrix.goarch }} - name: check that no tracked files changed