mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-02 20:18:38 -05:00
Verify the VectorCraft Unix media adapter on Ubuntu
This commit is contained in:
1 parent
78a1fed433
commit
5a85474500
1 file changed
+78
@@ -0,0 +1,78 @@
|
||||
name: VectorCraft Unix print adapter verification
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [verify/vectorcraft-print-unix-adapter-linux]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
adapter:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 100
|
||||
env:
|
||||
SHARED_REV: 74a9921a433e4b9f9f50ecf211e55f73ef105bff
|
||||
CARGO_PROFILE_DEV_DEBUG: "0"
|
||||
CARGO_PROFILE_TEST_DEBUG: "0"
|
||||
CARGO_INCREMENTAL: "0"
|
||||
CARGO_BUILD_JOBS: "2"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: storytold/craft-common-actions/actions/install-apt-packages@main
|
||||
with:
|
||||
packages: >-
|
||||
pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxcb1-dev libxcursor-dev libxrandr-dev
|
||||
libxi-dev libfontconfig1-dev libfreetype-dev mesa-vulkan-drivers libgl1-mesa-dev libasound2-dev
|
||||
libudev-dev
|
||||
- name: Test the app against the shared catalog candidate
|
||||
run: |
|
||||
set -euo pipefail
|
||||
previous=77ade517ecb2a6ad86feb2f9983a098ad5738fc6
|
||||
sed -i "s/$previous/$SHARED_REV/g" Cargo.toml apps/vectorcraft-web/Cargo.toml
|
||||
cargo test -p vectorcraft-ui-egui --lib dialogs::tests_print | tee "$RUNNER_TEMP/print-dialog-tests.log"
|
||||
grep -F 'shared_cups_forms_keep_exact_keywords_and_apply_the_paper_editor_limits ... ok' "$RUNNER_TEMP/print-dialog-tests.log"
|
||||
grep -F 'shared_cups_ranges_apply_only_for_an_explicit_supported_size ... ok' "$RUNNER_TEMP/print-dialog-tests.log"
|
||||
grep -F 'shared_cups_forms_with_the_same_dimensions_keep_distinct_job_keywords ... ok' "$RUNNER_TEMP/print-dialog-tests.log"
|
||||
cargo test --locked -p vectorcraft --bin vectorcraft printing:: | tee "$RUNNER_TEMP/print-desktop-tests.log"
|
||||
grep -F 'the_chosen_paper_goes_to_cups_as_media ... ok' "$RUNNER_TEMP/print-desktop-tests.log"
|
||||
grep -F 'a_stalled_lookup_holds_the_only_worker_while_the_printer_changes ... ok' "$RUNNER_TEMP/print-desktop-tests.log"
|
||||
|
||||
released-flatpak:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: storytold/craft-common-actions/actions/install-apt-packages@main
|
||||
with:
|
||||
packages: flatpak ostree
|
||||
- name: Check CUPS tools in the distributed x86-64 Flatpak
|
||||
run: |
|
||||
set -euo pipefail
|
||||
bundle="$RUNNER_TEMP/vectorcraft.flatpak"
|
||||
curl --fail --location --silent --show-error --retry 3 \
|
||||
https://github.com/storytold/vectorcraft/releases/download/v0.25.1/vectorcraft-0.25.1-linux-x86_64.flatpak \
|
||||
-o "$bundle"
|
||||
repo="$RUNNER_TEMP/bundle-repo"
|
||||
ostree --repo="$repo" init --mode=archive
|
||||
flatpak build-import-bundle "$repo" "$bundle"
|
||||
ref=$(ostree --repo="$repo" refs | grep '^app/ai.storyteller.vectorcraft/x86_64/')
|
||||
echo "Imported release ref $ref"
|
||||
ostree --repo="$repo" ls "$ref" /files/bin
|
||||
if ostree --repo="$repo" ls "$ref" /files/bin/ipptool >/dev/null 2>&1; then
|
||||
echo "The app bundle includes /app/bin/ipptool."
|
||||
else
|
||||
echo "The app bundle has no /app/bin/ipptool."
|
||||
fi
|
||||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak install --user --noninteractive "$bundle"
|
||||
flatpak run --command=sh ai.storyteller.vectorcraft -c '
|
||||
for tool in lp lpstat lpoptions ipptool; do
|
||||
if path=$(command -v "$tool"); then
|
||||
printf "%s: %s\n" "$tool" "$path"
|
||||
else
|
||||
printf "%s: missing from the installed app and runtime PATH\n" "$tool"
|
||||
fi
|
||||
done
|
||||
'
|
||||
Reference in new issue
Block a user