-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
7 changed files
with
177 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Build Test | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
|
||
build-dub-ubuntu: | ||
name: Dub | ||
runs-on: ubuntu-20.04 | ||
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 \ | ||
libsecret-1-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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters