From afb07b170d1b520458da81b0e483653f8c20a479 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Thu, 18 Jun 2020 20:08:31 -0400 Subject: [PATCH] add Cirrus-CI --- .cirrus.yml | 44 ++++++++++++++++++++++++++++++++++++++++ tools/install-build-pkgs | 26 +++++++++++++++++++----- 2 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 00000000..ba419f2e --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,44 @@ +freebsd_task: + name: "freebsd:12.1" + freebsd_instance: + image_family: freebsd-12-1 + env: + ASSUME_ALWAYS_YES: yes + script: + - tools/install-build-pkgs + - gmake + +linux_task: + name: "alpine:3.11" + container: + image: alpine:3.11 + cpu: 4 + memory: 2G + timeout_in: 10m + script: + - tools/install-build-pkgs + - make STATIC=1 LTO=1 + +linux_task: + name: "centos:7" + container: + image: centos:7 + cpu: 4 + memory: 2G + timeout_in: 10m + script: + - tools/install-build-pkgs + - make + - make rpm + +linux_task: + name: "centos:8" + container: + image: centos:8 + cpu: 4 + memory: 2G + timeout_in: 10m + script: + - tools/install-build-pkgs + - make + - make rpm diff --git a/tools/install-build-pkgs b/tools/install-build-pkgs index 49608795..9d3057c6 100755 --- a/tools/install-build-pkgs +++ b/tools/install-build-pkgs @@ -1,16 +1,24 @@ #!/bin/sh if [ -e /usr/bin/apt-get ]; then + export DEBIAN_FRONTEND=noninteractive apt-get -qy update - apt-get -qy --no-install-suggests --no-install-recommends --force-yes \ + apt-get -qy --no-install-suggests --no-install-recommends \ install \ - build-essential git g++ debhelper \ - python \ - automake libtool lsb-release + ca-certificates \ + build-essential \ + git \ + g++ \ + debhelper \ + automake \ + libtool \ + lsb-release + apt-get -qy --no-install-suggests --no-install-recommends install python + apt-get -qy --no-install-suggests --no-install-recommends install python3 elif [ -e /usr/bin/dnf ]; then dnf -y update dnf -y install \ - git rpm-build gcc-c++ make which python automake \ + git rpm-build gcc-c++ make which python3 automake \ libtool gettext-devel elif [ -e /usr/bin/yum ]; then yum -y update @@ -27,3 +35,11 @@ elif [ -e /usr/sbin/pkg ]; then git gmake gcc autoconf automake libtool \ gettext-tools fi + +if [ ! -e /usr/bin/python ]; then + if [ -e /usr/bin/python3 ]; then + ln -s /usr/bin/python3 /usr/bin/python + elif [ -e /usr/bin/python2 ]; then + ln -s /usr/bin/python2 /usr/bin/python + fi +fi