This repository has been archived by the owner on Aug 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
/
.travis.yml
90 lines (77 loc) · 2.63 KB
/
.travis.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
#
# Travis CI config for LibreSignage.
#
dist: bionic
language: php
php:
- '7.2'
services:
- docker
git:
depth: false
branches:
only:
- master
- next
- /v[0-9]+.[0-9]+.x/
- /v[0-9]+.[0-9]+.[0-9]+/
matrix:
include:
- env:
- |
target="apache2-debian-docker"
opts="--feature-imgthumbs"
platform="linux/arm64,linux/arm/v7,linux/arm/v6,linux/amd64"
install:
# Install deps for compilation and multiarch builds.
- |
sudo apt-get update
sudo apt-get install -y librsvg2-bin composer php-xml qemu binfmt-support qemu-user-static
# Install a newer version of Docker.
- |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
# Install a newer version of pandoc (2.7.2).
- |
wget -qO pandoc.deb https://github.com/jgm/pandoc/releases/download/2.7.2/pandoc-2.7.2-1-amd64.deb
sudo dpkg -i pandoc.deb
rm pandoc.deb
before_script:
# Configure the build
- make configure TARGET="$target" PASS="$opts"
# Properly configure Docker to use binfmts_misc.
- |
export DOCKER_CLI_EXPERIMENTAL=enabled
echo "$DOCKER_PASS" | docker login --username="$DOCKER_USER" --password-stdin
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --driver=docker-container --name=lsbuilder --use
docker buildx inspect --bootstrap
script:
# Build and install
- |
set -e
make -j$(nproc)
make install PASS="--tag=eerotal/libresignage:build-tmp --platform=$platform"
# Run integration tests.
- |
set -e
if [ "$target" = "apache2-debian-docker" ]; then
sudo docker run -d -p80:80 "eerotal/libresignage:build-tmp"
make test-api
sudo docker stop $(sudo docker ps -a -q)
fi
deploy:
- provider: script
script: sh build/scripts/travis/docker_rename.sh eerotal nightly "build-tmp" "$TRAVIS_BRANCH-nightly"
on:
all_branches: true
condition: $target = 'apache2-debian-docker'
condition: $TRAVIS_EVENT_TYPE = 'cron'
condition: $ENABLE_NIGHTLY_BUILDS = 1
- provider: script
script: sh build/scripts/travis/docker_rename.sh eerotal release "build-tmp"
on:
tags: true
condition: $target = 'apache2-debian-docker'