Skip to content

Fix service script on Openhabian (and every other *nix) #1473

Fix service script on Openhabian (and every other *nix)

Fix service script on Openhabian (and every other *nix) #1473

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:
amd64-openjdk11:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment
run: |
sudo -E ./tests/ci-setup.bash github
- 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: ./tests/Dockerfile.amd64-installation
builder: ${{ steps.buildx.outputs.name }}
tags: localhost:5000/openhabian/amd64-openhabian:latest
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
- name: openHABian installation test with OpenJDK 11 on native amd64
run: |
docker run --privileged --rm --name "openhabian-amd64" -d localhost:5000/openhabian/amd64-openhabian
docker exec -i "openhabian-amd64" bash -c './build.bash local-test && /boot/first-boot.bash'
shell: bash
rpi3-openjdk11:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment
run: |
sudo -E ./tests/ci-setup.bash github
- name: Set up QEMU
uses: docker/[email protected]
with:
platforms: arm
- 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: ./tests/Dockerfile.rpi3-installation
builder: ${{ steps.buildx.outputs.name }}
tags: localhost:5000/openhabian/rpi3-openhabian:latest
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
- name: openHABian installation test with OpenJDK 11 on a virtual RPi3
run: |
docker run --privileged --rm --name "openhabian-rpi3" -d localhost:5000/openhabian/rpi3-openhabian
docker exec -i "openhabian-rpi3" bash -c './build.bash local-test && /boot/first-boot.bash'
shell: bash
rpi3-64-openjdk11:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment
run: |
sudo -E ./tests/ci-setup.bash github
- name: Set up QEMU
uses: docker/[email protected]
with:
platforms: arm64
- 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: ./tests/Dockerfile.rpi3-64-installation
builder: ${{ steps.buildx.outputs.name }}
tags: localhost:5000/openhabian/rpi3-64-openhabian:latest
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
- name: openHABian installation test with OpenJDK 11 on a virtual RPi3-64
run: |
docker run --privileged --rm --name "openhabian-rpi3-64" -d localhost:5000/openhabian/rpi3-64-openhabian
docker exec -i "openhabian-rpi3-64" bash -c './build.bash local-test && /boot/first-boot.bash'
shell: bash
amd64-openjdk17:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
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=17|' build-image/openhabian.conf
- 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: ./tests/Dockerfile.amd64-installation
builder: ${{ steps.buildx.outputs.name }}
tags: localhost:5000/openhabian/amd64-openhabian:latest
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
- name: openHABian installation test with OpenJDK 17 on native amd64
run: |
docker run --privileged --rm --name "openhabian-amd64" -d localhost:5000/openhabian/amd64-openhabian
docker exec -i "openhabian-amd64" bash -c './build.bash local-test && /boot/first-boot.bash'
shell: bash
rpi3-openjdk17:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
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=17|' build-image/openhabian.conf
- name: Set up QEMU
uses: docker/[email protected]
with:
platforms: arm
- 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: ./tests/Dockerfile.rpi3-installation
builder: ${{ steps.buildx.outputs.name }}
tags: localhost:5000/openhabian/rpi3-openhabian:latest
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
- name: openHABian installation test with OpenJDK 17 on a virtual RPi3
run: |
docker run --privileged --rm --name "openhabian-rpi3" -d localhost:5000/openhabian/rpi3-openhabian
docker exec -i "openhabian-rpi3" bash -c './build.bash local-test && /boot/first-boot.bash'
shell: bash
rpi3-64-openjdk17:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
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=17|' build-image/openhabian.conf
- name: Set up QEMU
uses: docker/[email protected]
with:
platforms: arm64
- 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: ./tests/Dockerfile.rpi3-64-installation
builder: ${{ steps.buildx.outputs.name }}
tags: localhost:5000/openhabian/rpi3-64-openhabian:latest
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
- name: openHABian installation test with OpenJDK 17 on a virtual RPi3-64
run: |
docker run --privileged --rm --name "openhabian-rpi3-64" -d localhost:5000/openhabian/rpi3-64-openhabian
docker exec -i "openhabian-rpi3-64" bash -c './build.bash local-test && /boot/first-boot.bash'
shell: bash