Skip to content

Commit

Permalink
GH-36218: [CI][Go] Run benchmark steps only on the main branch (#36219)
Browse files Browse the repository at this point in the history
### Rationale for this change

Because our benchmark tool supports only the main branch.

### What changes are included in this PR?

Add branch name check to the existing `if:`s.

### Are these changes tested?

No.

### Are there any user-facing changes?

No.
* Closes: #36218 

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
  • Loading branch information
kou committed Jun 22, 2023
1 parent 03bd17d commit 5a58f75
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/go.yml
Expand Up @@ -106,7 +106,8 @@ jobs:
success() &&
matrix.arch == 'amd64' &&
github.event_name == 'push' &&
github.repository == 'apache/arrow'
github.repository == 'apache/arrow' &&
github.ref_name == 'main'
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
Expand All @@ -132,13 +133,13 @@ jobs:
name: Go Cross-build for 386
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
timeout-minutes: 20
timeout-minutes: 20
steps:
- name: Checkout Arrow
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Go
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.18
Expand Down Expand Up @@ -311,12 +312,20 @@ jobs:
shell: bash
run: ci/scripts/go_test.sh $(pwd)
- name: Setup Python
if: success() && github.event_name == 'push' && github.repository == 'apache/arrow'
if: >-
success() &&
github.event_name == 'push' &&
github.repository == 'apache/arrow' &&
github.ref_name == 'main'
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run Benchmarks
if: success() && github.event_name == 'push' && github.repository == 'apache/arrow'
if: >-
success() &&
github.event_name == 'push' &&
github.repository == 'apache/arrow' &&
github.ref_name == 'main'
shell: bash
env:
CONBENCH_URL: 'https://conbench.ursa.dev'
Expand Down

0 comments on commit 5a58f75

Please sign in to comment.