mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-31 22:18:12 +08:00
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: Install and Find CMake Versions
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
install_and_find_cmake:
|
|
runs-on: [macos-15,macos-13] # macOS 15 ARM (you can adjust to macOS version as needed)
|
|
|
|
steps:
|
|
# Checkout the repository
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
# Set up Homebrew (if not installed)
|
|
- name: Install Homebrew
|
|
run: |
|
|
if ! which brew > /dev/null; then
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
fi
|
|
|
|
# Install CMake 3.31.5 from source
|
|
- name: Install CMake 3.31.5 from source
|
|
run: |
|
|
echo "Installing CMake version 3.31.5 from source..."
|
|
|
|
# Download the CMake version 3.31.5
|
|
curl -LO https://cmake.org/files/v3.31/cmake-3.31.5.tar.gz
|
|
|
|
# Extract the tar.gz file
|
|
tar -zxvf cmake-3.31.5.tar.gz
|
|
|
|
# Navigate into the extracted directory
|
|
cd cmake-3.31.5
|
|
|
|
# Run the bootstrap process to configure the build
|
|
./bootstrap
|
|
|
|
# Compile and install
|
|
make
|
|
sudo make install
|
|
|
|
# Clean up
|
|
cd ..
|
|
rm -rf cmake-3.31.5.tar.gz cmake-3.31.5
|
|
|
|
# Find the installation path for CMake 3.31.5
|
|
- name: Find CMake installation path
|
|
run: |
|
|
# Search for where cmake is installed
|
|
cmake_path=$(which cmake)
|
|
echo "CMake 3.31.5 installed at: $cmake_path"
|
|
|
|
# Verify that CMake is installed correctly
|
|
cmake --version
|
|
|
|
# Verify successful installation of cmake
|
|
- name: Verify CMake version
|
|
run: |
|
|
cmake --version
|