name: Packages on: push: branches: - master pull_request: {} jobs: deb: name: .deb strategy: matrix: distro: - name: debian codename: buster has32bit: true - name: debian codename: stretch has32bit: true - name: debian codename: jessie has32bit: true - name: ubuntu codename: focal has32bit: false - name: ubuntu codename: bionic has32bit: true - name: ubuntu codename: xenial has32bit: true 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.name }}/${{ matrix.distro.codename }} \ icinga-build-deb-source - name: Restore/backup ccache id: ccache uses: actions/cache@v1 with: path: deb-icinga2/ccache key: '${{ matrix.distro.name }}/${{ matrix.distro.codename }}-ccache' - name: Binary x64 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.name }}/${{ matrix.distro.codename }} \ icinga-build-deb-binary - name: Binary x86 if: matrix.distro.has32bit 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.name }}/${{ matrix.distro.codename }}:x86 \ icinga-build-deb-binary - name: Test x64 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.name }}/${{ matrix.distro.codename }} \ icinga-build-test - name: Test x86 if: matrix.distro.has32bit 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.name }}/${{ matrix.distro.codename }}:x86 \ icinga-build-test - name: Artifacts uses: actions/upload-artifact@v1 with: name: '${{ matrix.distro.name }}-${{ matrix.distro.codename }}-packages' path: deb-icinga2/build rpm: name: .rpm strategy: matrix: distro: - name: centos release: 8 - name: centos release: 7 - name: centos release: 6 - name: fedora release: 32 - name: fedora release: 31 - name: fedora release: 30 - name: fedora release: 29 - name: opensuse release: '15.1' - name: opensuse release: '15.0' runs-on: ubuntu-latest steps: - name: Checkout HEAD uses: actions/checkout@v1 - name: rpm-icinga2 run: | set -exo pipefail git clone https://git.icinga.com/packaging/rpm-icinga2.git chmod o+w rpm-icinga2 - name: Restore/backup ccache id: ccache uses: actions/cache@v1 with: path: rpm-icinga2/ccache key: '${{ matrix.distro.name }}/${{ matrix.distro.release }}-ccache' - name: Binary run: | set -exo pipefail git checkout -B master if [ -e rpm-icinga2/ccache ]; then chmod -R o+w rpm-icinga2/ccache fi docker run --rm \ -v "$(pwd)/rpm-icinga2:/rpm-icinga2" \ -v "$(pwd)/.git:/icinga2.git:ro" \ -w /rpm-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.name }}/${{ matrix.distro.release }} \ icinga-build-package - name: Test run: | set -exo pipefail docker run --rm \ -v "$(pwd)/rpm-icinga2:/rpm-icinga2" \ -w /rpm-icinga2 \ -e ICINGA_BUILD_PROJECT=icinga2 \ -e ICINGA_BUILD_TYPE=snapshot \ registry.icinga.com/build-docker/${{ matrix.distro.name }}/${{ matrix.distro.release }} \ icinga-build-test - name: Artifacts uses: actions/upload-artifact@v1 with: name: '${{ matrix.distro.name }}-${{ matrix.distro.release }}-packages' path: rpm-icinga2/build