-
Notifications
You must be signed in to change notification settings - Fork 10
/
.gitlab-ci.yml
91 lines (85 loc) · 3.75 KB
/
.gitlab-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
81
82
83
84
85
86
87
88
89
90
91
image: rust:latest
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak-ci-initiative-sdk-extensions.yml'
stages:
- qa
- test
- flatpak
- review
variables:
RUST_BACKTRACE: 1
GIT_AUTHOR_EMAIL: [email protected]
GIT_AUTHOR_NAME: GNOME CI
GETTEXT_BIN_DIR : /usr/bin
GETTEXT_LIB_DIR: /usr/lib/gettext
GETTEXT_INCLUDE_DIR: /usr/include
GIT_SUBMODULE_STRATEGY: 'normal'
BUNDLE: "org.gnome.Tau.flatpak"
MANIFEST_PATH: "flatpak/org.gnome.Tau.yml"
DBUS_ID: "org.gnome.TauDevel"
TEST_RUN_ARGS: "validate-desktop validate-appdata 'Validate schema file'"
qa:
stage: qa
before_script:
- apt-get update -qq && apt-get install -y libgtk-3-dev gettext appstream-util desktop-file-utils meson gobject-introspection libgirepository1.0-dev libvte-2.91-dev intltool
script:
- pushd po && intltool-update -m && popd
- rustup component add rustfmt
- rustup component add clippy
- cargo fmt -- --check
- wget https://source.puri.sm/Librem5/libhandy/-/archive/v0.0.13/libhandy-v0.0.13.tar.gz
- tar xf libhandy-v0.0.13.tar.gz
- cd libhandy-v0.0.13
- meson -Dprofiling=false -Dintrospection=enabled -Dgtk_doc=false -Dtests=false -Dexamples=false -Dvapi=false -Dglade_vatalog=disabled build
- ninja -C build install
- cargo clippy
test-native:
stage: test
before_script:
- apt-get update -qq && apt-get install -y libgtk-3-dev gettext appstream-util desktop-file-utils meson gobject-introspection libgirepository1.0-dev libvte-2.91-dev
script:
- pushd /tmp
- wget https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip
- mkdir -p ~/.fonts
- unzip 1.050R-it.zip
- cp source-code-pro-*-it/OTF/*.otf ~/.fonts/
- fc-cache -f -v
- wget https://source.puri.sm/Librem5/libhandy/-/archive/v0.0.13/libhandy-v0.0.13.tar.gz
- tar xf libhandy-v0.0.13.tar.gz
- cd libhandy-v0.0.13
- meson -Dprofiling=false -Dintrospection=enabled -Dgtk_doc=false -Dtests=false -Dexamples=false -Dvapi=false -Dglade_vatalog=disabled build
- ninja -C build install
- popd
- meson -Dprofile=development _build
- ninja -C _build test || cargo test --all
test-cross:
stage: test
variables:
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
PKG_CONFIG_ALLOW_CROSS: 1
PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig/
RUST_TARGET: armv7-unknown-linux-gnueabihf
CARGO_BUILD_TARGET : armv7-unknown-linux-gnueabihf
script:
- echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list
- dpkg --add-architecture armhf
- apt-get update && apt-get upgrade -y
- apt-get install -y aptitude
- aptitude install -y gcc-arm-linux-gnueabihf
- aptitude install -y libgtk-3-dev:armhf libhandy-0.0-dev:armhf libvte-2.91-dev:armhf # Install GTK and its dependencies
- aptitude install -y pkg-config # Reinstall pkg-config as aptitude will have uninstalled it for GTK
- rustup target add armv7-unknown-linux-gnueabihf
- apt-get install -y gettext appstream-util desktop-file-utils meson libglib2.0-bin # native deps of Tau
- meson -Dprofile=development build
- ninja -C build # Can't run tests for crosscompiled binaries
flatpak:
extends: '.flatpak'
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:3.36"
stage: 'flatpak'
variables:
MANIFEST_PATH: "flatpak/org.gnome.Tau.yml"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
FLATPAK_MODULE: "Tau"
# Make sure to keep this in sync with the Flatpak manifest, all arguments
# are passed except the config-args because we build it ourselves
MESON_ARGS: "-Dprofile=development"
APP_ID: "org.gnome.TauDevel"