mirror of https://github.com/Icinga/icinga2.git
80 lines
2.0 KiB
YAML
80 lines
2.0 KiB
YAML
|
name: Packages
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- master
|
||
|
pull_request: {}
|
||
|
|
||
|
jobs:
|
||
|
deb:
|
||
|
name: .deb
|
||
|
|
||
|
strategy:
|
||
|
matrix:
|
||
|
distro:
|
||
|
- debian/buster
|
||
|
- debian/stretch
|
||
|
- debian/jessie
|
||
|
- ubuntu/focal
|
||
|
- ubuntu/bionic
|
||
|
- ubuntu/xenial
|
||
|
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout HEAD
|
||
|
uses: actions/checkout@v1
|
||
|
|
||
|
- name: deb-icinga2
|
||
|
run: |
|
||
|
set -exo pipefail
|
||
|
git clone https://git.icinga.com/packaging/deb-icinga2.git
|
||
|
chmod o+w deb-icinga2
|
||
|
|
||
|
- name: Source
|
||
|
run: |
|
||
|
set -exo pipefail
|
||
|
git checkout -B master
|
||
|
docker run --rm \
|
||
|
-v "$(pwd)/deb-icinga2:/deb-icinga2" \
|
||
|
-v "$(pwd)/.git:/icinga2.git:ro" \
|
||
|
-w /deb-icinga2 \
|
||
|
-e ICINGA_BUILD_PROJECT=icinga2 \
|
||
|
-e ICINGA_BUILD_TYPE=snapshot \
|
||
|
-e UPSTREAM_GIT_URL=file:///icinga2.git \
|
||
|
registry.icinga.com/build-docker/${{ matrix.distro }} \
|
||
|
icinga-build-deb-source
|
||
|
|
||
|
- name: Restore/backup ccache
|
||
|
id: ccache
|
||
|
uses: actions/cache@v1
|
||
|
with:
|
||
|
path: deb-icinga2/ccache
|
||
|
key: '${{ matrix.distro }}-ccache'
|
||
|
|
||
|
- name: Binary
|
||
|
run: |
|
||
|
set -exo pipefail
|
||
|
if [ -e deb-icinga2/ccache ]; then
|
||
|
chmod -R o+w deb-icinga2/ccache
|
||
|
fi
|
||
|
docker run --rm \
|
||
|
-v "$(pwd)/deb-icinga2:/deb-icinga2" \
|
||
|
-w /deb-icinga2 \
|
||
|
-e ICINGA_BUILD_PROJECT=icinga2 \
|
||
|
-e ICINGA_BUILD_TYPE=snapshot \
|
||
|
registry.icinga.com/build-docker/${{ matrix.distro }} \
|
||
|
icinga-build-deb-binary
|
||
|
|
||
|
- name: Test
|
||
|
run: |
|
||
|
set -exo pipefail
|
||
|
docker run --rm \
|
||
|
-v "$(pwd)/deb-icinga2:/deb-icinga2" \
|
||
|
-w /deb-icinga2 \
|
||
|
-e ICINGA_BUILD_PROJECT=icinga2 \
|
||
|
-e ICINGA_BUILD_TYPE=snapshot \
|
||
|
registry.icinga.com/build-docker/${{ matrix.distro }} \
|
||
|
icinga-build-test
|