Compare commits

..

2 Commits

Author SHA1 Message Date
Gyusun Yeom
7c15704efa
Merge b87539999f into 49490b10c4 2025-04-12 12:13:51 +00:00
Gyusun Yeom
b87539999f Fix GHA build test 2025-04-12 21:13:38 +09:00

View File

@ -101,12 +101,28 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Restore cached cmake
uses: actions/cache/restore@v4
with:
path: /opt/cmake
key: cmake-${{ matrix.cmake }}
- name: Install dependencies
shell: bash
run: |
cmake=${{ matrix.cmake }}
apt update
apt install -y wget gcc libgl1-mesa-dev libx11-dev libxext-dev
apt install -y gcc make libgl1-mesa-dev libx11-dev libxext-dev
if [ -x /opt/cmake/bin/cmake ]; then
echo "Found cached cmake"
if [ -s "$(/opt/cmake/bin/cmake --version | grep ${cmake})" ]; then
exit 0
fi
echo "CMake version is mismatched"
rm -rf /opt/cmake
fi
apt install -y g++ wget
if [ "${cmake}" == "latest" ]; then
apt install -y git
cmake=$(git ls-remote --tags https://gitlab.kitware.com/cmake/cmake | cut -f 2 | sed -E "s/^refs\/tags\/v//" | tr -d "^{}" | sort -t '.' -k 1,1n -k 2,2n -k 3,3n | tail -n 1 | tr -d "\n")
@ -116,15 +132,22 @@ jobs:
wget https://cmake.org/files/v${short_version}/cmake-${cmake}.tar.gz
tar -xf cmake-${cmake}.tar.gz
cd cmake-${cmake}
./configure && make -j $(nproc) install
./configure --prefix=/opt/cmake
make -j $(nproc) install
- name: Save cmake
uses: actions/cache/save@v4
with:
path: /opt/cmake
key: cmake-${{ matrix.cmake }}
- name: Configure CMake
shell: bash
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
run: /opt/cmake/bin/cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build test
shell: bash
run: cmake --build .
run: /opt/cmake/bin/cmake --build .
- name: Check alias
shell: bash