Skip to content

Commit c0489db

Browse files
[circleci] Update linux and mac jobs
Signed-off-by: Michal Princ <[email protected]>
1 parent e8d5684 commit c0489db

File tree

2 files changed

+79
-8
lines changed

2 files changed

+79
-8
lines changed

.circleci/config.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ commands:
2222
jobs:
2323
build-linux-gcc:
2424
machine:
25-
image: ubuntu-2204:2022.04.2 #https://circleci.com/developer/machine/image/ubuntu-2204 pick LTS
25+
image: ubuntu-2204:2024.04.4 #https://circleci.com/developer/machine/image/ubuntu-2204 pick LTS
2626
steps:
2727
- checkout
2828
- install_dependencies
@@ -32,7 +32,7 @@ jobs:
3232

3333
build-linux-clang:
3434
machine:
35-
image: ubuntu-2204:2022.04.2 #https://circleci.com/developer/machine/image/ubuntu-2204 pick LTS
35+
image: ubuntu-2204:2024.04.4 #https://circleci.com/developer/machine/image/ubuntu-2204 pick LTS
3636
steps:
3737
- checkout
3838
- install_dependencies:
@@ -44,8 +44,8 @@ jobs:
4444

4545
build-mac-gcc:
4646
macos:
47-
xcode: 12.5.1 # https://circleci.com/docs/using-macos/#supported-xcode-versions https://en.wikipedia.org/wiki/MacOS_version_history#Releases
48-
resource_class: macos.x86.medium.gen2
47+
xcode: 16.4.0 # https://circleci.com/docs/using-macos/#supported-xcode-versions https://en.wikipedia.org/wiki/MacOS_version_history#Releases
48+
resource_class: macos.m1.medium.gen1
4949
steps:
5050
- checkout
5151
- install_dependencies
@@ -55,8 +55,8 @@ jobs:
5555

5656
build-mac-clang:
5757
macos:
58-
xcode: 12.5.1 # https://circleci.com/docs/using-macos/#supported-xcode-versions https://en.wikipedia.org/wiki/MacOS_version_history#Releases
59-
resource_class: macos.x86.medium.gen2
58+
xcode: 16.4.0 # https://circleci.com/docs/using-macos/#supported-xcode-versions https://en.wikipedia.org/wiki/MacOS_version_history#Releases
59+
resource_class: macos.m1.medium.gen1
6060
steps:
6161
- checkout
6262
- install_dependencies:
@@ -73,8 +73,12 @@ jobs:
7373
steps:
7474
- checkout
7575
- run: powershell.exe .\install_dependencies.ps1
76-
- run: .\mingw64\bin\mingw32-make all
77-
- run: .\mingw64\opt\bin\python3.exe .\test\run_unit_tests.py -m"..\\..\\mingw64\\bin\\mingw32-make"
76+
- run: $env:PATH = "C:\Users\circleci\project\cmake_installation\bin;$env:PATH"
77+
- run: ls
78+
- run: pwd
79+
- run: C:\Users\circleci\project\cmake_installation\bin\cmake.exe --preset mingw64 -B ./build
80+
- run: C:\Users\circleci\project\cmake_installation\bin\cmake.exe --build ./build --target erpcgen
81+
#- run: .\mingw64\opt\bin\python3.exe .\test\run_unit_tests.py --generate-shim --erpcgen build/erpcgen/erpcgen
7882
# - store_artifacts:
7983
# path: ./Release/MINGW64/erpcgen/erpcgen.exe
8084

install_dependencies.ps1

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,71 @@ else
4949
Invoke-WebRequest -URI $URLMingw -OutFile $PathMingw7Zip
5050
& $Path7zipApp $UnzipMingw
5151
Remove-Item -ErrorAction Ignore $PathMingw7Zip
52+
53+
$URLCMake = "https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3-windows-x86_64.zip"
54+
$PathCMakeZip = "cmake.zip"
55+
$PathCMake = "cmake_installation"
56+
Remove-Item -ErrorAction Ignore $PathCMakeZip
57+
Remove-Item -ErrorAction Ignore -Recurse $PathCMake
58+
Invoke-WebRequest -URI $URLCMake -OutFile $PathCMakeZip
59+
Expand-Archive -Path $PathCMakeZip -DestinationPath "."
60+
# Rename the extracted folder to 'cmake'
61+
$ExtractedFolder = Get-ChildItem -Directory -Name "cmake-*" | Select-Object -First 1
62+
if ($ExtractedFolder) {
63+
Rename-Item -Path $ExtractedFolder -NewName $PathCMake
64+
}
65+
Remove-Item -ErrorAction Ignore $PathCMakeZip
66+
67+
# Get the absolute path to CMake
68+
$CMakeBinPath = Join-Path (Get-Location) "cmake_installation\bin"
69+
$CMakeExe = Join-Path $CMakeBinPath "cmake.exe"
70+
71+
# Get the absolute path to CMake
72+
$CMakeBinPath = Join-Path (Get-Location) "cmake_installation\bin"
73+
$CMakeExe = Join-Path $CMakeBinPath "cmake.exe"
74+
75+
Write-Host "CMake and MinGW installed"
76+
Write-Host "CMake path: $CMakeBinPath"
77+
$MingwBinPath = Join-Path (Get-Location) "mingw64\bin"
78+
Write-Host "MinGW path: $MingwBinPath"
79+
}
80+
81+
# Verify CMake installation using full path
82+
if (Test-Path $CMakeExe) {
83+
Write-Host "CMake installation verified successfully"
84+
Write-Host "CMake executable location: $CMakeExe"
85+
try {
86+
& $CMakeExe --version
87+
Write-Host ""
88+
Write-Host "To use CMake in your current session, add it to PATH with:"
89+
Write-Host "`$env:PATH = `"$CMakeBinPath;`$env:PATH`""
90+
Write-Host ""
91+
Write-Host "Or use the full path: $CMakeExe"
92+
}
93+
catch {
94+
Write-Warning "CMake executable found but failed to run: $_"
95+
}
96+
} else {
97+
Write-Warning "CMake installation failed - executable not found at $CMakeExe"
98+
Write-Host "Checking what was extracted..."
99+
if (Test-Path $PathCMake) {
100+
Get-ChildItem -Path $PathCMake -Recurse -Name "cmake.exe"
101+
}
52102
}
103+
104+
# Optionally, update PATH for current session
105+
Write-Host ""
106+
Write-Host "Updating PATH for current PowerShell session..."
107+
$env:PATH = "$CMakeBinPath;$env:PATH"
108+
$env:PATH = "C:\Users\circleci\project\cmake_installation\bin;$env:PATH"
109+
Write-Host "CMake should now be available as 'cmake' command in this session"
110+
111+
# Test if cmake is now available
112+
try {
113+
cmake --version
114+
Write-Host "SUCCESS: CMake is now available in PATH"
115+
}
116+
catch {
117+
Write-Warning "CMake still not available in PATH. Use full path: $CMakeExe"
118+
}
119+

0 commit comments

Comments
 (0)