Skip to content

Commit

Permalink
Build mir-libs for both core22 and core24
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGriffiths committed May 1, 2024
1 parent 55215d5 commit 5ac76e4
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,20 @@ jobs:
fail-fast: false
matrix:
architecture: ${{ fromJSON(needs.arches.outputs.arches) }}
base: ["22", "24"]

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for version determination

- name: Tweak the snapcraft.yaml
run: |
if [ "${{ matrix.base }}" == "24" ]; then
mv snap/core24~snapcraft.yaml snap/snapcraft.yaml
fi
- name: Build and publish the snap
uses: canonical/actions/build-snap@release
with:
Expand All @@ -49,7 +56,7 @@ jobs:
launchpad-credentials: ${{ secrets.LAUNCHPAD_CREDENTIALS }}
launchpad-accept-public-upload: true
publish: ${{ github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name }}
publish-channel: 22/edge/pr${{ github.event.number }}
publish-channel: ${{ matrix.base }}/edge/pr${{ github.event.number }}

snap:
# Only run if we have access to secrets.
Expand Down
105 changes: 105 additions & 0 deletions snap/core24~snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: mir-libs
base: core24
build-base: devel
summary: The fast, open and secure display server for any device - build environment
description: |
Mir is a display server running on linux systems, with a focus on efficiency,
robust operation and a well-defined driver model.
This snap contains the build environment necessary to build Mir display servers.
confinement: strict
adopt-info: mir

parts:
mir:
plugin: cmake
source: .
cmake-parameters:
- -DCMAKE_INSTALL_PREFIX=/usr
- -DMIR_ENABLE_WLCS_TESTS=OFF
- -DMIR_PLATFORM='gbm-kms;eglstream-kms;x11;wayland'
build-packages:
- build-essential
- eglexternalplatform-dev
- git
- libboost-date-time-dev
- libboost-filesystem-dev
- libboost-iostreams-dev
- libboost-program-options-dev
- libcapnp-dev
- libdrm-dev
- libegl1-mesa-dev
- libepoxy-dev
- libfreetype-dev
- libgbm-dev
- libglm-dev
- libgtest-dev
- libinput-dev
- liblttng-ust-dev
- libnvidia-egl-wayland-dev
- libudev-dev
- libumockdev-dev
- libwayland-dev
- libxcb-composite0-dev
- libxcb-randr0-dev
- libx11-xcb-dev
- libxcursor-dev
- libxkbcommon-dev
- libxkbcommon-x11-dev
- libxml++2.6-dev
- libyaml-cpp-dev
- nettle-dev
- python3-pil
- systemtap-sdt-dev
stage-packages:
- libboost-filesystem1.83.0
- libboost-iostreams1.83.0
- libboost-program-options1.83.0
- libcapnp-1.0.1
- libdrm2
- libegl1
- libepoxy0
- libevdev2
- libfreetype6
- libgbm1
- libgles2
- libglibmm-2.4-1t64
- libglvnd0
- libgudev-1.0-0
- libicu74
- libinput10
- liblttng-ust1t64
- libmtdev1t64
- libnuma1
- libnvidia-egl-wayland1
- libpng16-16t64
- libsigc++-2.0-0v5
- liburcu8t64
- libwacom9
- libwayland-client0
- libwayland-egl1
- libwayland-server0
- libx11-6
- libxau6
- libxcb-composite0
- libxcb-randr0
- libxcb-render0
- libxcb-xfixes0
- libxcb1
- libx11-xcb1
- libxcursor1
- libxdmcp6
- libxfixes3
- libxkbcommon0
- libxkbcommon-x11-0
- libxml++2.6-2v5
- libxml2
- libxrender1
- libyaml-cpp0.8
override-pull: |
craftctl default
# work around https://github.com/diddlesnaps/snapcraft-multiarch-action/issues/22
git config --global --add safe.directory ${CRAFT_PART_SRC}
craftctl set version=$( git describe | awk -F- '{ gsub(/^v/, "", $1); printf $1; if ($2) { printf "+dev" $2 "-" $3 } }' )
craftctl set grade=$( [[ $( git describe ) =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo stable || echo devel )

0 comments on commit 5ac76e4

Please sign in to comment.