From 859f7e001ebc3a8cac1f1573d610c1cbf7e8ab6c Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 31 Dec 2020 22:37:37 +0800 Subject: improve package tests --- tests/projects/package/basic/test.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/projects/package/basic/test.lua') diff --git a/tests/projects/package/basic/test.lua b/tests/projects/package/basic/test.lua index a4b905689..b76241be2 100644 --- a/tests/projects/package/basic/test.lua +++ b/tests/projects/package/basic/test.lua @@ -1,7 +1,6 @@ -- main entry function main(t) - -- TODO -- build project --- t:build() + t:build() end -- cgit v1.3.1 From 818575765ddc038ed220c5e1aff334264ea7ef11 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 31 Dec 2020 22:38:33 +0800 Subject: improve package tests again --- tests/projects/package/basic/test.lua | 7 +++---- tests/projects/package/basic/xmake.lua | 4 ++-- tests/projects/package/multiconfig/test.lua | 3 --- 3 files changed, 5 insertions(+), 9 deletions(-) (limited to 'tests/projects/package/basic/test.lua') diff --git a/tests/projects/package/basic/test.lua b/tests/projects/package/basic/test.lua index b76241be2..e834ab984 100644 --- a/tests/projects/package/basic/test.lua +++ b/tests/projects/package/basic/test.lua @@ -1,6 +1,5 @@ --- main entry function main(t) - - -- build project - t:build() + if is_plat(os.subhost()) then + t:build() + end end diff --git a/tests/projects/package/basic/xmake.lua b/tests/projects/package/basic/xmake.lua index b71a22c1d..f06d2a199 100644 --- a/tests/projects/package/basic/xmake.lua +++ b/tests/projects/package/basic/xmake.lua @@ -1,11 +1,11 @@ add_requires("tbox master", {debug = true}) add_requires("zlib >=1.2.11") -add_requires("pcre2", "luajit", {system = false, optional = true}) +add_requires("pcre2", {system = false, optional = true}) add_rules("mode.debug", "mode.release") target("console") set_kind("binary") add_files("src/*.c") - add_packages("tbox", "zlib", "pcre2", "luajit") + add_packages("tbox", "zlib", "pcre2") diff --git a/tests/projects/package/multiconfig/test.lua b/tests/projects/package/multiconfig/test.lua index b76241be2..b57362078 100644 --- a/tests/projects/package/multiconfig/test.lua +++ b/tests/projects/package/multiconfig/test.lua @@ -1,6 +1,3 @@ --- main entry function main(t) - - -- build project t:build() end -- cgit v1.3.1 From 63722e7f41c83ec3baabec203f325b29f5709615 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 3 Jan 2021 08:49:09 +0800 Subject: fix ci for package tests --- .github/workflows/debian_mips64.yml | 2 +- .github/workflows/ubuntu_arm.yml | 2 +- .github/workflows/ubuntu_arm64.yml | 2 +- tests/projects/package/basic/test.lua | 2 +- tests/projects/package/depconfigs/test.lua | 4 +++- tests/projects/package/multiconfig/test.lua | 4 +++- 6 files changed, 10 insertions(+), 6 deletions(-) (limited to 'tests/projects/package/basic/test.lua') diff --git a/.github/workflows/debian_mips64.yml b/.github/workflows/debian_mips64.yml index 585758972..0ee576e1a 100644 --- a/.github/workflows/debian_mips64.yml +++ b/.github/workflows/debian_mips64.yml @@ -22,7 +22,7 @@ jobs: args: > bash -c "uname -a && - apt update && apt install -y unzip curl && + apt update && cd /github/workspace && ./scripts/get.sh __local__ && source ~/.xmake/profile && diff --git a/.github/workflows/ubuntu_arm.yml b/.github/workflows/ubuntu_arm.yml index 6925e5ad3..e29aa3907 100644 --- a/.github/workflows/ubuntu_arm.yml +++ b/.github/workflows/ubuntu_arm.yml @@ -22,7 +22,7 @@ jobs: args: > bash -c "uname -a && - apt update && apt install -y unzip curl && + apt update && cd /github/workspace && ./scripts/get.sh __local__ && source ~/.xmake/profile && diff --git a/.github/workflows/ubuntu_arm64.yml b/.github/workflows/ubuntu_arm64.yml index 343a2df34..be7c7e169 100644 --- a/.github/workflows/ubuntu_arm64.yml +++ b/.github/workflows/ubuntu_arm64.yml @@ -22,7 +22,7 @@ jobs: args: > bash -c "uname -a && - apt update && apt install -y unzip curl && + apt update && cd /github/workspace && ./scripts/get.sh __local__ && source ~/.xmake/profile && diff --git a/tests/projects/package/basic/test.lua b/tests/projects/package/basic/test.lua index e834ab984..5050f2dd4 100644 --- a/tests/projects/package/basic/test.lua +++ b/tests/projects/package/basic/test.lua @@ -1,5 +1,5 @@ function main(t) - if is_plat(os.subhost()) then + if is_plat(os.subhost()) and is_arch(os.subarch()) then t:build() end end diff --git a/tests/projects/package/depconfigs/test.lua b/tests/projects/package/depconfigs/test.lua index b57362078..5050f2dd4 100644 --- a/tests/projects/package/depconfigs/test.lua +++ b/tests/projects/package/depconfigs/test.lua @@ -1,3 +1,5 @@ function main(t) - t:build() + if is_plat(os.subhost()) and is_arch(os.subarch()) then + t:build() + end end diff --git a/tests/projects/package/multiconfig/test.lua b/tests/projects/package/multiconfig/test.lua index b57362078..5050f2dd4 100644 --- a/tests/projects/package/multiconfig/test.lua +++ b/tests/projects/package/multiconfig/test.lua @@ -1,3 +1,5 @@ function main(t) - t:build() + if is_plat(os.subhost()) and is_arch(os.subarch()) then + t:build() + end end -- cgit v1.3.1 From 777001165dd469733d927d8ddea9de8fcb6736de Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 3 Jan 2021 10:32:23 +0800 Subject: fix tests on ci --- tests/projects/package/basic/test.lua | 3 ++- tests/projects/package/depconfigs/test.lua | 3 ++- tests/projects/package/multiconfig/test.lua | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/projects/package/basic/test.lua') diff --git a/tests/projects/package/basic/test.lua b/tests/projects/package/basic/test.lua index 5050f2dd4..8644a2af9 100644 --- a/tests/projects/package/basic/test.lua +++ b/tests/projects/package/basic/test.lua @@ -1,5 +1,6 @@ function main(t) - if is_plat(os.subhost()) and is_arch(os.subarch()) then + -- only for x86/x64, because it will take too long time on ci with arm/mips + if os.subarch():startswith("x") or os.subarch() == "i386" then t:build() end end diff --git a/tests/projects/package/depconfigs/test.lua b/tests/projects/package/depconfigs/test.lua index 5050f2dd4..8644a2af9 100644 --- a/tests/projects/package/depconfigs/test.lua +++ b/tests/projects/package/depconfigs/test.lua @@ -1,5 +1,6 @@ function main(t) - if is_plat(os.subhost()) and is_arch(os.subarch()) then + -- only for x86/x64, because it will take too long time on ci with arm/mips + if os.subarch():startswith("x") or os.subarch() == "i386" then t:build() end end diff --git a/tests/projects/package/multiconfig/test.lua b/tests/projects/package/multiconfig/test.lua index 5050f2dd4..8644a2af9 100644 --- a/tests/projects/package/multiconfig/test.lua +++ b/tests/projects/package/multiconfig/test.lua @@ -1,5 +1,6 @@ function main(t) - if is_plat(os.subhost()) and is_arch(os.subarch()) then + -- only for x86/x64, because it will take too long time on ci with arm/mips + if os.subarch():startswith("x") or os.subarch() == "i386" then t:build() end end -- cgit v1.3.1