mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 14:40:26 -05:00
Use default cmake
This commit is contained in:
1 parent
bdaa8b0d9c
commit
89b2de19b4
1 file changed
-56
@@ -96,62 +96,6 @@ jobs:
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r GrpcInterface/Python/build-requirements.txt
|
||||
|
||||
- name: Find CMake path and remove from PATH (Linux)
|
||||
if: contains( matrix.config.os, 'ubuntu')
|
||||
run: |
|
||||
sudo rm -rf /usr/local/bin/cmake*
|
||||
sudo rm -rf /usr/local/share/cmake*
|
||||
sudo rm -rf /usr/local/doc/cmake*
|
||||
sudo rm -rf /usr/local/man/man1/cmake*
|
||||
|
||||
# Try to call CMake (should fail or use a different version if removal was successful)
|
||||
cmake --version || echo "CMake was successfully removed from PATH"
|
||||
|
||||
- name: Find CMake path and remove from PATH (Windows)
|
||||
shell: powershell
|
||||
if: contains( matrix.config.os, 'windows')
|
||||
run: |
|
||||
# Find the current CMake path
|
||||
$cmakePath = (Get-Command cmake -ErrorAction SilentlyContinue).Path
|
||||
Write-Host "Current CMake path: $cmakePath"
|
||||
|
||||
if ($cmakePath) {
|
||||
# Get the directory containing CMake
|
||||
$cmakeDir = Split-Path -Parent $cmakePath
|
||||
Write-Host "CMake directory: $cmakeDir"
|
||||
|
||||
# Save the current PATH
|
||||
$currentPath = $env:PATH
|
||||
|
||||
# Create a new PATH by removing the CMake directory
|
||||
# PowerShell uses semicolons as path separators
|
||||
$newPath = ($currentPath -split ';' | Where-Object { $_ -ne $cmakeDir }) -join ';'
|
||||
|
||||
# Set the new PATH for this job
|
||||
echo "PATH=$newPath" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
|
||||
# Update the current session PATH for verification purposes
|
||||
$env:PATH = $newPath
|
||||
|
||||
# Verify the change
|
||||
Write-Host "Updated PATH: $newPath"
|
||||
|
||||
# Try to call CMake (should fail or use a different version if removal was successful)
|
||||
try {
|
||||
cmake --version
|
||||
Write-Host "CMake is still in PATH (possibly from another location)"
|
||||
} catch {
|
||||
Write-Host "CMake was successfully removed from PATH"
|
||||
}
|
||||
} else {
|
||||
Write-Host "CMake not found in PATH"
|
||||
}
|
||||
|
||||
- name: Use CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~3.26.0"
|
||||
|
||||
- name: Use MSVC (Windows)
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
|
||||
Reference in new issue
Block a user