Changes to GitHub Actions #259
Workflow file for this run
This file contains 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
# Copyright 2024-2025 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 | |
env: | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
steps: | |
- name: sccache | |
uses: mozilla-actions/[email protected] | |
- 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: i18n | |
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: linguas | |
run: | | |
ninja -C build cartero-update-po | |
! git -c core.pager="" diff -U0 po | grep -v '^@@' | grep 'msgid' | |
git checkout -- po | |
- name: blueprint | |
run: subprojects/blueprint-compiler/blueprint-compiler.py format data/ui | |
- name: build | |
run: ninja -C build | |
- name: cargo-fmt | |
run: meson devenv -C build cargo fmt --manifest-path=../Cargo.toml --check --all | |
- name: cargo-test | |
run: xvfb-run meson devenv -C build cargo test --manifest-path=../Cargo.toml | |
- name: cargo-clippy | |
run: meson devenv -C build cargo clippy --manifest-path=../Cargo.toml | |
- name: glib-schema | |
run: glib-compile-schemas --validate data/es.danirod.Cartero.xml | |
- 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.appdata.xml |