Files
firezone/scripts/tests/gui-client-install-linux-deb.sh
Thomas Eizinger 411c9b7899 ci: split installation test for GUI client into separate script (#7851)
In #7795, we optimised our CI pipeline to only test the installation of
the GUI client whenever we actually upload to the draft release. This
trigger has been moved to `workflow_dispatch`, meaning no CI builds
neither from PRs nor `main` perform these steps.

This makes it difficult to test GUI client binaries from PRs because
they also no longer get uploaded to the artifacts of the CI run on the
PR.

To fix this, we split the testing away from the rename script and
unconditionally run the rename script, which allows us to also always
upload the binaries to the CI artifacts.

Finally, uploading to the draft releases is only done when we explicitly
trigger the workflow from `main`. This is a defense-in-depth measure: We
should never publish a code to a release that hasn't been merged to
`main`.
2025-01-24 06:00:11 +00:00

33 lines
943 B
Bash
Executable File

#!/usr/bin/env bash
#
# Runs from `rust/gui-client` or `rust/tauri-client`
set -euox pipefail
SERVICE_NAME=firezone-client-ipc
function debug_exit() {
systemctl status "$SERVICE_NAME"
exit 1
}
# Test the deb package, since this script is the easiest place to get a release build
DEB_PATH=$(realpath "$BINARY_DEST_PATH.deb")
sudo apt-get install "$DEB_PATH"
# Debug-print the files. The icons and both binaries should be in here
dpkg --listfiles firezone-client-gui
# Print the deps
dpkg --info "$DEB_PATH"
# Confirm that both binaries and at least one icon were installed
which firezone-client-gui firezone-client-ipc
stat /usr/share/icons/hicolor/512x512/apps/firezone-client-gui.png
# Make sure the binary got built, packaged, and installed, and at least
# knows its own name
firezone-client-gui --help | grep "Usage: firezone-client-gui"
# Make sure the IPC service is running
systemctl status "$SERVICE_NAME" || debug_exit