mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2025-04-22 00:22:57 +00:00
Compare commits
2 Commits
7c15704efa
...
0f28580a15
Author | SHA1 | Date | |
---|---|---|---|
|
0f28580a15 | ||
|
83c207c0d7 |
31
.github/workflows/cmake.yml
vendored
31
.github/workflows/cmake.yml
vendored
@ -101,28 +101,12 @@ 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 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
|
||||
apt install -y wget gcc libgl1-mesa-dev libx11-dev libxext-dev
|
||||
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")
|
||||
@ -132,22 +116,15 @@ jobs:
|
||||
wget https://cmake.org/files/v${short_version}/cmake-${cmake}.tar.gz
|
||||
tar -xf cmake-${cmake}.tar.gz
|
||||
cd cmake-${cmake}
|
||||
./configure --prefix=/opt/cmake
|
||||
make -j $(nproc) install
|
||||
|
||||
- name: Save cmake
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: /opt/cmake
|
||||
key: cmake-${{ matrix.cmake }}
|
||||
./configure && make -j $(nproc) install
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
run: /opt/cmake/bin/cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
|
||||
- name: Build test
|
||||
shell: bash
|
||||
run: /opt/cmake/bin/cmake --build .
|
||||
run: cmake --build .
|
||||
|
||||
- name: Check alias
|
||||
shell: bash
|
||||
|
Loading…
Reference in New Issue
Block a user