From c7014590951ed635cb676476a09beee3bc80b7c7 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 11:39:09 +0800 Subject: [PATCH 01/13] wip --- README.md | 2 +- README_ZH.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8e059315..e6d3388f 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ The following guide will help you build and install Goldfish step by step. ### GNU/Linux Here are commandlines to build it on Debian bookworm: ``` -sudo apt install xmake git unzip curl build-essential +sudo apt install xmake git unzip curl g++ git clone https://gitee.com/LiiiLabs/goldfish.git # git clone https://github.com/LiiiLabs/goldfish.git cd goldfish diff --git a/README_ZH.md b/README_ZH.md index d4ae7ae8..e3ce8146 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -47,7 +47,7 @@ 以下是在 Debian bookworm 上构建的命令行指南: ```bash -sudo apt install xmake git unzip curl build-essential +sudo apt install xmake git unzip curl g++ git clone https://gitee.com/LiiiLabs/goldfish.git # git clone https://github.com/LiiiLabs/goldfish.git cd goldfish -- Gitee From c3a54dfa86b9d6d3024b13d4ebbb425a6740e166 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 11:39:46 +0800 Subject: [PATCH 02/13] wip --- .workflow/ci-debian.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index 81573f18..c5ddc9f1 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -14,6 +14,7 @@ triggers: - src/ - xmake/packages/ - xmake.lua + - .workflow/ pr: branches: precise: @@ -25,6 +26,7 @@ triggers: - src/ - xmake/packages/ - xmake.lua + - .workflow/ variables: XMAKE_MAIN_REPO: https://gitee.com/tboox/xmake-repo.git XMAKE_BINARY_REPO: https://gitee.com/xmake-mirror/build-artifacts.git -- Gitee From 6066c9a6baba22806907d800bc10d8f603ee36eb Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 11:41:22 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .workflow/ci-debian.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index c5ddc9f1..621e4cd4 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -52,6 +52,9 @@ stages: - sed -i '/github\.com/d' xmake/packages/t/tbox/xmake.lua - xmake build --yes -vD goldfish - bin/goldfish -l tests/test_all.scm + caches: [ + build/.build_cache, + ] notify: [] strategy: retry: '0' -- Gitee From e6159c653cd4bef993011692650dccee17a9a6ce Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 11:53:04 +0800 Subject: [PATCH 04/13] wip --- .workflow/ci-debian.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index 621e4cd4..3a6996d1 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -53,7 +53,9 @@ stages: - xmake build --yes -vD goldfish - bin/goldfish -l tests/test_all.scm caches: [ - build/.build_cache, + build/.build_cache/, + ~/.xmake/packages/s/s7/, + ~/.xmake/packages/t/tbox/ ] notify: [] strategy: -- Gitee From c1e318bc53c215757b7a10832e51b4a509d0111e Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 11:57:00 +0800 Subject: [PATCH 05/13] caches --- .workflow/ci-debian.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index 3a6996d1..ba2fce12 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -52,11 +52,10 @@ stages: - sed -i '/github\.com/d' xmake/packages/t/tbox/xmake.lua - xmake build --yes -vD goldfish - bin/goldfish -l tests/test_all.scm - caches: [ - build/.build_cache/, - ~/.xmake/packages/s/s7/, - ~/.xmake/packages/t/tbox/ - ] + caches: + - build/.build_cache/, + - ~/.xmake/packages/s/s7/, + - ~/.xmake/packages/t/tbox/ notify: [] strategy: retry: '0' -- Gitee From ddb2764beb967db5427a4fa8f382d504c1d0e925 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 12:07:14 +0800 Subject: [PATCH 06/13] fix --- .workflow/ci-debian.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index ba2fce12..a0cba95f 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -53,8 +53,8 @@ stages: - xmake build --yes -vD goldfish - bin/goldfish -l tests/test_all.scm caches: - - build/.build_cache/, - - ~/.xmake/packages/s/s7/, + - build/.build_cache/ + - ~/.xmake/packages/s/s7/ - ~/.xmake/packages/t/tbox/ notify: [] strategy: -- Gitee From 0c345009efcf69997a5eaa71d9d96a959c900ccb Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 12:21:45 +0800 Subject: [PATCH 07/13] wip --- .workflow/ci-debian.yml | 6 +----- xmake.lua | 2 +- xmake/packages/t/tbox/xmake.lua | 3 +++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index a0cba95f..e295617b 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -46,16 +46,12 @@ stages: command: - bash .workflow/ustc_debian822_setup.sh - apt-get update - - apt-get install -y xmake git 7zip unzip curl g++ + - apt-get install -y xmake git 7zip unzip curl g++ libtbox-dev - xmake repo --update - sed -i '/github\.com/d' xmake/packages/s/s7/xmake.lua - sed -i '/github\.com/d' xmake/packages/t/tbox/xmake.lua - xmake build --yes -vD goldfish - bin/goldfish -l tests/test_all.scm - caches: - - build/.build_cache/ - - ~/.xmake/packages/s/s7/ - - ~/.xmake/packages/t/tbox/ notify: [] strategy: retry: '0' diff --git a/xmake.lua b/xmake.lua index 6074bf0c..6b87298d 100644 --- a/xmake.lua +++ b/xmake.lua @@ -16,7 +16,7 @@ add_requires("s7 "..S7_VERSION, {system=false}) local TBOX_VERSION = "1.7.5" tbox_configs = {hash=true, ["force-utf8"]=true} -add_requires("tbox " .. TBOX_VERSION, {system=false, configs=tbox_configs}) +add_requires("tbox " .. TBOX_VERSION, {configs=tbox_configs}) target ("goldfish") do set_languages("c++17") diff --git a/xmake/packages/t/tbox/xmake.lua b/xmake/packages/t/tbox/xmake.lua index 8be5b4bd..d4f1bd26 100644 --- a/xmake/packages/t/tbox/xmake.lua +++ b/xmake/packages/t/tbox/xmake.lua @@ -42,6 +42,9 @@ package("tbox") package:add("deps", dep) end end + if package:is_plat("linux") then + package:add("apt::libtbox-dev") + end end) on_install(function (package) -- Gitee From 981c37277eae4c791823590d18ed17e29a84449b Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 12:37:51 +0800 Subject: [PATCH 08/13] wip --- .workflow/ci-debian.yml | 3 ++- xmake.lua | 8 ++++++-- xmake/packages/t/tbox/xmake.lua | 3 --- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index e295617b..0ca362a1 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -46,7 +46,8 @@ stages: command: - bash .workflow/ustc_debian822_setup.sh - apt-get update - - apt-get install -y xmake git 7zip unzip curl g++ libtbox-dev + - apt-get install -y xmake git 7zip unzip curl g++ + - apt install -y -t bookworm-backports libtbox-dev - xmake repo --update - sed -i '/github\.com/d' xmake/packages/s/s7/xmake.lua - sed -i '/github\.com/d' xmake/packages/t/tbox/xmake.lua diff --git a/xmake.lua b/xmake.lua index 6b87298d..baca8335 100644 --- a/xmake.lua +++ b/xmake.lua @@ -15,8 +15,12 @@ local S7_VERSION = "20240702" add_requires("s7 "..S7_VERSION, {system=false}) local TBOX_VERSION = "1.7.5" -tbox_configs = {hash=true, ["force-utf8"]=true} -add_requires("tbox " .. TBOX_VERSION, {configs=tbox_configs}) +if is_plat("linux") and linuxos.name() == "debian" then + add_requires("apt::libtbox-dev", {alias="tbox"}) +else + tbox_configs = {hash=true, ["force-utf8"]=true} + add_requires("tbox " .. TBOX_VERSION, {system=false, configs=tbox_configs}) +end target ("goldfish") do set_languages("c++17") diff --git a/xmake/packages/t/tbox/xmake.lua b/xmake/packages/t/tbox/xmake.lua index d4f1bd26..8be5b4bd 100644 --- a/xmake/packages/t/tbox/xmake.lua +++ b/xmake/packages/t/tbox/xmake.lua @@ -42,9 +42,6 @@ package("tbox") package:add("deps", dep) end end - if package:is_plat("linux") then - package:add("apt::libtbox-dev") - end end) on_install(function (package) -- Gitee From 4c4eeabc7e17a182ddcfeb77cee9e09704afc5b8 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 12:39:59 +0800 Subject: [PATCH 09/13] wip --- README.md | 1 + README_ZH.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index e6d3388f..684c7dc2 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ The following guide will help you build and install Goldfish step by step. Here are commandlines to build it on Debian bookworm: ``` sudo apt install xmake git unzip curl g++ +sudo apt install -y -t bookworm-backports libtbox-dev git clone https://gitee.com/LiiiLabs/goldfish.git # git clone https://github.com/LiiiLabs/goldfish.git cd goldfish diff --git a/README_ZH.md b/README_ZH.md index e3ce8146..19b56189 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -48,6 +48,7 @@ ```bash sudo apt install xmake git unzip curl g++ +sudo apt install -y -t bookworm-backports libtbox-dev git clone https://gitee.com/LiiiLabs/goldfish.git # git clone https://github.com/LiiiLabs/goldfish.git cd goldfish -- Gitee From 77bf5c167b95433803e6e95a568cad90ede84997 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 12:54:18 +0800 Subject: [PATCH 10/13] wip --- .workflow/ci-debian.yml | 1 + README.md | 1 - README_ZH.md | 1 - xmake.lua | 8 +++++++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index 0ca362a1..20816c6d 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -51,6 +51,7 @@ stages: - xmake repo --update - sed -i '/github\.com/d' xmake/packages/s/s7/xmake.lua - sed -i '/github\.com/d' xmake/packages/t/tbox/xmake.lua + - xmake config --tbox=y - xmake build --yes -vD goldfish - bin/goldfish -l tests/test_all.scm notify: [] diff --git a/README.md b/README.md index 684c7dc2..e6d3388f 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,6 @@ The following guide will help you build and install Goldfish step by step. Here are commandlines to build it on Debian bookworm: ``` sudo apt install xmake git unzip curl g++ -sudo apt install -y -t bookworm-backports libtbox-dev git clone https://gitee.com/LiiiLabs/goldfish.git # git clone https://github.com/LiiiLabs/goldfish.git cd goldfish diff --git a/README_ZH.md b/README_ZH.md index 19b56189..e3ce8146 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -48,7 +48,6 @@ ```bash sudo apt install xmake git unzip curl g++ -sudo apt install -y -t bookworm-backports libtbox-dev git clone https://gitee.com/LiiiLabs/goldfish.git # git clone https://github.com/LiiiLabs/goldfish.git cd goldfish diff --git a/xmake.lua b/xmake.lua index baca8335..7552a018 100644 --- a/xmake.lua +++ b/xmake.lua @@ -11,11 +11,17 @@ set_project("Goldfish Scheme") -- repo add_repositories("goldfish-repo xmake") +option("tbox") + set_description("Use tbox installed via apt") + set_default(false) + set_values(false, true) +option_end() + local S7_VERSION = "20240702" add_requires("s7 "..S7_VERSION, {system=false}) local TBOX_VERSION = "1.7.5" -if is_plat("linux") and linuxos.name() == "debian" then +if has_config("tbox") then add_requires("apt::libtbox-dev", {alias="tbox"}) else tbox_configs = {hash=true, ["force-utf8"]=true} -- Gitee From 64b976a371ee08cbd98139c4628d8079857acf90 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 12:57:53 +0800 Subject: [PATCH 11/13] wip --- .workflow/ci-debian.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index 20816c6d..6a27472a 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -51,7 +51,17 @@ stages: - xmake repo --update - sed -i '/github\.com/d' xmake/packages/s/s7/xmake.lua - sed -i '/github\.com/d' xmake/packages/t/tbox/xmake.lua - - xmake config --tbox=y + - xmake config --tbox=y --yes -vD + notify: [] + strategy: + retry: '0' + stepTimeout: 15 + - step: execute@docker + name: execute_by_docker2 + displayName: 构建并测试2 + certificate: '' + image: hub.atomgit.com/amd64/debian:bookworm + command: - xmake build --yes -vD goldfish - bin/goldfish -l tests/test_all.scm notify: [] -- Gitee From 1dcaf65ffcf6b44d75b085d21f4c5c5ee6cf0821 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 13:01:03 +0800 Subject: [PATCH 12/13] Revert "wip" This reverts commit 64b976a371ee08cbd98139c4628d8079857acf90. --- .workflow/ci-debian.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index 6a27472a..20816c6d 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -51,17 +51,7 @@ stages: - xmake repo --update - sed -i '/github\.com/d' xmake/packages/s/s7/xmake.lua - sed -i '/github\.com/d' xmake/packages/t/tbox/xmake.lua - - xmake config --tbox=y --yes -vD - notify: [] - strategy: - retry: '0' - stepTimeout: 15 - - step: execute@docker - name: execute_by_docker2 - displayName: 构建并测试2 - certificate: '' - image: hub.atomgit.com/amd64/debian:bookworm - command: + - xmake config --tbox=y - xmake build --yes -vD goldfish - bin/goldfish -l tests/test_all.scm notify: [] -- Gitee From f5c869316a15aa7ef0047b8c2b296ae816f1e943 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 7 Aug 2024 13:01:23 +0800 Subject: [PATCH 13/13] wip --- .workflow/ci-debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.workflow/ci-debian.yml b/.workflow/ci-debian.yml index 20816c6d..fde5194d 100644 --- a/.workflow/ci-debian.yml +++ b/.workflow/ci-debian.yml @@ -51,7 +51,7 @@ stages: - xmake repo --update - sed -i '/github\.com/d' xmake/packages/s/s7/xmake.lua - sed -i '/github\.com/d' xmake/packages/t/tbox/xmake.lua - - xmake config --tbox=y + - xmake config --tbox=y --yes -vD - xmake build --yes -vD goldfish - bin/goldfish -l tests/test_all.scm notify: [] -- Gitee