-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix windows ccache [19657] #65
Merged
+56
−64
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
efa6870
Fix windows ccache
richiware 3f162a5
Other approach
richiware bb23fdb
Fix
richiware dd5ee98
Fix
richiware 91f4f2a
Fix
richiware ec85f85
Fix
richiware e630528
Nightly job
richiware 2899e34
Refs #19657. Using eprosima-ci
richiware f08a214
Refs #19657. Using new moved tag v0
richiware File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$erroractionpreference = "stop" | ||
|
||
$tag = (Invoke-WebRequest -Uri "https://api.github.com/repos/ccache/ccache/releases" -UseBasicParsing | ConvertFrom-Json)[0].tag_name | ||
$name = (Invoke-WebRequest -Uri "https://api.github.com/repos/ccache/ccache/releases" -UseBasicParsing | ConvertFrom-Json)[0].name | ||
$filename = "ccache-$name-windows-x86_64" | ||
$tarball = "$filename.zip" | ||
|
||
$outdir = $pwd.Path | ||
$outdir = "$outdir\.github" | ||
mkdir $outdir | ||
$ProgressPreference = 'SilentlyContinue' | ||
Invoke-WebRequest -Uri "https://github.com/ccache/ccache/releases/download/$tag/$tarball" -OutFile "$outdir\$tarball" | ||
|
||
Add-Type -AssemblyName System.IO.Compression.FileSystem | ||
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir") | ||
Move-Item -Path "$outdir\$filename" -Destination "$outdir\ccache" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,14 +26,26 @@ jobs: | |
"System32;SysWoW64" -split ";" | Join-Path -Path $env:windir -ChildPath {$_} ` | ||
| ls -Include libssl-*.dll | rm | ||
|
||
- name: install swig | ||
- name: Install ninja | ||
if: github.event.schedule == '' | ||
shell: pwsh | ||
run: choco install ninja | ||
|
||
- name: Setting ninja | ||
id: ninja | ||
if: github.event.schedule == '' | ||
shell: pwsh | ||
run: echo "cmake_generator=ninja" >> $Env:GITHUB_OUTPUT | ||
|
||
- name: Install swig | ||
shell: pwsh | ||
run: choco install swig --allow-downgrade --version=4.0.2.04082020 | ||
|
||
- name: Install python build dependencies | ||
shell: pwsh | ||
run: > | ||
run: | | ||
pip install -U colcon-common-extensions colcon-mixin vcstool; | ||
colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml; colcon mixin update default | ||
|
||
- name: Install python tests dependencies | ||
shell: pwsh | ||
|
@@ -54,7 +66,7 @@ jobs: | |
} | ||
& $python_exec -m pip install -U pytest pywin32 | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: src/fastdds_python | ||
|
||
|
@@ -67,12 +79,25 @@ jobs: | |
uses: lukka/get-cmake@latest | ||
with: | ||
cmakeVersion: 3.22.6 | ||
|
||
- name: Use cmake | ||
run: cmake --version | ||
|
||
- name: Install ccache | ||
shell: pwsh | ||
run: | | ||
pwsh -File "src\fastdds_python\.github\ci\ccache.ps1" | ||
$ccache_dir = $pwd.PATH | ||
$ccache_dir = "$ccache_dir\.github\ccache" | ||
echo "$ccache_dir" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
Set-Item -Force -Path "env:PATH" -Value "$ccache_dir;$env:PATH" | ||
ccache --version | ||
|
||
- name: Setup ccache | ||
uses: Chocobo1/setup-ccache-action@v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice to include this action into eProsima-CI external actions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 2899e34 |
||
with: | ||
prepend_symlinks_to_path: false | ||
install_ccache: false | ||
windows_compile_environment: msvc | ||
|
||
- name: Build workspace | ||
|
@@ -85,8 +110,7 @@ jobs: | |
-StartInPath (pwd) -DevCmdArguments '/arch=x64 /host_arch=x64'; | ||
colcon build --executor parallel --event-handlers console_direct+ desktop_notification- ` | ||
--metas ./src/fastdds_python/.github/workflows/test.meta ` | ||
--cmake-args -DCMAKE_C_COMPILER_LAUNCHER="${{ env.ccache_symlinks_path }}" ` | ||
-DCMAKE_CXX_COMPILER_LAUNCHER="${{ env.ccache_symlinks_path }}" | ||
--mixin rel-with-deb-info ccache ${{ steps.ninja.outputs.cmake_generator }} | ||
|
||
- name: Run tests | ||
shell: pwsh | ||
|
@@ -105,7 +129,7 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: src/fastdds_python | ||
|
||
|
@@ -121,8 +145,10 @@ jobs: | |
- name: Install python dependencies | ||
run: | | ||
sudo pip3 install -U \ | ||
vcstool \ | ||
colcon-common-extensions | ||
colcon-common-extensions \ | ||
colcon-mixin \ | ||
vcstool | ||
colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml; colcon mixin update default | ||
|
||
- name: Fetch repositories | ||
run: | | ||
|
@@ -143,9 +169,7 @@ jobs: | |
colcon build \ | ||
--event-handlers=console_direct+ \ | ||
--metas ./src/fastdds_python/.github/workflows/test.meta \ | ||
--cmake-args \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
--mixin rel-with-deb-info ccache | ||
|
||
- name: Run tests | ||
run: | | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be updated to use the action wrapped in eprosima-CI repository. Thus, updating the external action would be enough to upgrade every eProsima workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 2899e34