From beb254d0231dc2db1ca009c4d56ce50410523f15 Mon Sep 17 00:00:00 2001 From: zonble Date: Thu, 1 Aug 2024 12:26:09 +0800 Subject: [PATCH] Adds more images to run CI jobs. --- .github/workflows/ci.yaml | 26 +++++++++++++++---- src/Engine/gramambular2/reading_grid_test.cpp | 5 ++-- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d247197..2759ea2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,10 +3,19 @@ name: CI on: [push, pull_request] jobs: - build_ubuntu: + build_debian_based: strategy: + fail-fast: false matrix: - os: ["ubuntu:22.04", "ubuntu:24.04"] + os: + [ + "ubuntu:22.04", + "ubuntu:24.04", + "ubuntu:24.10", + "debian:12", + "linuxmintd/mint22-amd64", + "linuxmintd/mint21-amd64", + ] runs-on: ubuntu-latest container: ${{ matrix.os }} steps: @@ -20,6 +29,10 @@ jobs: apt install -y cmake extra-cmake-modules gettext libfmt-dev apt install -y fcitx5 libfcitx5core-dev libfcitx5config-dev libfcitx5utils-dev fcitx5-modules-dev apt install -y libjson-c-dev + - name: Install Build Essential + if: matrix.os == 'ubuntu:24.10' + run: | + apt install -y build-essential - name: Build run: | mkdir -p build @@ -36,10 +49,13 @@ jobs: cd build ctest --output-on-failure - build_ubuntu_20: + build_debian_based_legacy: + strategy: + fail-fast: false + matrix: + os: ["ubuntu:20.04", "linuxmintd/mint20-amd64"] runs-on: ubuntu-latest - container: ubuntu:20.04 - + container: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install dependencies diff --git a/src/Engine/gramambular2/reading_grid_test.cpp b/src/Engine/gramambular2/reading_grid_test.cpp index f745b2f..7ba8790 100644 --- a/src/Engine/gramambular2/reading_grid_test.cpp +++ b/src/Engine/gramambular2/reading_grid_test.cpp @@ -23,6 +23,7 @@ #include "reading_grid.h" +#include #include #include #include @@ -742,8 +743,8 @@ TEST(ReadingGridTest, DisambiguateCandidates) { ASSERT_EQ(result.valuesAsStrings(), (std::vector{"高熱", "🔥", "焰", "危險"})); - ASSERT_TRUE( - grid.overrideCandidate(loc, ReadingGrid::Candidate("ㄏㄨㄛˇㄧㄢˋ", "🔥"))); + ASSERT_TRUE(grid.overrideCandidate( + loc, ReadingGrid::Candidate("ㄏㄨㄛˇㄧㄢˋ", "🔥"))); result = grid.walk(); ASSERT_EQ(result.valuesAsStrings(), (std::vector{"高熱", "🔥", "危險"}));