Skip to content

Commit 2f9d050

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 2f9d050

File tree

7 files changed

+177
-7
lines changed

7 files changed

+177
-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: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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-20.04
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+
libsecret-1-dev \
31+
libunwind-dev \
32+
libgtksourceview-3.0-dev \
33+
libpeas-dev \
34+
libvte-2.91-dev
35+
36+
- name: Install D compiler
37+
uses: dlang-community/setup-dlang@v1
38+
with:
39+
compiler: ${{ matrix.dc }}
40+
41+
- name: Build
42+
run: dub build --compiler=$DC
43+
44+
- name: Test
45+
run: dub test --compiler=$DC
46+
47+
48+
build-debian-testing:
49+
name: Debian Testing
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v2
53+
54+
- name: Create Build Environment
55+
run: cd .github/ci/ && docker build -t tilix -f ./Dockerfile-debian-testing .
56+
57+
- name: Build
58+
run: docker run -t -e COMPILER_VENDOR=$CVENDOR -e CC=gcc -e CXX=g++ -v `pwd`:/build tilix
59+
./.github/ci/run-build.sh
60+
61+
- name: Test
62+
run: docker run -t -e COMPILER_VENDOR=$CVENDOR -e CC=gcc -e CXX=g++ -v `pwd`:/build tilix
63+
./.github/ci/run-tests.sh
64+
65+
66+
build-ubuntu:
67+
name: Ubuntu LTS
68+
runs-on: ubuntu-20.04
69+
steps:
70+
- uses: actions/checkout@v2
71+
72+
- name: Create Build Environment
73+
run: sudo ./.github/ci/install-deps-deb.sh
74+
75+
- name: Build
76+
run: CC=gcc CXX=g++ ./.github/ci/run-build.sh
77+
78+
- name: Test
79+
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)