-
Notifications
You must be signed in to change notification settings - Fork 36
47 lines (38 loc) · 1.16 KB
/
benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Benchmark
on:
push:
branches:
- "benchmark/*"
pull_request:
branches:
- "benchmark/*"
defaults:
run:
shell: bash
jobs:
benchmark:
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
steps:
- name: Set flag environment variable
run: |
echo "OS=$(echo ${{ runner.os }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "GO_VERSION=$(echo ${{ matrix.go-version }} | cut -d. -f-2)" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: '1.20.x'
- name: Install nvim binary
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: v0.9.1
- name: Run Benchmark
run: |
go test -v -count=3 -run=none -bench=. -benchmem -timeout=15m ./... | tee bench-${{ env.OS }}-${{ env.GO_VERSION }}.txt
- name: 'Upload benchmark Artifact'
uses: actions/upload-artifact@v3
with:
name: bench-${{ env.OS }}-${{ env.GO_VERSION }}.txt
path: bench-${{ env.OS }}-${{ env.GO_VERSION }}.txt