Skip to content
Draft
Show file tree
Hide file tree
Changes from 7 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
8 changes: 7 additions & 1 deletion .github/workflows/spread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,13 @@ jobs:
- name: Run Spread task
run: |
tools/make_release_tarball --skip-checks
snap run spread-mir-ci.spread -reuse -v ${{ matrix.spread-task }}
snap run spread-mir-ci.spread -reuse -artifacts=./artifacts -v ${{ matrix.spread-task }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.spread-task }}-artifacts
path: artifacts/**

- name: CCache stats
run: cat ${CCACHE_DIR}/ccache.stats
Expand Down
2 changes: 2 additions & 0 deletions spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ environment:
CCACHE_DIR: /root/.ccache
# Needed for precompiled headers (https://ccache.dev/manual/latest.html#_precompiled_headers)
CCACHE_SLOPPINESS: time_macros,pch_defines,include_file_mtime,include_file_ctime
WLPROBE: false
WLPROBE/ubuntu: true

prepare: |
# NOTE: This part of the code needs to be in spread.yaml as it runs before
Expand Down
38 changes: 38 additions & 0 deletions spread/sbuild/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ variants:
summary: Build Deb packages
kill-timeout: 90m

artifacts:
- mir.json

execute: |
cd $SPREAD_PATH

Expand Down Expand Up @@ -160,3 +163,38 @@ execute: |
EOF

fi

if [ "${WLPROBE}" = "true" ]; then
# Regenerate the Wayland Explorer entry for Mir
# Install Mir packages from the locally-built sbuild output in ../
apt-get install --yes --no-install-recommends \
cargo \
jq
apt-get install --yes --no-install-recommends \
${SPREAD_PATH}/../mir-demos_*.deb \
${SPREAD_PATH}/../mir-platform-graphics-stub*.deb \
${SPREAD_PATH}/../mir-platform-input-stub*.deb \
${SPREAD_PATH}/../mir-platform-rendering-egl-generic*.deb

cargo install wlprobe

MIR_VERSION=$(dpkg-query -W -f='${Version}' libmiral-dev | sed 's/-.*//')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot read this from CMakeLists.txt instead

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in af489f5. MIR_VERSION is now read from CMakeLists.txt:

MIR_VERSION=$(sed -n 's/.*VERSION \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/p' "$SPREAD_PATH/CMakeLists.txt" | head -1)

MIR_JSON_OUTPUT="$SPREAD_PATH/$SPREAD_TASK/mir.json"
export XDG_RUNTIME_DIR=/tmp MIR_VERSION MIR_JSON_OUTPUT PATH="$HOME/.cargo/bin:$PATH"

timeout 30 bash -e <<'WLPROBE'

trap "jobs -p | xargs -r kill" SIGINT SIGTERM EXIT

WAYLAND_DISPLAY=wayland-99 miral-app --add-wayland-extension=all &

timeout --preserve-status 5 bash -c "while [ ! -S $XDG_RUNTIME_DIR/wayland-99 ]; do sleep 0.1; done"
[ -S "$XDG_RUNTIME_DIR/wayland-99" ] || { echo "miral-app failed to create Wayland socket at $XDG_RUNTIME_DIR/wayland-99"; exit 1; }

WAYLAND_DISPLAY=wayland-99 wlprobe --unique | \
jq --arg version "$MIR_VERSION" '{generationTimestamp, version:$version, globals}' \
> "$MIR_JSON_OUTPUT"

WLPROBE

fi