Skip to content

Commit 461b573

Browse files
committed
CI: Run devhub on GitHub Actions
1 parent 68818c3 commit 461b573

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/bench.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,47 @@ jobs:
2424
2525
- name: Benchmark
2626
run: |
27+
set -x
2728
cargo benchmark --bench instruction-count --features gungraun
29+
cargo benchmark --bench instruction-count --features gungraun -- --output-format=json > gungraun-output.json
30+
cat gungraun-output.json
31+
32+
- uses: actions/upload-artifact@v6
33+
if: ${{ github.event_name == 'pull_request' }}
34+
with:
35+
name: gungraun-output
36+
path: gungraun-output.json
37+
38+
- name: Prepare devhub
39+
run: |
40+
cargo install tokei --version 14.0.0
41+
cargo install ripgrep --version 15.1.0
42+
43+
wget https://github.com/jqlang/jq/releases/download/jq-1.8.1/jq-linux-amd64 -O jq
44+
echo "020468de7539ce70ef1bceaf7cde2e8c4f2ca6c3afb84642aabc5c97d9fc2a0d jq" | sha256sum -c
45+
mv jq $HOME/.cargo/bin/jq
46+
chmod +x $HOME/.cargo/bin/jq
47+
48+
- name: Show dependencies
49+
run: |
50+
set -x
51+
rustc -vV
52+
cargo -vV
53+
valgrind --version
54+
tokei --version
55+
rg --version
56+
jq --version
57+
58+
- name: Run devhub
59+
run: |
60+
echo "commit sha ${GITHUB_SHA}"
61+
cargo devhub run
62+
cat data.json
63+
64+
- name: Commit new devhub data
65+
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
66+
env:
67+
DEVHUBDB_TOKEN: ${{ secrets.DEVHUBDB_PAT }}
68+
run: |
69+
git config --global user.name "Devhub Bot"
70+
cargo devhub commit data.json

0 commit comments

Comments
 (0)