-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (44 loc) · 1.2 KB
/
ci.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
name: CI
on:
pull_request: {}
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lint
uses: golangci/[email protected]
with:
version: latest
skip-build-cache: true
skip-pkg-cache: true
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/[email protected]
with:
go-version: 1.22.3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y systemtap-sdt-dev libelf1 libelf-dev
sudo pip install stapsdt black isort
mkdir $GITHUB_WORKSPACE/libstapsdt
git clone https://github.com/linux-usdt/libstapsdt $GITHUB_WORKSPACE/libstapsdt
cd $GITHUB_WORKSPACE/libstapsdt
git reset --hard 5a44c3a5e4b1cdb16e1c02e1cc2474f9ca56d4ff
make
sudo make install
sudo ldconfig
- name: Compile
run: make -C testdata/
- name: Test
run: |
export PATH=${PATH}:`go env GOPATH`/bin
go mod tidy
go test -exec sudo -cover -v ./...