-
Notifications
You must be signed in to change notification settings - Fork 1
111 lines (101 loc) · 3.21 KB
/
check.yaml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Check
on:
push:
branches:
- main
- users/nadya73/actions
jobs:
start-vm:
name: Start VM
runs-on: trampoline
outputs:
label: ${{ steps.start-yc-runner.outputs.label }}
instance-id: ${{ steps.start-yc-runner.outputs.instance-id }}
steps:
- name: Start YC runner
id: start-yc-runner
uses: yc-actions/yc-github-runner@v1
with:
mode: start
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
folder-id: ${{ vars.YC_FOLDER_ID }}
image-id: fd8jabqv906r8kc9apg8
zone-id: ${{ vars.YC_ZONE_ID }}
subnet-id: ${{ vars.YC_SUBNET_ID }}
cores: 16
memory: 32GB
core-fraction: 100
disk-type: network-ssd-nonreplicated
disk-size: 279GB
user: ${{ secrets.YC_VM_USERNAME }}
ssh-public-key: ${{ secrets.YC_VM_SSH_PUBLIC_KEY }}
public-ip: false
checkout:
name: Checkout sources
needs: start-vm
runs-on: ${{ needs.start-vm.outputs.label }}
steps:
- name: Checkout ytsaurus-cpp-sdk
uses: actions/checkout@v3
build:
name: Build
needs:
- start-vm
- checkout
runs-on: ${{ needs.start-vm.outputs.label }}
steps:
- name: Build with libstdc++
run: |
mkdir -p ../build_gcc
cd ../build_gcc
rm -rf *
cmake \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=../ytsaurus-cpp-sdk/clang.toolchain \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DREQUIRED_LLVM_TOOLING_VERSION=14 \
-DCMAKE_CXX_FLAGS_INIT="-stdlib=libstdc++" \
../ytsaurus-cpp-sdk
export CCACHE_BASEDIR="$(realpath ..)"
export CCACHE_REMOTE_ONLY=true
export CCACHE_REMOTE_STORAGE="${{ vars.CCACHE_REMOTE_STORAGE }}"
cd ../build_gcc
ninja
- name: Build with libc++
run: |
mkdir -p ../build
cd ../build
rm -rf *
cmake \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=../ytsaurus-cpp-sdk/clang.toolchain \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DREQUIRED_LLVM_TOOLING_VERSION=14 \
-DCMAKE_CXX_FLAGS_INIT="-stdlib=libc++" \
../ytsaurus-cpp-sdk
export CCACHE_BASEDIR="$(realpath ..)"
export CCACHE_REMOTE_ONLY=true
export CCACHE_REMOTE_STORAGE="${{ vars.CCACHE_REMOTE_STORAGE }}"
cd ../build
ninja
stop-vm:
name: Stop VM
needs:
- start-vm
- build
runs-on: trampoline
if: ${{ always() }}
steps:
- name: Stop YC runner
uses: yc-actions/yc-github-runner@v1
with:
mode: stop
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-vm.outputs.label }}
instance-id: ${{ needs.start-vm.outputs.instance-id }}