Repository navigation
daemon: Share credential lifecycle across transports #461
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: Build project | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build: | |
| env: | |
| RUST_LOG: debug | |
| CARGO_TERM_COLOR: always | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Set up environment variables | |
| run: | | |
| echo "BUILD_DIR=${{ runner.temp }}/build" >> $GITHUB_ENV | |
| echo "CARGO_HOME=${{ runner.temp }}/build/cargo-home" >> $GITHUB_ENV | |
| echo "CARGO_TARGET_DIR=${{ runner.temp }}/build/target" >> $GITHUB_ENV | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: rustup install | |
| - run: rustup show active-toolchain | |
| - name: Configure Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: ". -> ${{ env.CARGO_TARGET_DIR }}" | |
| - name: Update apt cache | |
| run: sudo apt update | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt install -y --no-install-recommends \ | |
| curl git build-essential \ | |
| libgtk-4-dev libclang-dev libdbus-1-dev libssl-dev libudev-dev libnfc-dev \ | |
| libpcsclite-dev libxml2-utils \ | |
| appstream-util gettext ninja-build python3-pip \ | |
| udev zip | |
| - name: Set up mold as default linker | |
| uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 | |
| - name: Install Meson | |
| run: | | |
| # Newer version needed for --interactive flag needed below | |
| python3 -m pip install --user -v 'meson==1.8.5' | |
| - name: Install blueprint-compiler | |
| run: | | |
| git clone \ | |
| -c advice.detachedHead=false \ | |
| --depth 1 \ | |
| --branch v0.20.4 \ | |
| https://gitlab.gnome.org/GNOME/blueprint-compiler.git \ | |
| ${{ runner.temp }}/blueprint-compiler | |
| cd ${{ runner.temp }}/blueprint-compiler | |
| # pinned hash of 0.20.4 | |
| git checkout --detach 31b62c24a72c1670d2d93dcdf2d130f1ae12778e | |
| echo "Making zipapp of blueprint-compiler" | |
| mkdir build | |
| echo "from blueprintcompiler import main; main.main('0.24.0', None, None)" > build/__main__.py | |
| cp -vr blueprintcompiler build/ | |
| cd build | |
| zip -r blueprint-compiler.zip __main__.py blueprintcompiler/ | |
| echo "#!/usr/bin/env python3" | cat - blueprint-compiler.zip > blueprint-compiler | |
| chmod +x ./blueprint-compiler | |
| rm -rf blueprintcompiler blueprint-compiler.zip | |
| mkdir -p ~/.local/bin | |
| cp ./blueprint-compiler ~/.local/bin | |
| echo ~/.local/bin >> $GITHUB_PATH | |
| - name: Setup meson project | |
| run: meson setup -Dprofile=development -Dcargo_locked=true $BUILD_DIR | |
| - name: Build | |
| run: ninja -C $BUILD_DIR | |
| - name: Test | |
| # We have to use the --interactive flag because of some | |
| # weird issue with meson hanging after cargo exits due to the TestDBus. | |
| # Probably has to do with forking the test processes. | |
| run: meson test -C $BUILD_DIR --interactive | |
| - name: Check clippy recommendations | |
| run: cargo clippy --locked --workspace --all-features -- -Dwarnings | |
| - name: Check formatting | |
| run: cargo fmt --all --check |