diff --git a/.github/workflows/build_linux_ubuntu1804.yml b/.github/workflows/build_linux_ubuntu1804.yml index c3fb48650..fc7714c97 100644 --- a/.github/workflows/build_linux_ubuntu1804.yml +++ b/.github/workflows/build_linux_ubuntu1804.yml @@ -46,10 +46,19 @@ 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_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 tgn build linux x64 ${{ matrix.build_type }} tree -I 'gen|obj' out + - name: Run Tests + run: | + chmod +x out/linux/x64/tests/standalone/ten_utils_unit_test + out/linux/x64/tests/standalone/ten_utils_unit_test + chmod +x out/linux/x64/tests/standalone/ten_runtime_unit_test + out/linux/x64/tests/standalone/ten_runtime_unit_test + chmod +x out/linux/x64/tests/standalone/ten_runtime_smoke_test + out/linux/x64/tests/standalone/ten_runtime_smoke_test + - name: Upload ten_packages uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/build_linux_ubuntu2204.yml b/.github/workflows/build_linux_ubuntu2204.yml index 8a5058697..b019971a6 100644 --- a/.github/workflows/build_linux_ubuntu2204.yml +++ b/.github/workflows/build_linux_ubuntu2204.yml @@ -46,10 +46,19 @@ 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_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 tgn build linux x64 ${{ matrix.build_type }} tree -I 'gen|obj' out + - name: Run Tests + run: | + chmod +x out/linux/x64/tests/standalone/ten_utils_unit_test + out/linux/x64/tests/standalone/ten_utils_unit_test + chmod +x out/linux/x64/tests/standalone/ten_runtime_unit_test + out/linux/x64/tests/standalone/ten_runtime_unit_test + chmod +x out/linux/x64/tests/standalone/ten_runtime_smoke_test + out/linux/x64/tests/standalone/ten_runtime_smoke_test + - name: Upload tman uses: actions/upload-artifact@v4 with: diff --git a/build/ten_manager/options.gni b/build/ten_manager/options.gni index 7fb5d01e9..539ac3eb5 100644 --- a/build/ten_manager/options.gni +++ b/build/ten_manager/options.gni @@ -7,3 +7,8 @@ declare_args() { ten_package_manager_enable_publish = target_cpu != "arm64" } + +declare_args() { + ten_package_manager_enable_tests = + is_linux || is_win || (is_mac && target_cpu == "x64") +} diff --git a/core/src/ten_manager/BUILD.gn b/core/src/ten_manager/BUILD.gn index 9073e4d92..bf898b3ee 100644 --- a/core/src/ten_manager/BUILD.gn +++ b/core/src/ten_manager/BUILD.gn @@ -6,6 +6,7 @@ # import("//build/common/rust/rust.gni") import("//build/feature/ten_package.gni") +import("//build/ten_manager/options.gni") import("//third_party/clingo/output_libs.gni") declare_args() { @@ -13,7 +14,7 @@ declare_args() { } if (ten_enable_package_manager) { - if (is_linux || is_win || (is_mac && target_cpu == "x64")) { + if (ten_package_manager_enable_tests) { rust_test("tman_test") { project_path = "//core/src/ten_manager" diff --git a/tests/BUILD.gn b/tests/BUILD.gn index 03d5ed562..78a884916 100644 --- a/tests/BUILD.gn +++ b/tests/BUILD.gn @@ -4,6 +4,7 @@ # Licensed under the Apache License, Version 2.0, with certain conditions. # Refer to the "LICENSE" file in the root directory for more information. # +import("//build/ten_manager/options.gni") import("//build/ten_runtime/options.gni") import("//build/ten_utils/options.gni") import("//third_party/jansson/output_libs.gni") @@ -34,7 +35,7 @@ group("tests") { "ten_manager", ] - if (is_linux || is_win || (is_mac && target_cpu == "x64")) { + if (ten_package_manager_enable_tests) { deps += [ "//core/src/ten_manager:tman_test" ] } }