Skip to content

Refresh CI and remove gazebo compilation #348

Refresh CI and remove gazebo compilation

Refresh CI and remove gazebo compilation #348

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
release:
types: [published]
jobs:
build-yarp-deps-only:
# We would like to build with v140 toolset to be compatible with both VS2017, 2019
# But that will only be avaiilable in late november: https://github.com/actions/virtual-environments/issues/68
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Check free space
shell: bash
run: |
df -h
# Workaround for https://github.community/t5/GitHub-Actions/Windows-tests-worked-yesterday-broken-today/td-p/43574
- name: Override bash shell PATH (windows-latest)
run: echo "C:\Program Files\Git\bin" >> $GITHUB_PATH
- name: Avoid conflicts with vcpkg in C:\vcpkg
shell: bash
run: |
# Print environment variables for debug
env
# Avoid conflicts with vcpkg in C:\vcpkg
rm -rf C:/vcpkg
echo "VCPKG_ROOT=C:/robotology/vcpkg" >> $GITHUB_ENV
- name: Download custom vcpkg and additional ports
shell: bash
run: |
choco install -y wget
mkdir C:/robotology
cd C:/robotology
git clone https://github.com/Microsoft/vcpkg
cd vcpkg
git checkout 2023.10.19
C:/robotology/vcpkg/bootstrap-vcpkg.sh
git clone https://github.com/robotology/robotology-vcpkg-ports C:/robotology/robotology-vcpkg-ports
cd C:/robotology/robotology-vcpkg-ports
git checkout v0.2.1
- name: Install vcpkg ports
shell: bash
run: |
C:/robotology/vcpkg/vcpkg.exe --overlay-ports=C:/robotology/robotology-vcpkg-ports --overlay-ports=${GITHUB_WORKSPACE}/custom-ports install --triplet x64-windows ace eigen3 graphviz gsl libjpeg-turbo hdf5[core,szip,tools,zlib] opencv[contrib] portaudio sdl1 sdl2 qt5-base[latest] qt5-declarative qt5-multimedia qt5-quickcontrols qt5-quickcontrols2 sqlite3[core,tool] tinyxml
C:/robotology/vcpkg/vcpkg.exe list
# Remove temporary files https://github.com/Microsoft/vcpkg/blob/master/docs/about/faq.md#how-can-i-remove-temporary-files
# For some reason doing using git bash to do rm -rf fails for icu's port buildtrees, probably for the use of msys2
# See https://github.com/microsoft/vcpkg/issues/10365
- name: Cleanup vcpkg temporary directories
shell: cmd
run: |
RMDIR /Q/S C:\robotology\vcpkg\buildtrees
RMDIR /Q/S C:\robotology\vcpkg\packages
RMDIR /Q/S C:\robotology\vcpkg\downloads
# Remove .pdb (i.e. debug symbols) files to save space
- name: Remove .pdb
shell: bash
run: |
rm -rf /c/robotology/vcpkg/installed/x64-windows/bin/*.pdb
rm -rf /c/robotology/vcpkg/installed/x64-windows/debug/bin/*.pdb
- name: Install setup scripts
shell: bash
run: |
mkdir /c/robotology/scripts
cp scripts/setup-vcpkg.bat /c/robotology/scripts
cp scripts/setup-deps.bat /c/robotology/scripts
cp scripts/setup-vcpkg.sh /c/robotology/scripts
cp scripts/setup-deps.sh /c/robotology/scripts
cp scripts/addPathsToUserEnvVariables-vcpkg.ps1 /c/robotology/scripts
cp scripts/addPathsToUserEnvVariables-deps.ps1 /c/robotology/scripts
cp scripts/removePathsFromUserEnvVariables-vcpkg.ps1 /c/robotology/scripts
cp scripts/removePathsFromUserEnvVariables-deps.ps1 /c/robotology/scripts
- name: Prepare artifacts and release file
shell: cmd
run: |
7z a vcpkg-robotology-yarp-only.zip C:\robotology
- uses: actions/upload-artifact@v3
with:
name: vcpkg-robotology-yarp-deps-only
path: vcpkg-robotology-yarp-only.zip
- name: Upload Release Asset
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./vcpkg-robotology-yarp-only.zip
asset_name: vcpkg-robotology-yarp-only.zip
asset_content_type: application/zip
build:
runs-on: windows-2019
needs: build-yarp-deps-only
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: vcpkg-robotology-yarp-deps-only
- name: Extract artifact
shell: bash
run: |
7z x -y -oC:/ vcpkg-robotology-yarp-only.zip
- name: Check free space
shell: bash
run: |
df -h
- name: Avoid conflicts with vcpkg in C:\vcpkg
shell: bash
run: |
# Print environment variables for debug
env
# Avoid conflicts with vcpkg in C:\vcpkg
rm -rf C:/vcpkg
echo "VCPKG_ROOT=C:/robotology/vcpkg" >> $GITHUB_ENV
- name: Install vcpkg ports
shell: bash
run: |
C:/robotology/vcpkg/vcpkg.exe --overlay-ports=C:/robotology/robotology-vcpkg-ports --overlay-ports=${GITHUB_WORKSPACE}/custom-ports install --triplet x64-windows asio assimp boost-circular-buffer boost-asio boost-bind boost-process boost-dll boost-filesystem boost-system freeglut esdcan-binary glew glfw3 nlohmann-json ode openssl libxml2 hdf5[core,szip,tools,zlib] matio[core,hdf5,zlib] ipopt-binary cppad irrlicht spdlog tinyxml2 tomlplusplus pcl[visualization] vtk
C:/robotology/vcpkg/vcpkg.exe list
# Remove temporary files https://github.com/Microsoft/vcpkg/blob/master/docs/about/faq.md#how-can-i-remove-temporary-files
# For some reason doing using git bash to do rm -rf fails for icu's port buildtrees, probably for the use of msys2
# See https://github.com/microsoft/vcpkg/issues/10365
- name: Cleanup vcpkg temporary directories
shell: cmd
run: |
RMDIR /Q/S C:\robotology\vcpkg\buildtrees
RMDIR /Q/S C:\robotology\vcpkg\packages
RMDIR /Q/S C:\robotology\vcpkg\downloads
# Remove .pdb (i.e. debug symbols) files to save space
- name: Remove .pdb
shell: bash
run: |
rm -rf /c/robotology/vcpkg/installed/x64-windows/bin/*.pdb
rm -rf /c/robotology/vcpkg/installed/x64-windows/debug/bin/*.pdb
- name: Prepare artifact and release file
shell: cmd
run: |
7z a vcpkg-robotology.zip C:\robotology
- uses: actions/upload-artifact@v3
with:
name: vcpkg-robotology
path: vcpkg-robotology.zip
- name: Upload Release Asset
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./vcpkg-robotology.zip
asset_name: vcpkg-robotology.zip
asset_content_type: application/zip