Skip to content

Commit c091d5f

Browse files
authored
CI: enable codspeed (#15)
Enable codspeed for PR performance tracking Disable tests on s390x and powerpc64-le, just guarantee code still builds
1 parent 660e0d2 commit c091d5f

File tree

7 files changed

+254
-113
lines changed

7 files changed

+254
-113
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ jobs:
6767
matrix:
6868
target: [
6969
aarch64-unknown-linux-gnu,
70-
powerpc64le-unknown-linux-gnu,
71-
s390x-unknown-linux-gnu,
7270
]
7371
steps:
7472
- uses: actions/checkout@v2
@@ -86,6 +84,30 @@ jobs:
8684
command: test
8785
args: --target ${{ matrix.target }} --no-fail-fast --
8886

87+
cross_build:
88+
runs-on: ubuntu-latest
89+
strategy:
90+
fail-fast: false
91+
matrix:
92+
target: [
93+
powerpc64le-unknown-linux-gnu,
94+
s390x-unknown-linux-gnu,
95+
]
96+
steps:
97+
- uses: actions/checkout@v2
98+
99+
- uses: actions-rs/toolchain@v1
100+
with:
101+
toolchain: stable
102+
target: ${{ matrix.target }}
103+
override: true
104+
105+
- name: Run tests
106+
uses: actions-rs/cargo@v1
107+
with:
108+
use-cross: true
109+
command: build
110+
89111
coverage:
90112
runs-on: ubuntu-latest
91113
steps:

.github/workflows/codspeed.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: codspeed-benchmarks
2+
3+
on:
4+
# Run on pushes to the latest branch
5+
push:
6+
branches:
7+
- "latest"
8+
# Run on pull requests
9+
pull_request:
10+
# `workflow_dispatch` allows CodSpeed to trigger backtest
11+
# performance analysis in order to generate initial data.
12+
workflow_dispatch:
13+
14+
jobs:
15+
benchmarks-rust:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Setup rust toolchain, cache and cargo-codspeed binary
21+
uses: moonrepo/setup-rust@v0
22+
with:
23+
channel: stable
24+
cache-target: release
25+
bins: cargo-codspeed
26+
27+
- name: Build the benchmark target(s)
28+
run: cargo codspeed build
29+
30+
- name: Run the benchmarks
31+
uses: CodSpeedHQ/action@v2
32+
with:
33+
run: cargo codspeed run
34+
token: ${{ secrets.CODSPEED_TOKEN }}

0 commit comments

Comments
 (0)