build: also test for editline/readline.h #439
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 1.* | |
pull_request: | |
schedule: | |
- cron: 0 7 1 * * | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
config-args: | |
- "--with-embedded-libevent" | |
- "--disable-shared --enable-static" | |
- "--disable-privsep --with-snmp" | |
- "--with-snmp --disable-lldpmed --disable-dot1 --disable-dot3 --disable-custom" | |
- "--enable-oldies" | |
- "--enable-dtrace" | |
- "--with-seccomp" | |
compiler: | |
- gcc | |
release: | |
- false | |
include: | |
- config-args: '' | |
release: true | |
- compiler: clang | |
config-args: "--without-snmp --with-xml" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Unshallow repository | |
if: matrix.release | |
run: | | |
git fetch --tags | |
git fetch --unshallow | |
- name: Install stuff | |
run: ./tests/ci/install.sh | |
- name: Build and run tests | |
run: ./tests/ci/run.sh | |
env: | |
LLDPD_CONFIG_ARGS: ${{ matrix.config-args }} | |
LLDPD_RELEASE: ${{ matrix.release }} | |
CC: ${{ matrix.compiler }} | |
- name: Generate release body | |
if: matrix.release | |
run: ./tests/ci/release.sh build > ./release.md | |
- name: Upload release tarball | |
uses: actions/upload-artifact@v4 | |
if: matrix.release | |
with: | |
name: tarball | |
path: build/lldpd-*.tar.gz | |
if-no-files-found: error | |
- name: Upload release summary | |
uses: actions/upload-artifact@v4 | |
if: matrix.release | |
with: | |
name: release | |
path: release.md | |
if-no-files-found: error | |
build-macos: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
include: | |
- config-args: "--without-snmp --with-xml" | |
release: false | |
- config-args: > | |
--prefix=/usr/local | |
--localstatedir=/var | |
--sysconfdir=/private/etc | |
--with-embedded-libevent | |
--without-snmp | |
--without-xml | |
release: true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install stuff | |
run: ./tests/ci/install.sh | |
- name: Build and run tests | |
run: ./tests/ci/run.sh | |
env: | |
LLDPD_CONFIG_ARGS: ${{ matrix.config-args }} | |
CC: clang | |
- name: Upload MacOS release package | |
uses: actions/upload-artifact@v4 | |
if: matrix.release | |
with: | |
name: package | |
path: build/lldpd-*.pkg | |
if-no-files-found: error | |
build-bsd: | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- name: freebsd | |
version: '13.3' | |
runner: macos-12 | |
hypervisor: qemu | |
- name: netbsd | |
version: '9.3' | |
runner: macos-12 | |
hypervisor: qemu | |
- name: openbsd | |
version: '7.4' | |
runner: macos-12 | |
hypervisor: xhyve | |
runs-on: ${{ matrix.os.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Test on ${{ matrix.os.name }} | |
uses: cross-platform-actions/action@v0.24.0 | |
with: | |
operating_system: ${{ matrix.os.name }} | |
version: ${{ matrix.os.version }} | |
hypervisor: ${{ matrix.os.hypervisor }} | |
environment_variables: LLDPD_CONFIG_ARGS | |
shell: bash | |
run: | | |
set -e | |
./tests/ci/install.sh | |
./tests/ci/run.sh | |
docker: | |
needs: | |
- build-linux | |
- build-macos | |
- build-bsd | |
runs-on: ubuntu-latest | |
name: Build Docker images | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: | | |
ghcr.io/lldpd/lldpd | |
tags: | | |
type=schedule,pattern=master | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Dockerfile | |
platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64,linux/arm/v6' || 'linux/amd64' }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
release: | |
needs: | |
- docker | |
runs-on: ubuntu-latest | |
name: Publish release | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Download TGZ tarball | |
uses: actions/download-artifact@v4 | |
with: | |
name: tarball | |
- name: Download MacOS package | |
uses: actions/download-artifact@v4 | |
with: | |
name: package | |
- name: Download release text | |
uses: actions/download-artifact@v4 | |
with: | |
name: release | |
- name: Publish release | |
uses: softprops/action-gh-release@v2 | |
with: | |
body_path: release.md | |
draft: true | |
files: | | |
*.tar.gz | |
*.pkg | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |