forked from openhab/openhabian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (104 loc) · 7.09 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
language: shell
os: linux
# Using latest Ubuntu (not the Travis-CI default) to get latest tool versions in Travis environment
dist: focal
cache: false
git:
submodules: false
quiet: true
services:
- docker
stages:
- BATS tests
- openHABian installation tests
install:
- ./ci-setup.bash travis
jobs:
fast_finish: true
allow_failures:
- stage: BATS tests
include:
- stage: BATS tests
name: BATS tests on virtual 64bit RPi4 running Debian Buster
env: HW=rpi3
arch: arm64
script:
# BATS tests on a 64bit ARMv8 (RPi4) virtual platform, running in a 64bit OS on Travis Arm64 HW
- docker build -t openhabian/bats-openhabian -f Dockerfile.raspberrypi4-64 .
- echo -e "\n\e[36mopenHABian BATS tests running on a\e[31m 64bit OS\e[36m running in a virtual ${HW}...\e[0m\n"
- docker run --name "development-tests" -i openhabian/bats-openhabian bash -c 'bats --tap --recursive --filter "development-." .'
- docker run --name "unit-tests" -i openhabian/bats-openhabian bash -c 'bats --tap --recursive --filter "unit-." .'
- docker run --name "installation-tests" -i openhabian/bats-openhabian bash -c 'bats --tap --recursive --filter "installation-." .'
- docker run --name "destructive-tests" -i openhabian/bats-openhabian bash -c 'bats --tap --recursive --filter "destructive-." .'
- name: BATS tests on virtual 64bit x86 running Ubuntu Focal Fossa
env: HW=amd64
arch: amd64
script:
# BATS tests on a 64bit x86 virtual platform, running in a 64bit OS on Travis amd64 HW
- docker build -t openhabian/bats-openhabian -f Dockerfile.amd64-ubuntu .
- echo -e "\n\e[36mopenHABian BATS tests running on a\e[31m 64bit OS\e[36m running in a virtual ${HW}...\e[0m\n"
- docker run --name "development-tests" -i openhabian/bats-openhabian bash -c 'bats --tap --recursive --filter "development-." .'
- docker run --name "unit-tests" -i openhabian/bats-openhabian bash -c 'bats --tap --recursive --filter "unit-." .'
- docker run --name "installation-tests" -i openhabian/bats-openhabian bash -c 'bats --tap --recursive --filter "installation-." .'
- docker run --name "destructive-tests" -i openhabian/bats-openhabian bash -c 'bats --tap --recursive --filter "destructive-." .'
- stage: openHABian installation tests
name: openHABian installation test with 64bit Azul Java 8 on native amd64
env: HW=amd64
arch: amd64
script:
# 64bit Azul Java 8 on a 64bit amd64 virtual platform, running in a 64bit OS on Travis AMD64 HW
- sed -i 's|^java_opt=.*$|java_opt=Zulu8-64|' build-image/openhabian.conf
- docker build -t openhabian/${HW}-openhabian -f Dockerfile.amd64 .
- echo -e "\n\e[36mopenHABian test installation using 64bit Azul Enterprise Java 8 running on a\e[31m 64bit OS\e[36m running on native ${HW}...\e[0m\n"
- docker run --name "openhabian-${HW}" -d openhabian/${HW}-openhabian;
- docker exec -i "openhabian-${HW}" bash -c './build.bash local-test && mv ~/.profile ~/.bash_profile && /boot/first-boot.bash'
- name: openHABian installation test with 64 bit Azul Java 11 on native amd64 on Ubuntu
env: HW=amd64
arch: amd64
script:
# 64bit Azul Java 11 on a 64bit amd64 virtual platform, running in a 64bit => Ubuntu <= OS on Travis AMD64 HW
- sed -i 's|^java_opt=.*$|java_opt=Zulu11-64|' build-image/openhabian.conf
- docker build -t openhabian/${HW}-openhabian -f Dockerfile.amd64-ubuntu .
- echo -e "\n\e[36mopenHABian test installation using 64bit Azul Enterprise Java 11 running on a\e[31m 64bit Ubuntu\e[36m running on native ${HW}...\e[0m\n"
- docker run --name "openhabian-${HW}" -d openhabian/${HW}-openhabian;
- docker exec -i "openhabian-${HW}" bash -c './build.bash local-test && mv ~/.profile ~/.bash_profile && /boot/first-boot.bash'
- name: openHABian installation test with 32bit Azul Java 8 on virtual RPi2
env: HW=rpi2
arch: arm64
script:
# 32bit Azul Java 8 on a 32bit ARMv7l (RPi2) virtual platform, running in a 32bit OS on Travis Arm64 HW
- sed -i 's|^java_opt=.*$|java_opt=Zulu8-32|' build-image/openhabian.conf
- docker build -t openhabian/${HW}-openhabian -f Dockerfile.raspberry-pi2 .
- echo -e "\n\e[36mopenHABian test installation using 32bit Azul Embedded Java 8 running on a\e[31m 32bit OS\e[36m running in a virtual ${HW}...\e[0m\n"
- docker run --memory="1g" --memory-reservation="1g" --name "openhabian-${HW}" -d openhabian/${HW}-openhabian
- docker exec -i "openhabian-${HW}" bash -c './build.bash local-test && mv ~/.profile ~/.bash_profile && /boot/first-boot.bash'
- name: openHABian installation test with 32bit Azul Java 11 on virtual RPi3
env: HW=rpi3
arch: arm64
script:
# 32bit Azul Java 11 on a 64bit ARMv8 (RPi3) virtual platform, running in a 32bit OS on Travis Arm64 HW
- sed -i 's|^java_opt=.*$|java_opt=Zulu11-32|' build-image/openhabian.conf
- docker build -t openhabian/${HW}-openhabian -f Dockerfile.raspberrypi3 .
- echo -e "\n\e[36mopenHABian test installation using 32bit Azul Embedded Java 11 running on a\e[31m 32bit OS\e[36m running in a virtual ${HW}...\e[0m\n"
- docker run --memory="1g" --memory-reservation="1g" --name "openhabian-${HW}" -d openhabian/${HW}-openhabian;
- docker exec -i "openhabian-${HW}" bash -c './build.bash local-test && mv ~/.profile ~/.bash_profile && /boot/first-boot.bash'
- name: openHABian installation test with 64bit Azul Java 8 on virtual RPi3
env: HW=rpi3
arch: arm64
script:
# 64bit Azul Java 8 on a 64bit ARMv8 (RPi3) virtual platform, running in a 64bit OS on Travis Arm64 HW
- sed -i 's|^java_opt=.*$|java_opt=Zulu8-64|' build-image/openhabian.conf
- docker build -t openhabian/${HW}-openhabian -f Dockerfile.raspberrypi3-64 .
- echo -e "\n\e[36mopenHABian test installation using 64bit Azul Embedded Java 8 running on a\e[31m 64bit OS\e[36m running in a virtual ${HW}...\e[0m\n"
- docker run --memory="2g" --memory-reservation="2g" --name "openhabian-${HW}" -d openhabian/${HW}-openhabian;
- docker exec -i "openhabian-${HW}" bash -c './build.bash local-test && mv ~/.profile ~/.bash_profile && /boot/first-boot.bash'
- name: openHABian installation test with AdoptOpenJDK Java 11 on virtual RPi2
env: HW=rpi2
arch: arm64
script:
# AdoptOpenJDK Java 11 on a 32bit ARMv7l (RPi2) virtual platform, running in a 32bit OS on Travis Arm64 HW
- sed -i 's|^java_opt=.*$|java_opt=Adopt11|' build-image/openhabian.conf
- docker build -t openhabian/${HW}-openhabian -f Dockerfile.raspberry-pi2 .
- echo -e "\n\e[36mopenHABian test installation using AdoptOpenJDK Java 11 running on a\e[31m 32bit OS\e[36m running in a virtual ${HW}...\e[0m\n"
- docker run --memory="1g" --memory-reservation="1g" --name "openhabian-${HW}" -d openhabian/${HW}-openhabian;
- docker exec -i "openhabian-${HW}" bash -c './build.bash local-test && mv ~/.profile ~/.bash_profile && /boot/first-boot.bash'