mirror of
https://github.com/gulrak/filesystem.git
synced 2026-01-01 03:12:08 +08:00
Simplify and streamline build_cmake.yml: eliminate outdated CMake workaround for GCC 5-6, ensuring unified CMake configuration across all versions.
This commit is contained in:
parent
9ef4be2a96
commit
b44136d1fb
21
.github/workflows/build_cmake.yml
vendored
21
.github/workflows/build_cmake.yml
vendored
@ -230,26 +230,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
# GCC 5-6 need --allow-unauthenticated due to expired Jessie GPG keys
|
# GCC 5-6 need --allow-unauthenticated due to expired Jessie GPG keys
|
||||||
if [ "${{ matrix.compiler }}" = "gcc" ] && ([ "${{ matrix.version }}" = "5" ] || [ "${{ matrix.version }}" = "6" ]); then
|
if [ "${{ matrix.compiler }}" = "gcc" ] && [ "${{ matrix.version }}" = "5" -o "${{ matrix.version }}" = "6" ]; then
|
||||||
apt-get install -y --allow-unauthenticated cmake ninja-build
|
apt-get install -y --allow-unauthenticated ninja-build wget ca-certificates
|
||||||
|
# Debian Jessie has CMake 3.0.2, but project needs 3.7.2+
|
||||||
|
# Download CMake 3.16.9 (supports -S/-B flags, works with old glibc)
|
||||||
|
wget -qO- "https://cmake.org/files/v3.16/cmake-3.16.9-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local
|
||||||
else
|
else
|
||||||
apt-get install -y cmake ninja-build
|
apt-get install -y cmake ninja-build
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: |
|
run: |
|
||||||
# GCC 5-6 have CMake 3.0.2 which doesn't support -S/-B flags (added in 3.13)
|
# Now all versions have CMake 3.10+, so we can use -S/-B flags
|
||||||
if [ "${{ matrix.compiler }}" = "gcc" ]; then
|
cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
if [ "${{ matrix.version }}" = "5" ] || [ "${{ matrix.version }}" = "6" ]; then
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
|
|
||||||
else
|
|
||||||
cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build
|
run: cmake --build build
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user