Files
runner-images-sangeeth/.github/workflows/cmakecheck.yml
2025-03-23 22:59:01 -07:00

67 lines
1.8 KiB
YAML

name: Install and Find CMake Versions
on:
workflow_dispatch:
jobs:
install_and_find_cmake:
runs-on: [macos-15] # macOS 15 ARM (you can adjust to macOS version as needed)
strategy:
matrix:
macos-version: [13, 15] # You can also test on macOS 15 by adding it to the matrix
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