Skip to content
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

Update snap creation from Ubuntu 20.04 to Ubuntu 22.04 #62

Merged
merged 39 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b20e51a
Update to Ubuntu 22.04
MNikoliCC Dec 4, 2024
e4e43df
Update artifacts version to v3
MNikoliCC Dec 4, 2024
7d67549
Fix
MNikoliCC Dec 4, 2024
8fcd30f
Fix
MNikoliCC Dec 4, 2024
2ec279d
Fix
MNikoliCC Dec 4, 2024
0b7ad92
Fix
MNikoliCC Dec 4, 2024
e90f47c
Fix "libgfortran4" dependencie
MNikoliCC Dec 4, 2024
7f7da9d
Fix "libssl1.1" dependencie
MNikoliCC Dec 4, 2024
0d04ce4
Fix java
MNikoliCC Dec 4, 2024
8cebae7
Fix "libicu66" dependencie
MNikoliCC Dec 4, 2024
88f23c8
Removing "libcrystalhd3" dependencie
MNikoliCC Dec 4, 2024
b8c2e67
Fix "libldap-2.4-2" dependencie
MNikoliCC Dec 4, 2024
2e853d0
Fix
MNikoliCC Dec 4, 2024
d98ec64
Fix
MNikoliCC Dec 4, 2024
8d19bb9
Fix
MNikoliCC Dec 4, 2024
4c13306
Fix
MNikoliCC Dec 4, 2024
1e0bf1b
Fix
MNikoliCC Dec 4, 2024
a20f30d
Fix
MNikoliCC Dec 5, 2024
ae948fd
Fix
MNikoliCC Dec 5, 2024
171878f
Fix
MNikoliCC Dec 5, 2024
b3e6898
Add workflow_dispatch trigger for manual runs
MNikoliCC Dec 5, 2024
b94ed3f
Fix
MNikoliCC Dec 5, 2024
25d102d
Fix
MNikoliCC Dec 5, 2024
3aaa8af
Fix
MNikoliCC Dec 5, 2024
c5c7fb9
Add tmate session
MNikoliCC Dec 5, 2024
261ff21
Fix
MNikoliCC Dec 9, 2024
4760ff0
Fix
MNikoliCC Dec 9, 2024
16709ac
Fix
MNikoliCC Dec 9, 2024
5c665e3
Fix
MNikoliCC Dec 9, 2024
b7d97dc
Fix migration core20 to core22
MNikoliCC Dec 9, 2024
a96c710
Fix
MNikoliCC Dec 9, 2024
12c84a2
Remove gnome extension
MNikoliCC Dec 9, 2024
45477cc
Fix
MNikoliCC Dec 9, 2024
8f695fd
Fix
MNikoliCC Dec 9, 2024
fa92d9a
Fix
MNikoliCC Dec 9, 2024
c1d463c
Fix
MNikoliCC Dec 9, 2024
99f10da
Update artifact version
MNikoliCC Dec 9, 2024
dc77713
Fix version
MNikoliCC Dec 9, 2024
eb17d76
Fix dependency
MNikoliCC Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .github/workflows/snap-creation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
name: Webots Snap Package Creation
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
branch:
description: "Branch to build"
required: false
default: "master"
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
schedule:
Expand All @@ -18,11 +29,11 @@ defaults:

