Skip to content

Commit bcd72c3

Browse files
committed
chore(actions): add cli ci/cd workflow
1 parent db3131f commit bcd72c3

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/ci-cli.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CI CLI
2+
3+
on:
4+
push:
5+
paths:
6+
- 'pyroscope_cli/**'
7+
- '.github/workflows/ci-cli.yml'
8+
pull_request:
9+
paths:
10+
- 'pyroscope_cli/**'
11+
- '.github/workflows/ci-cli.yml'
12+
13+
14+
jobs:
15+
build:
16+
name: ${{ matrix.os }} - ${{ matrix.target }}
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
os: [ubuntu-latest, macos-latest]
21+
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin]
22+
exclude:
23+
- os: ubuntu-latest
24+
target: x86_64-apple-darwin
25+
- os: ubuntu-latest
26+
target: aarch64-apple-darwin
27+
- os: macos-latest
28+
target: x86_64-unknown-linux-gnu
29+
- os: macos-latest
30+
target: aarch64-unknown-linux-gnu
31+
steps:
32+
- name: install libunwind (for pprof and pyspy)
33+
if: matrix.os == 'ubuntu-latest'
34+
continue-on-error: true
35+
run: sudo apt install libunwind8-dev
36+
37+
- name: Checkout sources
38+
uses: actions/checkout@v2
39+
40+
- name: Install stable toolchain
41+
uses: omarabid-forks/rs-toolchain@v1
42+
with:
43+
profile: minimal
44+
toolchain: stable
45+
override: true
46+
47+
- name: Cargo build for pyroscope-cli
48+
uses: omarabid-forks/rs-cargo@v1
49+
with:
50+
args: --manifest-path pyroscope_cli/Cargo.toml
51+
command: build
52+
53+
- name: Tests for pyroscope-cli
54+
uses: omarabid-forks/rs-cargo@v1
55+
with:
56+
args: --manifest-path pyroscope_cli/Cargo.toml
57+
command: test

0 commit comments

Comments
 (0)