Skip to content

Commit

Permalink
ci: Switch to GitHub Actions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ximion committed Jan 18, 2021
1 parent 72c41ba commit b53c46c
Show file tree
Hide file tree
Showing 7 changed files with 176 additions and 7 deletions.
14 changes: 14 additions & 0 deletions .github/ci/Dockerfile-debian-testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Docker file for Tilix CI tests on Debian Testing
#
FROM debian:testing

# prepare
RUN mkdir -p /build/ci/

# install build dependencies
COPY install-deps-deb.sh /build/ci/
RUN chmod +x /build/ci/install-deps-deb.sh && /build/ci/install-deps-deb.sh

# finish
WORKDIR /build
31 changes: 31 additions & 0 deletions .github/ci/install-deps-deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
#
# Install Tilix build dependencies
#
set -e
set -x

export DEBIAN_FRONTEND=noninteractive

# update caches
apt-get update -qq

# install build essentials
apt-get install -yq \
eatmydata \
build-essential

# install build dependencies
eatmydata apt-get install -yq \
meson \
ninja-build \
appstream \
desktop-file-utils \
dh-dlang \
ldc \
libgtkd-3-dev \
librsvg2-dev \
libsecret-1-dev \
libunwind-dev \
libvted-3-dev \
po4a
33 changes: 33 additions & 0 deletions .github/ci/run-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh
set -e

# This script is supposed to run inside the Tilix Docker container
# on the CI system.

#
# Read options for the current test build
#

build_type=debugoptimized
build_dir="cibuild"

export DC=ldc2
echo "D compiler: $DC"
set -x
$DC --version

#
# Configure build with all flags enabled
#

mkdir $build_dir && cd $build_dir
meson --buildtype=$build_type \
..

#
# Build & Install
#

ninja
DESTDIR=/tmp/install_root/ ninja install
rm -r /tmp/install_root/
19 changes: 19 additions & 0 deletions .github/ci/run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
set -e

# This script is supposed to run inside the Tilix Docker container
# on the CI system.

#
# Read options for the current test run
#

export DC=ldc2
build_dir="cibuild"

#
# Run tests
#

cd $build_dir
meson test --print-errorlogs
78 changes: 78 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

build-dub-ubuntu:
name: Dub
runs-on: ubuntu-latest
strategy:
matrix:
dc: [dmd-latest, ldc-latest]
steps:
- uses: actions/checkout@v2

- name: Install System Dependencies
run: |
sudo apt-get install -yq \
dh-dlang \
libatk1.0-dev \
libcairo2-dev \
libglib2.0-dev \
libgtk-3-dev \
libpango1.0-dev \
librsvg2-dev \
libunwind-dev \
libgtksourceview-3.0-dev \
libpeas-dev \
libvte-2.91-dev
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}

- name: Build
run: dub build --compiler=$DC

- name: Test
run: dub test --compiler=$DC


build-debian-testing:
name: Debian Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Create Build Environment
run: cd .github/ci/ && docker build -t tilix -f ./Dockerfile-debian-testing .

- name: Build
run: docker run -t -e COMPILER_VENDOR=$CVENDOR -e CC=gcc -e CXX=g++ -v `pwd`:/build tilix
./.github/ci/run-build.sh

- name: Test
run: docker run -t -e COMPILER_VENDOR=$CVENDOR -e CC=gcc -e CXX=g++ -v `pwd`:/build tilix
./.github/ci/run-tests.sh


build-ubuntu:
name: Ubuntu LTS
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Create Build Environment
run: sudo ./.github/ci/install-deps-deb.sh

- name: Build
run: CC=gcc CXX=g++ ./.github/ci/run-build.sh

- name: Test
run: CC=gcc CXX=g++ ./.github/ci/run-tests.sh
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/gnunn1/tilix.svg?branch=master)](https://travis-ci.org/gnunn1/tilix)
![Build Status](https://github.com/gnunn1/tilix/workflows/Build%20Test/badge.svg)
[![Translation status](https://hosted.weblate.org/widgets/tilix/-/svg-badge.svg)](https://hosted.weblate.org/engage/tilix/?utm_source=widget)
# Tilix
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).
Expand Down

0 comments on commit b53c46c

Please sign in to comment.