Update to GTK4 and drop X11 dependency #20
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
name: CI | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
merge_group: | |
types: [checks_requested] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: fedora:latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install build dependencies | |
run: sudo dnf -y install clang cmake gtk4-devel ibus-devel libadwaita-devel libX11-devel libchewing-devel ibus gettext xorg-x11-server-Xvfb dbus-x11 util-linux | |
- name: Build | |
run: | | |
cmake --preset default | |
cmake --build --preset default --verbose | |
cmake --build --preset default -t install --verbose | |
- name: Test | |
run: | | |
glib-compile-schemas src/setup --targetdir=out/build/default/bin | |
xvfb-run -a ctest --test-dir out/build/default --output-on-failure --verbose | |
coverage: | |
runs-on: ubuntu-latest | |
container: fedora:latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install build dependencies | |
run: sudo dnf -y install clang cmake gtk4-devel ibus-devel libadwaita-devel libX11-devel libchewing-devel ibus gettext xorg-x11-server-Xvfb dbus-x11 util-linux | |
- name: Install llvm | |
run: | | |
sudo dnf -y install llvm rustup | |
rustup-init -y | |
rustup component add llvm-tools | |
- name: Setup grcov | |
run: | | |
curl -LO https://github.com/mozilla/grcov/releases/download/v0.8.19/grcov-x86_64-unknown-linux-gnu.tar.bz2 | |
echo 098be4d60b8016913542d58456fea6e771890096d1bf86e7f83dac650ba4b58a grcov-x86_64-unknown-linux-gnu.tar.bz2 | sha256sum -c - | |
tar xf grcov-x86_64-unknown-linux-gnu.tar.bz2 | |
- name: Build | |
run: | | |
cmake --preset c99-coverage | |
cmake --build --preset c99-coverage --verbose | |
- name: Test | |
run: | | |
glib-compile-schemas src/setup --targetdir=out/build/c99-coverage/bin | |
xvfb-run -a ctest --test-dir out/build/c99-coverage --output-on-failure --verbose | |
./grcov . -s . -b . --keep-only 'src/*' --llvm -t lcov -o coverage.lcov | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
# https://github.com/orgs/community/discussions/26822 | |
results: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
name: Final Results | |
needs: [build] | |
steps: | |
- run: exit 1 | |
# see https://stackoverflow.com/a/67532120/4907315 | |
if: >- | |
${{ | |
contains(needs.*.result, 'failure') | |
|| contains(needs.*.result, 'cancelled') | |
}} |