fix(deps): update dependency protobuf to v6 #1476
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_LOG: info | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| test: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Build prompting-client snap | |
| id: snapcraft-client | |
| uses: snapcore/action-build@v1 | |
| - name: Build testing snap | |
| id: snapcraft-testing | |
| uses: snapcore/action-build@v1 | |
| with: | |
| path: testing-snap | |
| - name: Setup snapd and snaps | |
| run: | | |
| # Repack snapd latest/edge to ensure it always has newer version than the .deb | |
| snap download snapd --channel=latest/edge | |
| sudo unsquashfs snapd_*.snap | |
| sudo sed -Ei "s/^version: *'?([^' ]*)'?$/version: '1337.\1'/" squashfs-root/meta/snap.yaml squashfs-root/snap/manifest.yaml | |
| sudo sed -i "s/^VERSION=/VERSION=1337./" squashfs-root/usr/lib/snapd/info | |
| sudo snap pack squashfs-root | |
| sudo snap install --dangerous snapd_1337.*.snap | |
| echo 'PROMPTING_CI=1' | sudo tee -a /etc/environment | |
| echo 'SNAPD_DEBUG=1' | sudo tee -a /etc/environment | |
| sudo snap set system experimental.user-daemons=true | |
| sudo snap install --dangerous ${{ steps.snapcraft-client.outputs.snap }} | |
| sudo snap install --dangerous ${{ steps.snapcraft-testing.outputs.snap }} | |
| sudo snap connect prompting-client:snap-interfaces-requests-control | |
| sudo snap connect aa-prompting-test:camera | |
| sudo snap set system experimental.apparmor-prompting=true | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -y install protobuf-compiler dkms linux-modules-extra-$(uname -r) v4l-utils v4l2loopback-dkms | |
| - name: Setup virtual devices | |
| run: | | |
| sudo modprobe v4l2loopback devices=1 video_nr=0 card_label="Dummy Camera" exclusive_caps=1 | |
| sudo adduser $USER video && newgrp video | |
| sudo chmod 666 /dev/video0 | |
| v4l2-ctl --list-devices | |
| sudo touch /dev/video9 | |
| - name: Check generated files are up to date | |
| working-directory: ./prompting-client | |
| run: | | |
| cargo clean | |
| cargo build | |
| # Compare generated files with committed files | |
| if ! diff -r ./src/protos ./src/protos; then | |
| echo "Protobuf files are not up-to-date. Please regenerate and commit them." | |
| exit 1 | |
| fi | |
| echo "Protobuf files are up-to-date." | |
| - name: Run tests | |
| working-directory: ./prompting-client | |
| run: | | |
| cargo test | |
| cargo test --test mock_server --features dry-run | |
| - name: Print journal on failure | |
| if: ${{ failure() }} | |
| run: | | |
| echo "::group::journalctl" | |
| journalctl -b0 --no-pager | |
| echo "::endgroup::" |