Skip to content

Commit 5c807f8

Browse files
committed
Add workflows
commit_hash:b92f2dc7ec8029457b49fac9268c5d5a42aceb5e
1 parent 2da0374 commit 5c807f8

File tree

3 files changed

+129
-0
lines changed

3 files changed

+129
-0
lines changed

.github/workflows/postcommit.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
jobs:
6+
ya:
7+
name: Postcommit checks
8+
runs-on: ubuntu-24.04
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: tespkg/actions-cache@91b54a6e03abb8fcec12d3743633d23a1cfcd269
12+
with:
13+
endpoint: storage.yandexcloud.net
14+
accessKey: ${{ secrets.CACHE_ACCESS_KEY }}
15+
secretKey: ${{ secrets.CACHE_SECRET_KEY }}
16+
bucket: ${{ secrets.CACHE_BUCKET }}
17+
# Don't bother trying github cache, we don't fit in its 10GB limit
18+
use-fallback: false
19+
key: v1-${{ github.sha }}
20+
restore-keys: |
21+
v1-
22+
path: ~/.ya/build
23+
- name: Run ya make
24+
run: ./ya make ./perforator -DCI=github -DSTRIP -r --musl
25+

.github/workflows/release.yaml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
on:
2+
release:
3+
types:
4+
# TODO: is this right?
5+
- created
6+
jobs:
7+
build:
8+
runs-on: ubuntu-24.04
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: tespkg/actions-cache/restore@91b54a6e03abb8fcec12d3743633d23a1cfcd269
12+
with:
13+
endpoint: storage.yandexcloud.net
14+
accessKey: ${{ secrets.CACHE_ACCESS_KEY }}
15+
secretKey: ${{ secrets.CACHE_SECRET_KEY }}
16+
bucket: ${{ secrets.CACHE_BUCKET }}
17+
# Don't bother trying github cache, we don't fit in its 10GB limit
18+
use-fallback: false
19+
key: v1-${{ github.sha }}
20+
restore-keys: |
21+
v1-
22+
path: ~/.ya/build
23+
- name: Build binaries
24+
run: |
25+
./ya make -r --musl -DSTRIP ./perforator/bundle
26+
- uses: actions/upload-artifact@v4
27+
with:
28+
name: binaries
29+
path: ./perforator/bundle
30+
build-autofdo:
31+
runs-on: ubuntu-24.04
32+
steps:
33+
- uses: actions/cache@v4
34+
with:
35+
path: ./autofdo/build
36+
key: v1-${{ github.sha }}
37+
restore-keys: |
38+
v1-
39+
- name: Build AutoFDO
40+
run: |
41+
sudo apt-get update
42+
sudo apt-get install -y libunwind-dev libgflags-dev libssl-dev libelf-dev protobuf-compiler \
43+
cmake libzstd-dev clang g++ git build-essential
44+
git clone --recursive --depth 1 https://github.com/google/autofdo.git
45+
cd autofdo
46+
git checkout 8f9ab68921f364a6433086245ca3f19befacfeb1
47+
git submodule update --init --recursive
48+
mkdir build
49+
cd build
50+
cmake -DENABLE_TOOL=LLVM -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release ../
51+
make -j $(nproc) create_llvm_prof
52+
- uses: actions/upload-artifact@v4
53+
with:
54+
name: autofdo
55+
path: ./autofdo/build/create_llvm_prof
56+
release-cli:
57+
runs-on: ubuntu-24.04
58+
needs:
59+
- build
60+
steps:
61+
- uses: actions/download-artifact@v4
62+
with:
63+
name: binaries
64+
- name: Attach binaries to release
65+
run: |
66+
chmod +x ./cli
67+
chmod +x ./migrate
68+
gh -R ${{ github.repository }} release upload ${{ github.event.release.tag_name }} ./cli ./migrate
69+
env:
70+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
release-images:
72+
runs-on: ubuntu-24.04
73+
needs:
74+
- build
75+
- build-autofdo
76+
steps:
77+
- uses: actions/checkout@v4
78+
- uses: actions/download-artifact@v4
79+
with:
80+
name: binaries
81+
path: dist
82+
- uses: actions/download-artifact@v4
83+
with:
84+
name: autofdo
85+
- name: Log in to registry
86+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
87+
- name: Build and push images
88+
run: |
89+
mv ./create_llvm_prof ./dist/
90+
chmod +x ./dist/create_llvm_prof
91+
function build {
92+
chmod +x ./dist/$1
93+
docker build -f perforator/deploy/docker/Dockerfile.prebuilt --target $1 --push --tag ghcr.io/${{ github.repository }}/$1:${{ github.event.release.tag_name }} ./dist
94+
}
95+
build agent
96+
build gc
97+
build migrate
98+
build offline_processing
99+
build proxy
100+
build storage
101+
build web
102+

.mapping.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
".":"perforator/opensource/github_toplevel",
3+
".github/workflows/postcommit.yaml":"perforator/opensource/github_toplevel/.github/workflows/postcommit.yaml",
4+
".github/workflows/release.yaml":"perforator/opensource/github_toplevel/.github/workflows/release.yaml",
35
"CONTRIBUTING.md":"perforator/opensource/github_toplevel/CONTRIBUTING.md",
46
"LICENSE":"perforator/opensource/github_toplevel/LICENSE",
57
"README.md":"perforator/opensource/github_toplevel/README.md",

0 commit comments

Comments
 (0)