From 87ed76971bb407f9cb139e2843abf98540356fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20L=C3=B3pez-Cabanillas?= Date: Sun, 31 Mar 2024 13:06:44 +0200 Subject: [PATCH 1/3] Create linux-build.yml --- .github/workflows/linux-build.yml | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/linux-build.yml diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml new file mode 100644 index 0000000..8d34d02 --- /dev/null +++ b/.github/workflows/linux-build.yml @@ -0,0 +1,39 @@ +# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml +name: Build on Linux + +on: + push: + branches: [ "master", "devel" ] + pull_request: + branches: [ "master", "devel" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: RelWithDebInfo + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. + # You can convert this to a matrix build if you need cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Test + working-directory: ${{github.workspace}}/build + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C ${{env.BUILD_TYPE}} + From 0d86c111a7ac725167ec96f6fec55d708146c25d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20L=C3=B3pez-Cabanillas?= Date: Sun, 31 Mar 2024 16:21:06 +0200 Subject: [PATCH 2/3] fix for gb18030 encoding test The gb18030 test fails, reporting the sample text as Macedonian language encoded with windows-1251. This is because 1: the Macedonian language model is very optimistic and reports high confidence with the given sample, and 2: the original sample text is extremely short and lacks language variety. By simply adding a good amount of real Chinese literature to the sample file, the test no longer fails. This text has been extracted from Wikipedia: https://zh.wikipedia.org/wiki/%E4%B8%AD%E5%8D%8E%E4%BA%BA%E6%B0%91%E5%85%B1%E5%92%8C%E5%9B%BD --- test/zh/gb18030.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/zh/gb18030.txt b/test/zh/gb18030.txt index 962df87..152418f 100644 --- a/test/zh/gb18030.txt +++ b/test/zh/gb18030.txt @@ -1 +1,13 @@ -简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文 \ No newline at end of file +简体中文 + +中华人民共和国,简称中国,是一個位於东亚的社会主义国家,首都为北京市,领土東至黑龙江省抚远市的黑瞎子岛中部,西达新疆克孜勒苏境内的帕米尔高原,南抵海南省三沙市的南海海域,北及黑龙江省大兴安岭地区的黑龙江航道,国土面積約为960萬平方千米。全国共划分為23個省、5個自治區、4個直轄市和2個特別行政區,是世界上总面積第三或第四大的國家(仅陆地面积为世界第二)。 + +第二次世界大战结束后,毛泽东领导下的中国共产党和中国人民解放军在第二次国共内战中逐步取得优势,于1949年10月1日在北京宣布成立中华人民共和国中央人民政府,并实际控制中国大陆地区,与遷至臺灣地區的中華民國政府形成至今的分治格局。 + +截至2023年末,中华人民共和国有约14.1億人,约占世界人口的17.6%,其也是一个多民族国家,官方承認的民族共有56個,其中汉族佔总人口的91.51%。在悠久的历史发展中,中华人民共和国逐渐形成了多元一体的中华文化格局。国家通用语言和文字是普通话和规范汉字,在民族自治地方少数民族可以使用民族語言和文字。自1986年起中华人民共和国实行九年义务教育制度,截至2020年接受高等教育人口达2.4亿。 + +中华人民共和国目前为世界第二大经济体和世界上经济最发达的发展中国家,2022年國內生產總值(GDP)总量达121.02万亿人民币,依國際匯率折合18万亿美元,位居世界第二,仅次于美国;按購買力平價则位列世界第一。中華人民共和國是世界上最大的商品出口國及第二大的進口國。1978年改革開放後,中华人民共和国很快成为經濟成長最快的主要經濟體之一。贫困问题随着经济增长也逐渐得到好转,832个国家级贫困县在2020年底全部完成脱贫摘帽,但区域间发展不均衡以及國民贫富差距较大这两大问题仍需解决。 + +科技方面,中华人民共和国在航天航空、高速铁路、新能源、核技术、超级计算机、量子通讯、人工智能、5G通訊、生物技术等應用科學領域有较强实力,但在尖端科技和基礎科學領域与發達國家仍有一定差距。军事方面,中华人民共和国武装力量擁有世界第一大规模作战力量的常備部隊,并具备三位一體的核打擊能力,在亚太地区拥有局部优势的作战能力,亦是世界上第二个航空母舰采用电磁弹射技术的国家;世界上第二个入役第五代战斗机的国家。同时,中华人民共和国也是重要的航天大国,是继苏联和美国之后首个能独立完成载人航天、自主空间站建设、月球软着陆与采样返回、火星软着陆等任务的国家。 + +外交层面,中华人民共和国奉行和平共处五项原则的外交政策,1971年在聯合國代替中華民國取得中國代表權及联合国安理会常任理事国席位。之后参与亚太经合组织、二十国集团、世界贸易组织等重要國際組織,并成为上海合作组织、金砖国家、一带一路、亚洲基础设施投资银行、区域全面经济伙伴关系协定等国际合作组织及项目的创始国和主导国。据皮尤研究中心的调查,随着国际影响力的增强,中华人民共和国已被许多国家、组织视为世界经济的重要支柱與潜在超级大國之。 From ffc9c33a0f32de0ea41e5f2f1edcf6d113379218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20L=C3=B3pez-Cabanillas?= Date: Sun, 10 Aug 2025 19:20:46 +0200 Subject: [PATCH 3/3] Revert "Create linux-build.yml" This reverts commit 87ed76971bb407f9cb139e2843abf98540356fef. --- .github/workflows/linux-build.yml | 39 ------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 .github/workflows/linux-build.yml diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml deleted file mode 100644 index 8d34d02..0000000 --- a/.github/workflows/linux-build.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml -name: Build on Linux - -on: - push: - branches: [ "master", "devel" ] - pull_request: - branches: [ "master", "devel" ] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: RelWithDebInfo - -jobs: - build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - - name: Test - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C ${{env.BUILD_TYPE}} -