-
Notifications
You must be signed in to change notification settings - Fork 39
120 lines (109 loc) · 4.74 KB
/
build_linux_ubuntu1804.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Build - linux ubuntu1804
on:
release:
types: [created]
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- "tools/**"
- "docs/**"
- ".vscode/**"
- ".devcontainer/**"
- ".github/**"
- "!.github/workflows/build_linux_ubuntu1804.yml"
- "**.md"
jobs:
build-linux-ubuntu1804:
concurrency:
group: build-linux-ubuntu1804-${{ github.head_ref }}-${{ matrix.build_type }}
cancel-in-progress: true
runs-on: ubuntu-22.04
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy:
matrix:
build_type: [release]
container:
image: ghcr.io/ten-framework/ten_building_ubuntu1804
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0"
submodules: "true"
- name: Update version
run: |
git config --global --add safe.directory $(pwd)
python3 tools/version/update_version_in_ten_framework.py
python3 tools/version/check_version_in_ten_framework.py
- name: Install cpulimit and taskset
run: |
apt-get update
apt-get install -y cpulimit util-linux
- name: Build
run: |
export PATH=$(pwd)/core/ten_gn/:$PATH
echo $PATH
go env -w GOFLAGS="-buildvcs=false"
rustup default nightly
tgn gen linux x64 ${{ matrix.build_type }} -- is_clang=false log_level=1 enable_serialized_actions=true ten_enable_integration_tests=false ten_enable_private_tests=false ten_rust_enable_tests=false ten_enable_package_manager=false ten_rust_enable_gen_cargo_config=false
tgn build linux x64 ${{ matrix.build_type }}
tree -I 'gen|obj' out
- name: Run Tests (ten_utils_unit_test)
env:
ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1:color=always:unmap_shadow_on_exit=1:abort_on_error=1
MALLOC_CHECK_: 3
TEN_ENABLE_MEMORY_TRACKING: "true"
TEN_ENABLE_BACKTRACE_DUMP: "true"
run: |
chmod +x out/linux/x64/tests/standalone/ten_utils_unit_test
out/linux/x64/tests/standalone/ten_utils_unit_test || { echo "test failed"; exit 1; }
- name: Run Tests (ten_runtime_unit_test)
env:
ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1:color=always:unmap_shadow_on_exit=1:abort_on_error=1
MALLOC_CHECK_: 3
TEN_ENABLE_MEMORY_TRACKING: "true"
TEN_ENABLE_BACKTRACE_DUMP: "true"
run: |
chmod +x out/linux/x64/tests/standalone/ten_runtime_unit_test
out/linux/x64/tests/standalone/ten_runtime_unit_test || { echo "test failed"; exit 1; }
- name: Run Tests (ten_runtime_smoke_test)
env:
ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1:color=always:unmap_shadow_on_exit=1:abort_on_error=1
MALLOC_CHECK_: 3
TEN_ENABLE_MEMORY_TRACKING: "true"
TEN_ENABLE_BACKTRACE_DUMP: "true"
run: |
chmod +x out/linux/x64/tests/standalone/ten_runtime_smoke_test
out/linux/x64/tests/standalone/ten_runtime_smoke_test || { echo "test failed"; exit 1; }
- name: Upload ten_packages
uses: actions/upload-artifact@v3
with:
name: ten_packages-linux-ubuntu1804-x64-gcc-${{ matrix.build_type }}
path: |
out/linux/x64/ten_packages/system/ten_runtime
out/linux/x64/ten_packages/system/ten_runtime_go
out/linux/x64/ten_packages/system/ten_runtime_python
out/linux/x64/ten_packages/extension/default_extension_cpp
out/linux/x64/ten_packages/extension/default_extension_go
out/linux/x64/ten_packages/extension/default_extension_python
out/linux/x64/ten_packages/extension/default_async_extension_python
out/linux/x64/ten_packages/extension/py_init_extension_cpp
- name: Package assets
if: startsWith(github.ref, 'refs/tags/')
run: |
cd out/linux/x64
zip -vr ten_packages-linux-ubuntu1804-x64-gcc-${{ matrix.build_type }}.zip \
ten_packages/system/ten_runtime \
ten_packages/system/ten_runtime_go \
ten_packages/system/ten_runtime_python \
ten_packages/extension/default_extension_cpp \
ten_packages/extension/default_extension_go \
ten_packages/extension/default_extension_python \
ten_packages/extension/default_async_extension_python \
ten_packages/extension/py_init_extension_cpp
- name: Publish to release assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
out/linux/x64/ten_packages-linux-ubuntu1804-x64-gcc-${{ matrix.build_type }}.zip