-
-
Notifications
You must be signed in to change notification settings - Fork 255
94 lines (89 loc) · 2.92 KB
/
installation-action.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
name: Installation
on:
push:
paths-ignore:
- 'tests/Dockerfile.*-BATS'
- 'build.bash'
- 'build-image/offline-install-modifications.bash'
- '**.md'
- '**.txt'
- '**.html'
- '**.css'
- '**.bats'
- 'docs/**'
- '.github/workflows/**'
- '!.github/workflows/installation-action.yml'
pull_request:
paths-ignore:
- 'tests/Dockerfile.*-BATS'
- 'build.bash'
- 'build-image/offline-install-modifications.bash'
- '**.md'
- '**.txt'
- '**.html'
- '**.css'
- '**.bats'
- 'docs/**'
- '.github/workflows/**'
- '!.github/workflows/installation-action.yml'
jobs:
installation-tests:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
strategy:
matrix:
platform: [rpi5-openjdk17, rpi3-openjdk17, amd64-openjdk17, rpi3-bellsoft21]
include:
- platform: rpi5-openjdk17
dockerfile: ./tests/Dockerfile.rpi5-installation
qemu_platform: arm64
java_opt: "17"
- platform: rpi3-openjdk17
dockerfile: ./tests/Dockerfile.rpi3-installation
qemu_platform: arm
java_opt: "17"
- platform: amd64-openjdk17
dockerfile: ./tests/Dockerfile.amd64-installation
qemu_platform: ""
java_opt: "17"
- platform: rpi3-bellsoft21
dockerfile: ./tests/Dockerfile.rpi3-installation
qemu_platform: arm
java_opt: "BellSoft21"
continue-on-error: true # Experimental currently
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment
run: |
sudo -E ./tests/ci-setup.bash github
sed -i 's|^java_opt=.*$|java_opt=${{ matrix.java_opt }}|' build-image/openhabian.conf
- name: Set up QEMU
if: ${{ matrix.qemu_platform != '' }}
uses: docker/[email protected]
with:
platforms: ${{ matrix.qemu_platform }}
- name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
with:
driver-opts: network=host
- name: Build Docker image
uses: docker/[email protected]
with:
context: .
file: ${{ matrix.dockerfile }}
builder: ${{ steps.buildx.outputs.name }}
tags: localhost:5000/openhabian/${{ matrix.platform }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
- name: openHABian installation test with ${{ matrix.platform }}
run: |
docker run --privileged --rm --name "openhabian-${{ matrix.platform }}" -d localhost:5000/openhabian/${{ matrix.platform }}
docker exec -i "openhabian-${{ matrix.platform }}" bash -c './build.bash local-test && /boot/first-boot.bash'
shell: bash