mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user