-
-
Notifications
You must be signed in to change notification settings - Fork 294
80 lines (77 loc) · 2.68 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
workflow_call:
env:
CARGO_TERM_COLOR: always
jobs:
check:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
container: fedora:40
steps:
- name: Install core dependencies
run: |
sudo dnf upgrade --refresh -y
sudo dnf install -y gcc gcc-c++ clang python3 make cmake meson git kernel-devel gtk4-devel libadwaita-devel poppler-glib-devel poppler-data alsa-lib-devel appstream-devel desktop-file-utils
- name: Install additional tools
uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Install toolchain
id: toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10
with:
path: |
_mesonbuild/cargo-home/bin/
_mesonbuild/cargo-home/registry/index/
_mesonbuild/cargo-home/registry/cache/
_mesonbuild/cargo-home/git/db/
_mesonbuild/target/
key: cargo-${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.workflow_sha }}
restore-keys: cargo-${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}
- name: Setup
run: |
meson setup --prefix=/usr -Dprofile=devel -Dcli=true -Dci=true _mesonbuild
- name: Run fmt check
run: meson compile cargo-fmt-check -C _mesonbuild
- name: Compile
run: meson compile -v -C _mesonbuild
- name: Install
run: meson install -C _mesonbuild
- name: Run cargo tests
run: meson compile cargo-test -C _mesonbuild
- name: Run meson tests
run: meson test -v -C _mesonbuild
- name: Run clippy for UI
run: meson compile ui-cargo-clippy -C _mesonbuild
continue-on-error: true
- name: Run clippy for CLI
run: meson compile cli-cargo-clippy -C _mesonbuild
continue-on-error: true
- name: Run file compatibility tests
run: |
rnote-cli test\
misc/file-tests/v0-5-5-test.rnote\
misc/file-tests/v0-5-13-test.rnote\
misc/file-tests/v0-6-0-test.rnote\
misc/file-tests/v0-9-0-test.rnote\
- name: Upload test report
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results
path: target/nextest/ci/test-report-junit.xml