jobs:
build:
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'test creation') }}
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'test creation') }}
strategy:
matrix:
branch: [master, develop]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Install Snapcraft
Expand All @@ -31,7 +42,6 @@ jobs:
run: |
sudo apt install --yes git
sudo snap install snapcraft --classic
export ROS_DISTRO=noetic
git clone --recurse-submodules --depth 3 --single-branch --branch ${{ matrix.branch }} https://github.com/cyberbotics/webots.git
export WEBOTS_VERSION=$(cat webots/scripts/packaging/webots_version.txt | sed 's/ revision /-rev/g')
sed -i "s/version:\s*'R[0-9]\{4\}[a-z].*'/version: '$WEBOTS_VERSION'/g" snapcraft.yaml
Expand All @@ -44,12 +54,16 @@ jobs:
sudo apt install xvfb
export DISPLAY=:99
Xvfb :99 -screen 0 1024x768x16 &
- name: Start tmate session (Debugging)
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
- name: Create Snap Package
run: |
sudo lsb_release -a
sudo snapcraft --destructive-mode
cp *.snap webots/distribution
- uses: actions/upload-artifact@v2
if: ${{ contains(github.event.pull_request.labels.*.name, 'test creation') }}
- uses: actions/upload-artifact@v4
if: ${{ contains(github.event.pull_request.labels.*.name, 'test creation') || github.event_name == 'workflow_dispatch'}}
with:
name: build-${{ matrix.branch }}
path: |
Expand All @@ -64,7 +78,7 @@ jobs:
webots/scripts/packaging/publish_release.py --key=${{ secrets.BOT_ACTION_KEY }} --repo=cyberbotics/webots --commit=$COMMIT_ID
release-tag:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Install Snapcraft
Expand All @@ -73,7 +87,6 @@ jobs:
run: |
sudo apt install --yes git
sudo snap install snapcraft --classic
export ROS_DISTRO=noetic
git clone --recurse-submodules --depth 3 --single-branch --branch ${GITHUB_REF#refs/tags/} https://github.com/cyberbotics/webots.git
export WEBOTS_VERSION=$(cat webots/scripts/packaging/webots_version.txt | sed 's/ revision /-rev/g')
sed -i "s/version:\s*'R[0-9]\{4\}[a-z].*'/version: '$WEBOTS_VERSION'/g" snapcraft.yaml
Expand Down
44 changes: 22 additions & 22 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

name: webots
title: Webots
base: core20
version: 'R2023b'
base: core22
version: 'R2025a'
adopt-info: webots
summary: Webots is a free and open-source 3D robot simulator
description: |
Webots is a free and open-source 3D robot simulator.
Expand All @@ -21,17 +22,17 @@ description: |
actuators and objects are provided, but you can create your own. Collision
detections, rigid body dynamics and fluid dynamics rely on a modified version
of the ODE physics engine. The robot controller programs can be written
outside of Webots in C, C++, Python, ROS, Java or MATLAB using a simple API.
outside of Webots in C, C++, Python, Java or MATLAB using a simple API.
Webots features a 3D web interface allowing you to publish simulations online.
icon: webots.png
license: Apache-2.0
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict
architectures:
- build-on: amd64
run-on: amd64
- build-on: [amd64]
build-for: [amd64]
environment:
JAVA_HOME: "$SNAP/usr/lib/jvm/java-16-openjdk-amd64"
JAVA_HOME: "$SNAP/usr/lib/jvm/java-18-openjdk-amd64"
PATH: "$JAVA_HOME/bin:$PATH"

layout:
Expand All @@ -41,8 +42,10 @@ layout:
bind: $SNAP/usr/include
/usr/share/libdrm: # to fix a warning displayed by Webots on AMD GPUs
bind: $SNAP/usr/share/libdrm
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libc_nonshared.a:
bind-file: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libc_nonshared.a
/usr/lib/$CRAFT_ARCH_TRIPLET/libc_nonshared.a:
bind-file: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/libc_nonshared.a
# bind-file: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libc_nonshared.a


parts:
desktop-gtk3:
Expand All @@ -58,7 +61,7 @@ parts:
stage:
- -usr/lib/x86_64-linux-gnu/libjpeg.so.8.2.2
stage-packages:
- ttf-ubuntu-font-family
- fonts-ubuntu
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
Expand All @@ -83,8 +86,7 @@ parts:
plugin: make
build-environment:
- WEBOTS_HOME: "$SNAPCRAFT_PART_BUILD"
- ROS_DISTRO: "noetic"
- JAVA_HOME: "/usr/lib/jvm/java-16-openjdk-amd64"
- JAVA_HOME: "/usr/lib/jvm/java-18-openjdk-amd64"
- PATH: "$JAVA_HOME/bin:$PATH"
#source: https://cyberbotics.com/files/repository/beta/webots.tar.bz2
# When building locally, uncomment the following line:
Expand All @@ -98,15 +100,14 @@ parts:
# We should specify either the source-branch or the source-tag, but not both
# source-tag: R2023b
override-pull: |
snapcraftctl pull
craftctl default
./scripts/install/linux_optional_compilation_dependencies.sh
sudo apt install --yes xvfb
snapcraftctl set-version R2023b
override-prime: |
snapcraftctl prime
craftctl default
rm -vf usr/lib/jvm/java-11-openjdk-*amd64/lib/security/blacklisted.certs
stage-packages:
- openjdk-16-jdk
- openjdk-18-jdk
- ca-certificates-java
- build-essential
- libc6-dev
Expand All @@ -121,7 +122,6 @@ parts:
- libcanberra-gtk-module
- libcanberra-gtk3-module
- libccd2
- libcrystalhd3
- libcurl3-gnutls
- libdbus-1-3
- libdouble-conversion3
Expand All @@ -131,7 +131,7 @@ parts:
- libgcc1
- libgcrypt20
- libgd3
- libgfortran4
- libgfortran5
- libglib2.0-0
- libgl1
- libglu1-mesa
Expand All @@ -146,10 +146,10 @@ parts:
- libheimbase1-heimdal
- libheimntlm0-heimdal
- libhx509-5-heimdal
- libicu66
- libicu70
- libjpeg8-dev
- libkrb5-26-heimdal
- libldap-2.4-2
- libldap-2.5-0
- libltdl7
- liblzma5
- libminizip1
Expand All @@ -176,7 +176,7 @@ parts:
- libspeex1
- libssh-dev
- libssh-gcrypt-4
- libssl1.1
- libssl3
- libstdc++6
- libswresample3
- libsystemd0
Expand All @@ -195,8 +195,9 @@ parts:
- libwind0-heimdal
- libx11-data
- libx11-xcb1
- libx265-179
- libx265-199
- libxaw7
- libxcb-cursor0
- libxcb-glx0
- libxcb-icccm4
- libxcb-image0
Expand Down Expand Up @@ -228,7 +229,6 @@ parts:

apps:
webots:
extensions: [gnome-3-38]
environment:
LANG: C.UTF-8
LC_ALL: C.UTF-8
Expand Down