Cleanup UI resources #334
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: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_HOME: build/cargo-home | |
| CARGO_TARGET_DIR: ${{ github.workspace }}/build/target | |
| jobs: | |
| build: | |
| env: | |
| RUST_LOG: debug | |
| name: Build | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - run: rustup show active-toolchain | |
| - run: rustup component add rustfmt clippy | |
| - name: Configure Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: ". -> build/target" | |
| cache-workspace-crates: true | |
| - 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 \ | |
| desktop-file-utils 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 | |
| mkdir -p ~/.local/bin | |
| meson setup -Dprefix=~/.local/ build | |
| cd build | |
| ninja | |
| cp ./blueprint-compiler ~/.local/bin | |
| echo ~/.local/bin >> $GITHUB_PATH | |
| - name: Setup meson project | |
| run: meson setup -Dprofile=development -Dcargo_locked=true build | |
| - name: Build | |
| run: ninja -C build | |
| - 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 --interactive | |
| working-directory: build/ | |
| - name: Check clippy recommendations | |
| run: cargo clippy --locked --workspace --all-features --target-dir build/target | |
| - name: Check formatting | |
| run: cargo fmt --all --check |