Skip to content

Commit 5141db8

Browse files
committed
trie benchmarks:
* better auto-push conditional logic * keep max 30 items in chart * upgrade checkout v1 to v2
1 parent 94651f7 commit 5141db8

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

.github/workflows/trie-build.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- uses: actions/setup-node@v1
6464
with:
6565
node-version: 12.x
66-
- uses: actions/checkout@v1
66+
- uses: actions/checkout@v2
6767
with:
6868
submodules: recursive
6969

@@ -86,21 +86,8 @@ jobs:
8686
# Run git stash in case github-action-benchmark has trouble switching to gh-pages branch due to differing package-locks
8787
- run: git stash
8888

89-
- name: Set auto-push for benchmarks to true if on master
90-
id: auto_push
91-
run: |
92-
if [$REF == 'refs/heads/master']
93-
then
94-
echo "::set-output name=auto_push::true"
95-
else
96-
echo "::set-output name=auto_push::false"
97-
fi
98-
env:
99-
REF: ${{ github.ref }}
100-
10189
- name: Compare benchmarks
10290
uses: rhysd/github-action-benchmark@v1
103-
if: github.ref == 'refs/heads/master'
10491
with:
10592
tool: 'benchmarkjs'
10693
# Where the output from the benchmark tool is stored
@@ -112,7 +99,9 @@ jobs:
11299
# GitHub API token to make a commit comment
113100
github-token: ${{ secrets.GITHUB_TOKEN }}
114101
# Push and deploy to GitHub pages branch automatically (if on master)
115-
auto-push: ${{ steps.auto_push.outputs.auto_push }}
102+
auto-push: ${{ github.ref == 'refs/heads/master' }}
103+
# Only keep and display the last 30 commits worth of benchmark data
104+
max-items-in-chart: 30
116105

117106
# Re-apply git stash to prepare for saving back to cache.
118107
# Avoids exit code 1 by checking if there are changes to be stashed first

.github/workflows/vm-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
- uses: actions/setup-node@v1
107107
with:
108108
node-version: 12.x
109-
- uses: actions/checkout@v1
109+
- uses: actions/checkout@v2
110110
with:
111111
submodules: recursive
112112
- name: Dependency cache
@@ -147,7 +147,7 @@ jobs:
147147
- uses: actions/setup-node@v1
148148
with:
149149
node-version: 12.x
150-
- uses: actions/checkout@v1
150+
- uses: actions/checkout@v2
151151
with:
152152
submodules: recursive
153153
- name: Dependency cache

0 commit comments

Comments
 (0)