forked from parca-dev/parca-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (75 loc) · 2.39 KB
/
docs.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Documents
on:
push:
branches: [ main ]
paths:
pull_request:
branches: [ main ]
jobs:
skip-check:
name: Skip check
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip-check.outputs.should_skip }}
permissions:
actions: write
contents: read
steps:
- id: skip-check
uses: fkirc/skip-duplicate-actions@9d116fa7e55f295019cfab7e3ab72b478bcf7fdd # tag=v4.0.0
with:
do_not_skip: '["schedule", "workflow_dispatch"]'
paths: |-
[
".github/workflows/docs.yml",
".go-version",
"cmd/parca-agent/main.go",
"docs"
]
skip_after_successful_duplicate: false
docs:
name: Generate documentation
needs: skip-check
if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
- name: Set up Go
uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 # tag=v3.2.0
with:
go-version-file: .go-version
cache: true
- name: Set up Rust
run: rustup show
- name: Rust cache
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # tag=v1.4.0
with:
working-directory: ./bpf
- name: Install LLVM (Aya, BPF dependency)
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo -e "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main\n" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-get update -y
sudo apt-get install -yq llvm-14-dev libclang-14-dev
- name: Run eBPF toolchain setup
run: |
make -C bpf setup
cd bpf && cargo check
- name: Build BPF
run: make bpf
- name: Install libbpf dependencies
run: |
sudo apt-get update -y
sudo apt-get install -yq libelf-dev zlib1g-dev
- name: Initialize and update libbpf submodule
run: git submodule init && git submodule update
- name: Set up Jsonnet
run: ./env.sh
- name: Build
run: make build
- name: Docs check
run: |
make README.md
git diff --exit-code ':!deploy'