From 0c4bc2f59a7dfa1472648fbaa0593168801292a7 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Mon, 13 Jan 2025 17:15:13 +0000 Subject: [PATCH] Migrate Linux CI to the ubuntu-24.04 GitHub Actions runner The ubuntu-20.04 runner is due to be deprecated on 2025-02-01 and unsupported by 2025-04-01. The ubuntu-24.04 runner does not include cbindgen, so it's now installed using apt. GCC 10 doesn't support the newer libtbb that is in Ubuntu 24.04's apt repositories, so update to GCC 13. The behaviour of std::filesystem::equivalent changed at some point between GCC 10 and GCC 13, so the tests have been updated to reflect that. --- .github/workflows/ci.yml | 7 +++---- .github/workflows/release.yml | 9 ++++----- src/tests/api/internals/main.cpp | 12 ++++-------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c52ec81..2b79345e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ env: jobs: linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -56,17 +56,16 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --no-upgrade \ + cbindgen \ doxygen \ language-pack-el \ language-pack-tr \ - libtbb-dev \ - g++-10 + libtbb-dev - name: Run CMake run: | mkdir build cd build - export CXX="g++-10" CC="gcc-10" cmake .. -DBOOST_ROOT="${{ steps.get-boost.outputs.root }}" -DCPACK_PACKAGE_VERSION="${{ steps.get-libloot-version.outputs.version }}" make all diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 84dea1a2..e61e9eb1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ env: jobs: create_release: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} git_tag: ${{ steps.get-git-tag.outputs.name }} @@ -37,7 +37,7 @@ jobs: linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: create_release steps: @@ -71,17 +71,16 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --no-upgrade \ + cbindgen \ doxygen \ language-pack-el \ language-pack-tr \ - libtbb-dev \ - g++-10 + libtbb-dev - name: Run CMake run: | mkdir build cd build - export CXX="g++-10" CC="gcc-10" cmake .. -DBOOST_ROOT="${{ steps.get-boost.outputs.root }}" -DCPACK_PACKAGE_VERSION="${{ needs.create_release.outputs.git_tag }}" make all diff --git a/src/tests/api/internals/main.cpp b/src/tests/api/internals/main.cpp index fcb998ad..3b8a67cb 100644 --- a/src/tests/api/internals/main.cpp +++ b/src/tests/api/internals/main.cpp @@ -165,7 +165,6 @@ TEST(Filesystem, equalityShouldBeCaseSensitive) { EXPECT_NE(lower, upper); } -#ifdef _WIN32 TEST(Filesystem, equivalentShouldRequireThatBothPathsExist) { auto upper = std::filesystem::path("LICENSE"); auto lower = std::filesystem::path("license2"); @@ -174,6 +173,7 @@ TEST(Filesystem, equivalentShouldRequireThatBothPathsExist) { std::filesystem::filesystem_error); } +#ifdef _WIN32 TEST(Filesystem, equivalentShouldBeCaseInsensitive) { auto upper = std::filesystem::path("LICENSE"); auto lower = std::filesystem::path("license"); @@ -193,17 +193,13 @@ TEST( std::system_error); } #else -TEST(Filesystem, equivalentShouldNotRequireThatBothPathsExist) { - auto upper = std::filesystem::path("LICENSE"); - auto lower = std::filesystem::path("license2"); - - EXPECT_FALSE(std::filesystem::equivalent(lower, upper)); -} - TEST(Filesystem, equivalentShouldBeCaseSensitive) { auto upper = std::filesystem::path("LICENSE"); auto lower = std::filesystem::path("license"); + std::ofstream out(lower); + out.close(); + EXPECT_FALSE(std::filesystem::equivalent(lower, upper)); } #endif