diff --git a/.github/workflows/print-4859-catalog-ubuntu.yml b/.github/workflows/print-4859-catalog-ubuntu.yml new file mode 100644 index 0000000000..54539483f5 --- /dev/null +++ b/.github/workflows/print-4859-catalog-ubuntu.yml @@ -0,0 +1,66 @@ +name: VectorCraft print catalog integration + +on: + push: + branches: [verify/vectorcraft-print-catalog-ubuntu] + +permissions: + contents: read + +jobs: + catalog: + runs-on: ubuntu-24.04 + timeout-minutes: 100 + env: + SHARED_REV: 86deec5c4f8196567296f884109cb76b075dfd70 + CARGO_PROFILE_DEV_DEBUG: "0" + CARGO_PROFILE_TEST_DEBUG: "0" + CARGO_INCREMENTAL: "0" + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + repository: storytold/craft-libs + ref: ${{ env.SHARED_REV }} + path: shared-candidate + 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 cups-daemon cups-client cups-filters poppler-utils + - name: Test the shared printer catalog and page selection + working-directory: shared-candidate + run: | + set -euo pipefail + export CARGO_TARGET_DIR="$RUNNER_TEMP/print-target" + cargo test --locked -p craft-print -p craft-pages | tee "$RUNNER_TEMP/shared-tests.log" + grep -E 'driverless_rolls_keep_the_width_and_length_limits_for_each_roll.*ok' "$RUNNER_TEMP/shared-tests.log" + - name: Verify the output of the combined candidate with a private CUPS queue + working-directory: shared-candidate + run: | + set -euo pipefail + export CARGO_TARGET_DIR="$RUNNER_TEMP/print-target" + cargo build --locked -p craft-print --example print_acceptance + bash crates/print/examples/print_acceptance/cups_capture.sh "$CARGO_TARGET_DIR/debug/examples/print_acceptance" cups-capture + - name: Preserve captured print output + if: always() + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 + with: + name: vectorcraft-shared-cups-output + path: shared-candidate/cups-capture/ + if-no-files-found: ignore + - name: Run VectorCraft print dialog and desktop paper tests with this shared revision + if: ${{ !cancelled() }} + run: | + set -euo pipefail + export CARGO_TARGET_DIR="$RUNNER_TEMP/print-target" + 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/dialog-tests.log" + grep -F 'shared_driver_forms_keep_preset_keys_and_distinguish_precise_sizes ... ok' "$RUNNER_TEMP/dialog-tests.log" + cargo test --locked -p vectorcraft --bin vectorcraft printing::job_settings_tests | tee "$RUNNER_TEMP/desktop-tests.log" + grep -F 'the_chosen_paper_goes_to_cups_as_media ... ok' "$RUNNER_TEMP/desktop-tests.log"