commit b93c86aa2f37e6a464d11e46caecb11dab056176 from: Thomas Adam date: Thu Jun 06 16:47:13 2024 UTC CI: add cirrus-ci mechanics This adds the ability to run changes for CI across different platforms. Only used on GitHub for now. commit - f6fb796a41af1721a0e62904bb413fd6ca8d4f33 commit + b93c86aa2f37e6a464d11e46caecb11dab056176 blob - /dev/null blob + d536d642405e2d86c71acddefbcaadda429739ad (mode 644) --- /dev/null +++ .cirrus.yml @@ -0,0 +1,26 @@ +telescope_ubuntu_task: + container: + image: ubuntu:latest + before_build_script: .github/ci/before-install.sh + build:script: .github/ci/build.sh + test_script: make install + +telescope_alpine_linux_task: + container: + image: alpine:latest + script: + - apk add git build-base bsd-compat-headers bison automake make autoconf libbsd-dev libressl-dev ncurses-dev + - .github/ci/build.sh + +telescope_freebsd_task: + freebsd_instance: + image_family: freebsd-14-0 + before_build_script: .github/ci/before-install.sh + build:script: .github/ci/build.sh + test_script: make install + +telescope_macos_task: + macos_instance: + image: ghcr.io/cirruslabs/macos-ventura-base:latest + before_build_script: .github/ci/before-install.sh + build:script: .github/ci/build.sh blob - /dev/null blob + 291854b715e5dece665b4f7dd853f2f7cecea8c6 (mode 755) --- /dev/null +++ .github/ci/before-install.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +if [ "$CIRRUS_OS" = "linux" ]; then + apt-get update -qq && \ + apt-get -y install bison autoconf \ + autotools-dev \ + libncurses5-dev \ + pkg-config \ + build-essential \ + libssl-dev \ + libbsd-dev \ + git \ + libtls-dev +fi + +if [ "$CIRRUS_OS" = "freebsd" ]; then + pkg install -y \ + automake \ + pkgconf \ + git \ + libretls +fi + +if [ "$CIRRUS_OS" = "darwin" ]; then + brew install autoconf \ + automake \ + bison \ + pkg-config \ + ncurses \ + git \ + libressl \ + libretls +fi blob - /dev/null blob + 2c026400fa305c2d7a53ed4fd25940514b9762f7 (mode 755) --- /dev/null +++ .github/ci/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +./autogen.sh || exit 1 +./configure || exit 1 +exec make