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

[Snap] Update to core24 #4086

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .ci/snap/install_vulkan_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ if [[ "$TARGET_BUILD_ARCH" == "amd64" && "$CRAFT_ARCH_BUILD_ON" == "$TARGET_BUIL
echo "Installing Vulkan SDK"

# Add Vulkan SDK repo
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | tee /etc/apt/trusted.gpg.d/lunarg.asc
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.268-jammy.list https://packages.lunarg.com/vulkan/1.3.268/lunarg-vulkan-1.3.268-jammy.list
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add -
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.296-noble.list https://packages.lunarg.com/vulkan/1.3.296/lunarg-vulkan-1.3.296-noble.list
apt update
apt install --yes vulkan-sdk

Expand Down
2 changes: 1 addition & 1 deletion .ci/vulkan/install_glslc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DEBIAN_FRONTEND=noninteractive apt-get -y install cmake python3 lcov
echo "Fetching shaderc"
git clone https://github.com/google/shaderc shaderc
cd shaderc
git checkout tags/v2024.1 -b v2024.1
git checkout tags/v2024.3 -b v2024.3
./utils/git-sync-deps
cd ..

Expand Down
54 changes: 27 additions & 27 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,20 @@ name: warzone2100 # no spaces, all lower-case
adopt-info: warzone2100 # specify the *part* name
confinement: strict
grade: stable
base: core22
base: core24

# Enable LZO compression for the snap
compression: lzo

# Limit architectures to those supported by the gnome extension (and future core24)
# NOTE: Specify these as separate build-on lines to ensure separate architecture builds that each support a single architecture
architectures:
- build-on: amd64
- build-on: arm64

layout:
/usr/share/vulkan:
symlink: $SNAP/usr/share/vulkan
/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libvulkan_intel.so:
symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libvulkan_intel.so
/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libvulkan_radeon.so:
symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libvulkan_radeon.so
/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libvulkan_broadcom.so:
symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libvulkan_broadcom.so
/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libvulkan_freedreno.so:
symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libvulkan_freedreno.so
/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libvulkan_lvp.so:
symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libvulkan_lvp.so
# Limit architectures to those supported by the gnome extension
# NOTE: Ensure separate architecture builds that each support a single architecture
platforms:
amd64:
build-on: [amd64]
build-for: [amd64]
arm64:
build-on: [arm64]
build-for: [arm64]

plugs:
wz2100-sequences:
Expand Down Expand Up @@ -59,8 +49,8 @@ apps:

parts:
sdl:
source: https://github.com/libsdl-org/SDL/releases/download/release-2.30.5/SDL2-2.30.5.tar.gz
source-checksum: sha512/a5892d96e4bd97702aacaddebef16c0d731582539ef3eb4cf95494b81fcda2305e93ac0735074d6269833efd106b4ae194b964ef5696476d071e071ba22aadc4
source: https://github.com/libsdl-org/SDL/releases/download/release-2.30.8/SDL2-2.30.8.tar.gz
source-checksum: sha512/72e49d8a67f5ca1241a262e7e7ae7f6ff148e8774343110db652589ab2e72d3425534ca7f8c7825b2ae1afc779c09228da33a9586219ac4e53546a4930380b64
plugin: cmake
cmake-parameters:
- -DCMAKE_INSTALL_PREFIX=/usr
Expand Down Expand Up @@ -109,7 +99,7 @@ parts:
- fcitx-libs
- libdrm2
- libgbm1
- libegl1-mesa
- libegl1
- libgl1
- libgles2
- libibus-1.0-5
Expand Down Expand Up @@ -217,10 +207,19 @@ parts:
- libsodium23
- libsqlite3-0
- libglu1-mesa
- mesa-vulkan-drivers
# - mesa-vulkan-drivers # provided by gpu-2404 / mesa-2404
- unzip
- zip

gpu-2404:
after: [warzone2100]
source: https://github.com/canonical/gpu-snap.git
plugin: dump
override-prime: |
craftctl default
${CRAFT_PART_SRC}/bin/gpu-2404-cleanup mesa-2404
# Note: No "prime" part here, as we only use this for cleanup, and rely on the gnome extension to properly stage and setup the gpu-2404-wrapper and the command-chain

# This part removes all the files in this snap which already exist in
# connected content and base snaps. Since these files will be available
# at runtime from the content and base snaps, they do not need to be
Expand All @@ -232,14 +231,15 @@ parts:
after: # Make this part run last; list all your other parts here
- sdl
- warzone2100
- gpu-2404
plugin: nil
build-snaps: # List all content-snaps and base snaps you're using here
- core22
- core24
- gtk-common-themes
- gnome-42-2204
- gnome-46-2404
override-prime: |
set -eux
for snap in "core22" "gtk-common-themes" "gnome-42-2204"; do # List all content-snaps and base snaps you're using here
for snap in "core24" "gtk-common-themes" "gnome-46-2404"; do # List all content-snaps and base snaps you're using here
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$CRAFT_PRIME/{}" \;
done
# The following is required while using core18 + gnome-3-34
Expand Down
Loading