Skip to content

Merge branch 'new-shortcuts' into trunk #864

Merge branch 'new-shortcuts' into trunk

Merge branch 'new-shortcuts' into trunk #864

Workflow file for this run

# Copyright 2024-2026 the Cartero authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later
on:
push:
branches:
- trunk
pull_request:
branches:
- trunk
name: Check
jobs:
check:
name: Check
runs-on: ubuntu-24.04
steps:
- name: dependencies
run: sudo apt update && sudo apt install -y --no-install-recommends gettext meson libgtk-4-dev libadwaita-1-dev libgtksourceview-5-dev desktop-file-utils xvfb
- name: clone
uses: actions/checkout@v4
- name: setup
run: meson setup build
- name: blueprint
run: subprojects/blueprint-compiler/blueprint-compiler.py format data/ui
- name: build
run: ninja -C build
- name: linguas
run: |
for lang in $(cat po/LINGUAS | grep -E '^[a-z]{2,3}$')
do
b=$a
a=$lang
if [[ "$a" < "$b" ]]; then
echo "po/LINGUAS is not sorted alphabetically: $lang"
exit 1
fi
done
- name: update-po-check
run: |
ninja -C build cartero-update-po
! git -c core.pager="" diff -U0 po | grep -v '^@@' | grep 'msgid'
git checkout -- po
- name: glib-schema
run: glib-compile-schemas --targetdir build --strict data
- name: glib-desktop
run: meson devenv -C build desktop-file-validate data/es.danirod.Cartero.desktop
- name: glib-appstream
run: meson devenv -C build appstreamcli validate data/es.danirod.Cartero.metainfo.xml
- name: cargo-fmt
run: meson devenv -C build cargo fmt --manifest-path=../Cargo.toml --check --all
- name: cargo-test
run: |
export GSETTINGS_SCHEMA_DIR=$PWD/build
xvfb-run meson devenv -C build cargo test --workspace --manifest-path=../Cargo.toml
- name: cargo-clippy
run: meson devenv -C build cargo clippy --workspace --manifest-path=../Cargo.toml
- name: cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check licenses
arguments: --workspace
reuse:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check REUSE compliance
uses: fsfe/reuse-action@v5
news:
name: Check NEWS files are properly updated
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update && sudo apt install -y --no-install-recommends python3-pip
pip install --break-system-packages mdformat lxml
- name: Checkout
uses: actions/checkout@v4
- name: Check if news-update.py comes clean
run: |
build-aux/news-update.py
if ! git diff --quiet ; then
echo "NEWS file is not updated, please run build-aux/news-update.py"
exit 1
fi
flake:
strategy:
matrix:
platform:
- runs-on: ubuntu-latest
name: x86_64
- runs-on: ubuntu-24.04-arm
name: aarch64
fail-fast: false
runs-on: ${{ matrix.platform.runs-on }}
name: "Flake (${{ matrix.platform.name }})"
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- run: nix build
- run: nix flake check