Skip to content

Commit b53c46c

Browse files
committed
ci: Switch to GitHub Actions
With Tilix' low maintenance, having good CI, especially for the widely used Meson buildsystem, is very important to merge PRs with more confidence. GitHub provides computing power for that, and it's easy to use modern Ubuntu and containers on their platform.
1 parent 72c41ba commit b53c46c

File tree

7 files changed

+176
-7
lines changed

7 files changed

+176
-7
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Docker file for Tilix CI tests on Debian Testing
3+
#
4+
FROM debian:testing
5+
6+
# prepare
7+
RUN mkdir -p /build/ci/
8+
9+
# install build dependencies
10+
COPY install-deps-deb.sh /build/ci/
11+
RUN chmod +x /build/ci/install-deps-deb.sh && /build/ci/install-deps-deb.sh
12+
13+
# finish
14+
WORKDIR /build

.github/ci/install-deps-deb.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
#
3+
# Install Tilix build dependencies
4+
#
5+
set -e
6+
set -x
7+
8+
export DEBIAN_FRONTEND=noninteractive
9+
10+
# update caches
11+
apt-get update -qq
12+
13+
# install build essentials
14+
apt-get install -yq \
15+
eatmydata \
16+
build-essential
17+
18+
# install build dependencies
19+
eatmydata apt-get install -yq \
20+
meson \
21+
ninja-build \
22+
appstream \
23+
desktop-file-utils \
24+
dh-dlang \
25+
ldc \
26+
libgtkd-3-dev \
27+
librsvg2-dev \
28+
libsecret-1-dev \
29+
libunwind-dev \
30+
libvted-3-dev \
31+
po4a

.github/ci/run-build.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# This script is supposed to run inside the Tilix Docker container
5+
# on the CI system.
6+
7+
#
8+
# Read options for the current test build
9+
#
10+
11+
build_type=debugoptimized
12+
build_dir="cibuild"
13+
14+
export DC=ldc2
15+
echo "D compiler: $DC"
16+
set -x
17+
$DC --version
18+
19+
#
20+
# Configure build with all flags enabled
21+
#
22+
23+
mkdir $build_dir && cd $build_dir
24+
meson --buildtype=$build_type \
25+
..
26+
27+
#
28+
# Build & Install
29+
#
30+
31+
ninja
32+
DESTDIR=/tmp/install_root/ ninja install
33+
rm -r /tmp/install_root/

.github/ci/run-tests.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# This script is supposed to run inside the Tilix Docker container
5+
# on the CI system.
6+
7+
#
8+
# Read options for the current test run
9+
#
10+
11+
export DC=ldc2
12+
build_dir="cibuild"
13+
14+
#
15+
# Run tests
16+
#
17+
18+
cd $build_dir
19+
meson test --print-errorlogs

.github/workflows/build-test.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build Test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build-dub-ubuntu:
12+
name: Dub
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
dc: [dmd-latest, ldc-latest]
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Install System Dependencies
21+
run: |
22+
sudo apt-get install -yq \
23+
dh-dlang \
24+
libatk1.0-dev \
25+
libcairo2-dev \
26+
libglib2.0-dev \
27+
libgtk-3-dev \
28+
libpango1.0-dev \
29+
librsvg2-dev \
30+
libunwind-dev \
31+
libgtksourceview-3.0-dev \
32+
libpeas-dev \
33+
libvte-2.91-dev
34+
35+
- name: Install D compiler
36+
uses: dlang-community/setup-dlang@v1
37+
with:
38+
compiler: ${{ matrix.dc }}
39+
40+
- name: Build
41+
run: dub build --compiler=$DC
42+
43+
- name: Test
44+
run: dub test --compiler=$DC
45+
46+
47+
build-debian-testing:
48+
name: Debian Testing
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v2
52+
53+
- name: Create Build Environment
54+
run: cd .github/ci/ && docker build -t tilix -f ./Dockerfile-debian-testing .
55+
56+
- name: Build
57+
run: docker run -t -e COMPILER_VENDOR=$CVENDOR -e CC=gcc -e CXX=g++ -v `pwd`:/build tilix
58+
./.github/ci/run-build.sh
59+
60+
- name: Test
61+
run: docker run -t -e COMPILER_VENDOR=$CVENDOR -e CC=gcc -e CXX=g++ -v `pwd`:/build tilix
62+
./.github/ci/run-tests.sh
63+
64+
65+
build-ubuntu:
66+
name: Ubuntu LTS
67+
runs-on: ubuntu-20.04
68+
steps:
69+
- uses: actions/checkout@v2
70+
71+
- name: Create Build Environment
72+
run: sudo ./.github/ci/install-deps-deb.sh
73+
74+
- name: Build
75+
run: CC=gcc CXX=g++ ./.github/ci/run-build.sh
76+
77+
- name: Test
78+
run: CC=gcc CXX=g++ ./.github/ci/run-tests.sh

.travis.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/gnunn1/tilix.svg?branch=master)](https://travis-ci.org/gnunn1/tilix)
1+
![Build Status](https://github.com/gnunn1/tilix/workflows/Build%20Test/badge.svg)
22
[![Translation status](https://hosted.weblate.org/widgets/tilix/-/svg-badge.svg)](https://hosted.weblate.org/engage/tilix/?utm_source=widget)
33
# Tilix
44
A tiling terminal emulator for Linux using GTK+ 3. The Tilix web site for users is available at [https://gnunn1.github.io/tilix-web](https://gnunn1.github.io/tilix-web).

0 commit comments

Comments
 (0)