Skip to content

Commit

Permalink
feat: add check graph cmd and integration tests
Browse files Browse the repository at this point in the history
feat: upload runtime only, ignore others (#93)

fix: no need to package src (#92)

feat: add a python script for auto update package versions according … (#85)

Co-authored-by: Hu Yueh-Wei <[email protected]>

docs: updating ten_agent_server from astra_agents_dev (#95)

* docs: updating ten_agent_server from astra_agents_dev

Updating ten_agent_server from astra_agents_dev

* docs: fixing typo

Fixing typo

fix: fix some integration test cases (#94)

feat: add cargo config auto-gen (#51)

Co-authored-by: Hu Yueh-Wei <[email protected]>

chore: update version and publish to cloud store automatically (#97)

Co-authored-by: Hu Yueh-Wei <[email protected]>

fix: forked repo can not get version since tag is not synced (#99)

doc: update summary part

feat: add linux/arm64 (#98)

Co-authored-by: Hu Yueh-Wei <[email protected]>

chore: update to latest ten_gn

chore: add more CI test cases (#136)

chore: enable more CI test cases (#137)

feat: add a python script to update "supports" in manifest (#138)

feat: add async extension in Python binding in order to use asyncio m… (#91)

Co-authored-by: Hu Yueh-Wei <[email protected]>

chore: disable auto-added supports field in GN build flow

fix: check the app in graph

fix: help message
  • Loading branch information
leoadonia authored and halajohn committed Oct 15, 2024
1 parent 3be172e commit c75f20d
Show file tree
Hide file tree
Showing 254 changed files with 5,395 additions and 855 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ jobs:
include:
- image_name: "ubuntu2204"
workdir: "tools/docker_for_building/ubuntu/22.04"
platforms: linux/amd64,linux/arm64
- image_name: "ubuntu1804"
workdir: "tools/docker_for_building/ubuntu/18.04"
platforms: linux/amd64
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build & Publish to Github Container Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -33,5 +38,6 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: ${{ matrix.workdir }}
platforms: ${{ matrix.platforms }}
snapshot: true
tags: "${{ github.ref == 'refs/heads/main' && 'latest,' || '' }}"
99 changes: 99 additions & 0 deletions .github/workflows/build_linux_arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Build - linux arm64

on:
release:
types: [created]
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- "tools/**"
- "docs/**"
- ".vscode/**"
- ".devcontainer/**"
- ".github/**"
- "!.github/workflows/build_linux_arm64.yml"
- "**.md"

jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: build-linux-arm64-${{ github.head_ref }}-${{ matrix.compiler }}-${{ matrix.build_type }}
cancel-in-progress: true
strategy:
matrix:
compiler: [gcc]
build_type: [release]
steps:
- uses: actions/checkout@v4
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: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Build
run: |
docker run --rm --platform linux/arm64 \
-v $(pwd):/${{ github.workspace }} -w ${{ github.workspace }} \
ghcr.io/ten-framework/ten_building_ubuntu2204 \
bash -c "\
export PATH=$(pwd)/core/ten_gn:/usr/local/go/bin:/root/go/bin:/root/.cargo/bin:$PATH && \
echo $PATH && \
go env -w GOFLAGS="-buildvcs=false" && \
go1.20.12 download && \
rustup default nightly && \
tgn gen linux arm64 ${{ matrix.build_type }} -- is_clang=${{ matrix.compiler == 'gcc' && 'false' || 'true' }} log_level=1 enable_serialized_actions=true ten_enable_tests=false ten_enable_libwebsockets=false && \
tgn build linux arm64 ${{ matrix.build_type }} && \
tree -I 'gen|obj' out \
"
- name: Upload tman
uses: actions/upload-artifact@v4
with:
name: tman-linux-arm64-${{ matrix.compiler }}-${{ matrix.build_type }}
path: out/linux/arm64/ten_manager/bin/tman

- name: Upload ten_packages
uses: actions/upload-artifact@v4
with:
name: ten_packages-linux-arm64-${{ matrix.compiler }}-${{ 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/arm64/ten_packages/extension/default_extension_cpp
out/linux/arm64/ten_packages/extension/default_extension_go
out/linux/arm64/ten_packages/extension/default_extension_python
out/linux/arm64/ten_packages/extension/py_init_extension_cpp
- name: Package assets
if: startsWith(github.ref, 'refs/tags/')
run: |
cd out/linux/arm64
zip -vr tman-linux-arm64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip ten_manager/bin/tman
zip -vr ten_packages-linux-arm64-${{ matrix.compiler }}-${{ 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/py_init_extension_cpp
- name: Publish to release assets
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
out/linux/arm64/tman-linux-arm64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip
out/linux/arm64/ten_packages-linux-arm64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip
32 changes: 15 additions & 17 deletions .github/workflows/build_linux_ubuntu1804.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,8 @@ name: Build - linux ubuntu1804
on:
release:
types: [created]
push:
branches:
- "**"
paths-ignore:
- "tools/**"
- "docs/**"
- ".vscode/**"
- ".devcontainer/**"
- ".github/**"
- "!.github/workflows/build_linux_ubuntu1804.yml"
- "**.md"
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- "tools/**"
- "docs/**"
Expand Down Expand Up @@ -43,6 +33,12 @@ jobs:
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
Expand All @@ -54,7 +50,7 @@ jobs:
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
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
Expand Down Expand Up @@ -113,8 +109,9 @@ jobs:
with:
name: ten_packages-linux-ubuntu1804-x64-gcc-${{ matrix.build_type }}
path: |
out/linux/x64/ten_packages/system
out/linux/x64/ten_packages/extension_group
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
Expand All @@ -125,14 +122,15 @@ jobs:
run: |
cd out/linux/x64
zip -vr ten_packages-linux-ubuntu1804-x64-gcc-${{ matrix.build_type }}.zip \
ten_packages/system \
ten_packages/extension_group \
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/py_init_extension_cpp
- name: Release assets
- name: Publish to release assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
Expand Down
56 changes: 39 additions & 17 deletions .github/workflows/build_linux_ubuntu2204.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,8 @@ name: Build - linux ubuntu2204
on:
release:
types: [created]
push:
branches:
- "**"
paths-ignore:
- "tools/**"
- "docs/**"
- ".vscode/**"
- ".devcontainer/**"
- ".github/**"
- "!.github/workflows/build_linux_ubuntu2204.yml"
- "**.md"
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- "tools/**"
- "docs/**"
Expand Down Expand Up @@ -42,6 +32,12 @@ jobs:
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
Expand All @@ -54,7 +50,7 @@ jobs:
go env -w GOFLAGS="-buildvcs=false"
go1.20.12 download
rustup default nightly
tgn gen linux x64 ${{ matrix.build_type }} -- is_clang=${{ matrix.compiler == 'gcc' && 'false' || 'true' }} log_level=1 enable_serialized_actions=true ten_enable_integration_tests=false ten_enable_private_tests=false ten_rust_enable_tests=false ten_package_manager_enable_tests=false
tgn gen linux x64 ${{ matrix.build_type }} -- is_clang=${{ matrix.compiler == 'gcc' && 'false' || 'true' }} log_level=1 enable_serialized_actions=true ten_enable_integration_tests=false ten_enable_private_tests=false ten_rust_enable_tests=false ten_package_manager_enable_tests=false ten_rust_enable_gen_cargo_config=false
tgn build linux x64 ${{ matrix.build_type }}
tree -I 'gen|obj' out
Expand Down Expand Up @@ -119,8 +115,9 @@ jobs:
with:
name: ten_packages-linux-x64-${{ matrix.compiler }}-${{ matrix.build_type }}
path: |
out/linux/x64/ten_packages/system
out/linux/x64/ten_packages/extension_group
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
Expand All @@ -132,17 +129,42 @@ jobs:
cd out/linux/x64
zip -vr tman-linux-x64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip ten_manager/bin/tman
zip -vr ten_packages-linux-x64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip \
ten_packages/system \
ten_packages/extension_group \
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/py_init_extension_cpp
- name: Release assets
- name: Publish to release assets
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
out/linux/x64/tman-linux-x64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip
out/linux/x64/ten_packages-linux-x64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip
- name: Publish release to TEN cloud store
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.compiler == 'gcc' && matrix.build_type == 'release' }}
run: |
TMAN_BIN=$(pwd)/out/linux/x64/ten_manager/bin/tman
cd out/linux/x64/ten_packages
ARRAY=(
"system/ten_runtime"
"system/ten_runtime_go"
"system/ten_runtime_python"
"extension/default_extension_cpp"
"extension/default_extension_go"
"extension/default_extension_python"
"extension/py_init_extension_cpp"
)
for item in "${ARRAY[@]}"; do
echo $item
cd $item
${TMAN_BIN} --verbose --user-token ${{ secrets.TEN_CLOUD_STORE }} publish
cd -
done
shell: bash
52 changes: 21 additions & 31 deletions .github/workflows/build_mac.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
name: Build - mac

on:
push:
branches:
- "**"
paths-ignore:
- "tools/**"
- "docs/**"
- ".vscode/**"
- ".devcontainer/**"
- ".github/**"
- "!.github/workflows/build_mac.yml"
- "**.md"
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- "tools/**"
- "docs/**"
Expand Down Expand Up @@ -86,19 +76,19 @@ jobs:
fi
export PATH=$(pwd)/core/ten_gn:$PATH
echo $PATH
tgn gen mac arm64 ${{ matrix.build_type }} -- log_level=1 enable_serialized_actions=true ten_enable_integration_tests=false ten_enable_private_tests=false ten_rust_enable_tests=false
tgn gen mac arm64 ${{ matrix.build_type }} -- log_level=1 enable_serialized_actions=true ten_enable_integration_tests=false ten_enable_private_tests=false ten_rust_enable_tests=false ten_rust_enable_gen_cargo_config=false
tgn build mac arm64 ${{ matrix.build_type }}
tree -I 'gen|obj' out
# - name: Run Tests (ten_utils_unit_test)
# env:
# ASAN_OPTIONS: 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/mac/arm64/tests/standalone/ten_utils_unit_test
# out/mac/arm64/tests/standalone/ten_utils_unit_test
- name: Run Tests (ten_utils_unit_test)
env:
ASAN_OPTIONS: 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/mac/arm64/tests/standalone/ten_utils_unit_test
out/mac/arm64/tests/standalone/ten_utils_unit_test
- name: Run Tests (ten_runtime_unit_test)
env:
Expand All @@ -110,15 +100,15 @@ jobs:
chmod +x out/mac/arm64/tests/standalone/ten_runtime_unit_test
out/mac/arm64/tests/standalone/ten_runtime_unit_test
# - name: Run Tests (ten_runtime_smoke_test)
# env:
# ASAN_OPTIONS: 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/mac/arm64/tests/standalone/ten_runtime_smoke_test
# out/mac/arm64/tests/standalone/ten_runtime_smoke_test
- name: Run Tests (ten_runtime_smoke_test)
env:
ASAN_OPTIONS: 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/mac/arm64/tests/standalone/ten_runtime_smoke_test
out/mac/arm64/tests/standalone/ten_runtime_smoke_test
build-mac-x64:
concurrency:
Expand Down Expand Up @@ -183,7 +173,7 @@ jobs:
fi
export PATH=$(pwd)/core/ten_gn:$PATH
echo $PATH
tgn gen mac x64 ${{ matrix.build_type }} -- log_level=1 enable_serialized_actions=true ten_enable_integration_tests=false ten_enable_private_tests=false ten_rust_enable_tests=false ten_package_manager_enable_tests=false
tgn gen mac x64 ${{ matrix.build_type }} -- log_level=1 enable_serialized_actions=true ten_enable_integration_tests=false ten_enable_private_tests=false ten_rust_enable_tests=false ten_package_manager_enable_tests=false ten_rust_enable_gen_cargo_config=false
tgn build mac x64 ${{ matrix.build_type }}
tree -I 'gen|obj' out
Expand Down
Loading

0 comments on commit c75f20d

Please sign in to comment.