From patchwork Tue Jun 22 14:12:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 12337699 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8AA5C48BE5 for ; Tue, 22 Jun 2021 14:12:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C17E26137D for ; Tue, 22 Jun 2021 14:12:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbhFVOOz (ORCPT ); Tue, 22 Jun 2021 10:14:55 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:35070 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbhFVOOz (ORCPT ); Tue, 22 Jun 2021 10:14:55 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 089CD1FD6A; Tue, 22 Jun 2021 14:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PaspphYiHj3SI+qd/luii+n9xcQYgL6nh6i8lOBU/Yo=; b=lUaKDmGSj7kGzwP1uXAhaAgHy+Mkn6CHaPBW9Tj2fcAkWMaz+TqheYW/Y2htGthSlfyF3s GbIOeLwb6VeH6TUFS4f1F5gDSgna3UisQuQxtieJpwRtTeoRFsQfsBX+1/QA9gfiG2FHE9 rTCMKVPNzWt3jmOw3+Dcg7x+sqC9v4c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PaspphYiHj3SI+qd/luii+n9xcQYgL6nh6i8lOBU/Yo=; b=l0pAnxgrxSFnDWufcjoUjG6ptwGXhJmPRdb+ZJE7F+cySl/ytBdYSy1lBl8fyL04fkVPUt a8NQGYccYTo966Aw== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id BFDD8118DD; Tue, 22 Jun 2021 14:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PaspphYiHj3SI+qd/luii+n9xcQYgL6nh6i8lOBU/Yo=; b=lUaKDmGSj7kGzwP1uXAhaAgHy+Mkn6CHaPBW9Tj2fcAkWMaz+TqheYW/Y2htGthSlfyF3s GbIOeLwb6VeH6TUFS4f1F5gDSgna3UisQuQxtieJpwRtTeoRFsQfsBX+1/QA9gfiG2FHE9 rTCMKVPNzWt3jmOw3+Dcg7x+sqC9v4c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PaspphYiHj3SI+qd/luii+n9xcQYgL6nh6i8lOBU/Yo=; b=l0pAnxgrxSFnDWufcjoUjG6ptwGXhJmPRdb+ZJE7F+cySl/ytBdYSy1lBl8fyL04fkVPUt a8NQGYccYTo966Aw== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id qAunLNbv0WBRUgAALh3uQQ (envelope-from ); Tue, 22 Jun 2021 14:12:38 +0000 From: Petr Vorel To: linux-integrity@vger.kernel.org Cc: Petr Vorel , Mimi Zohar Subject: [PATCH 1/3] CI: Rename travis script directory Date: Tue, 22 Jun 2021 16:12:22 +0200 Message-Id: <20210622141224.25006-2-pvorel@suse.cz> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622141224.25006-1-pvorel@suse.cz> References: <20210622141224.25006-1-pvorel@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org This is a preparation for adding GitHub Actions support. Also run from root directory. It's a bit confusing to run from travis directory. Signed-off-by: Petr Vorel --- .travis.yml | 2 +- {travis => ci}/alpine.sh | 0 {travis => ci}/centos.sh | 0 {travis => ci}/debian.cross-compile.sh | 0 {travis => ci}/debian.i386.sh | 0 {travis => ci}/debian.sh | 0 {travis => ci}/fedora.sh | 0 {travis => ci}/opensuse.sh | 0 {travis => ci}/tumbleweed.sh | 0 {travis => ci}/ubuntu.sh | 0 10 files changed, 1 insertion(+), 1 deletion(-) rename {travis => ci}/alpine.sh (100%) rename {travis => ci}/centos.sh (100%) rename {travis => ci}/debian.cross-compile.sh (100%) rename {travis => ci}/debian.i386.sh (100%) rename {travis => ci}/debian.sh (100%) rename {travis => ci}/fedora.sh (100%) rename {travis => ci}/opensuse.sh (100%) rename {travis => ci}/tumbleweed.sh (100%) rename {travis => ci}/ubuntu.sh (100%) diff --git a/.travis.yml b/.travis.yml index fde774e..5b07711 100644 --- a/.travis.yml +++ b/.travis.yml @@ -93,4 +93,4 @@ before_install: script: - INSTALL="${DISTRO%%:*}" - INSTALL="${INSTALL%%/*}" - - $CONTAINER run $CONTAINER_ARGS -t ima-evm-utils /bin/sh -c "cd travis && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && ARCH=\"$ARCH\" CC=\"$CC\" TSS=\"$TSS\" ./$INSTALL.sh && if [ ! \"$VARIANT\" ]; then which tpm_server || which swtpm || ../tests/install-swtpm.sh; fi && CC=\"$CC\" VARIANT=\"$VARIANT\" ../build.sh" + - $CONTAINER run $CONTAINER_ARGS -t ima-evm-utils /bin/sh -c "if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./ci/$INSTALL.$VARIANT.sh; fi && ARCH=\"$ARCH\" CC=\"$CC\" TSS=\"$TSS\" ./ci/$INSTALL.sh && if [ ! \"$VARIANT\" ]; then which tpm_server || which swtpm || ./tests/install-swtpm.sh; fi && CC=\"$CC\" VARIANT=\"$VARIANT\" ./build.sh" diff --git a/travis/alpine.sh b/ci/alpine.sh similarity index 100% rename from travis/alpine.sh rename to ci/alpine.sh diff --git a/travis/centos.sh b/ci/centos.sh similarity index 100% rename from travis/centos.sh rename to ci/centos.sh diff --git a/travis/debian.cross-compile.sh b/ci/debian.cross-compile.sh similarity index 100% rename from travis/debian.cross-compile.sh rename to ci/debian.cross-compile.sh diff --git a/travis/debian.i386.sh b/ci/debian.i386.sh similarity index 100% rename from travis/debian.i386.sh rename to ci/debian.i386.sh diff --git a/travis/debian.sh b/ci/debian.sh similarity index 100% rename from travis/debian.sh rename to ci/debian.sh diff --git a/travis/fedora.sh b/ci/fedora.sh similarity index 100% rename from travis/fedora.sh rename to ci/fedora.sh diff --git a/travis/opensuse.sh b/ci/opensuse.sh similarity index 100% rename from travis/opensuse.sh rename to ci/opensuse.sh diff --git a/travis/tumbleweed.sh b/ci/tumbleweed.sh similarity index 100% rename from travis/tumbleweed.sh rename to ci/tumbleweed.sh diff --git a/travis/ubuntu.sh b/ci/ubuntu.sh similarity index 100% rename from travis/ubuntu.sh rename to ci/ubuntu.sh From patchwork Tue Jun 22 14:12:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 12337701 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5DD8C48BDF for ; Tue, 22 Jun 2021 14:12:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AED0461042 for ; Tue, 22 Jun 2021 14:12:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231924AbhFVOO4 (ORCPT ); Tue, 22 Jun 2021 10:14:56 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:35080 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231846AbhFVOOz (ORCPT ); Tue, 22 Jun 2021 10:14:55 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5172A1FD6C; Tue, 22 Jun 2021 14:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MV0b+6hqIBjxzeFJeDvfn68xd71ZPgq4wBs/0JgzBwI=; b=MQrwhOeP+cs1HOY6ttSHZ5Jw2n9wTEgvTnKf7HnrHa6Jv6faTDP+S6dQyVaHOvizinJp/o s0LcRCg8UvT2d0e3vn+T3hh5DmOVKGLd3pB+y49h0S98ppoejYzIydo+Ts3Ay67POmaUHW 9Vf6SjDfvKUdbrv8t2mHtFylH2AVMC4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MV0b+6hqIBjxzeFJeDvfn68xd71ZPgq4wBs/0JgzBwI=; b=j8W88bSZwKkZW8pYXU7a63UjlK8Y0GjZ+nmhNTwPX/oDTuFf4MVf3YFk9iLuEmQzqz9ja6 RZD5QqxdK5fLnvDQ== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 162C0118DD; Tue, 22 Jun 2021 14:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MV0b+6hqIBjxzeFJeDvfn68xd71ZPgq4wBs/0JgzBwI=; b=MQrwhOeP+cs1HOY6ttSHZ5Jw2n9wTEgvTnKf7HnrHa6Jv6faTDP+S6dQyVaHOvizinJp/o s0LcRCg8UvT2d0e3vn+T3hh5DmOVKGLd3pB+y49h0S98ppoejYzIydo+Ts3Ay67POmaUHW 9Vf6SjDfvKUdbrv8t2mHtFylH2AVMC4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MV0b+6hqIBjxzeFJeDvfn68xd71ZPgq4wBs/0JgzBwI=; b=j8W88bSZwKkZW8pYXU7a63UjlK8Y0GjZ+nmhNTwPX/oDTuFf4MVf3YFk9iLuEmQzqz9ja6 RZD5QqxdK5fLnvDQ== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id 6Er3Atfv0WBRUgAALh3uQQ (envelope-from ); Tue, 22 Jun 2021 14:12:39 +0000 From: Petr Vorel To: linux-integrity@vger.kernel.org Cc: Petr Vorel , Mimi Zohar Subject: [PATCH 2/3] CI/openSUSE: Fix tpm_server symlink creation Date: Tue, 22 Jun 2021 16:12:23 +0200 Message-Id: <20210622141224.25006-3-pvorel@suse.cz> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622141224.25006-1-pvorel@suse.cz> References: <20210622141224.25006-1-pvorel@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org This symlink is missing only on openSUSE Tumbleweed, it exists on openSUSE Leap, thus build failed. Signed-off-by: Petr Vorel --- ci/tumbleweed.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/tumbleweed.sh b/ci/tumbleweed.sh index ecd2372..dfc478b 100755 --- a/ci/tumbleweed.sh +++ b/ci/tumbleweed.sh @@ -42,6 +42,6 @@ zypper --non-interactive install --force-resolution --no-recommends \ which \ xsltproc -if [ -f /usr/lib/ibmtss/tpm_server ]; then +if [ -f /usr/lib/ibmtss/tpm_server -a ! -e /usr/local/bin/tpm_server ]; then ln -s /usr/lib/ibmtss/tpm_server /usr/local/bin fi From patchwork Tue Jun 22 14:12:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 12337703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B8B1C49EA4 for ; Tue, 22 Jun 2021 14:12:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54B5161357 for ; Tue, 22 Jun 2021 14:12:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231558AbhFVOO5 (ORCPT ); Tue, 22 Jun 2021 10:14:57 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:35094 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231904AbhFVOO4 (ORCPT ); Tue, 22 Jun 2021 10:14:56 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 951781FD70; Tue, 22 Jun 2021 14:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QbRfcH+DeQMZvLrh/qht5MhB3BOBs1r6WfTDuqG2s08=; b=CWVKuhu/PpenY5aOgMyITqGMCAZcxM0Jgxdc77oybuA6IbcygyKjyfCpw6PshKAkVuvvng +27W1trW0pC5kmcfnXOZhQb8t4yJgZgLY1Ui0JlPtr7gBmqxpF94Ny3ucdEb32wveHQ/Xk Ym66r2DuGWzHjxrIvtMUFg4ZrRh8bOc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QbRfcH+DeQMZvLrh/qht5MhB3BOBs1r6WfTDuqG2s08=; b=DK2aKmr/XEj334QxnHMxt79Hf4MMiRXI0NWhr+pZnCi43fhzQfQgUCKr7eA6KQx3eC/tx2 628iNqELdnUozgAw== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 5E242118DD; Tue, 22 Jun 2021 14:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QbRfcH+DeQMZvLrh/qht5MhB3BOBs1r6WfTDuqG2s08=; b=CWVKuhu/PpenY5aOgMyITqGMCAZcxM0Jgxdc77oybuA6IbcygyKjyfCpw6PshKAkVuvvng +27W1trW0pC5kmcfnXOZhQb8t4yJgZgLY1Ui0JlPtr7gBmqxpF94Ny3ucdEb32wveHQ/Xk Ym66r2DuGWzHjxrIvtMUFg4ZrRh8bOc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1624371159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QbRfcH+DeQMZvLrh/qht5MhB3BOBs1r6WfTDuqG2s08=; b=DK2aKmr/XEj334QxnHMxt79Hf4MMiRXI0NWhr+pZnCi43fhzQfQgUCKr7eA6KQx3eC/tx2 628iNqELdnUozgAw== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id ANQvFdfv0WBRUgAALh3uQQ (envelope-from ); Tue, 22 Jun 2021 14:12:39 +0000 From: Petr Vorel To: linux-integrity@vger.kernel.org Cc: Petr Vorel , Mimi Zohar Subject: [PATCH 3/3] CI: Introduce GitHub Actions setup Date: Tue, 22 Jun 2021 16:12:24 +0200 Message-Id: <20210622141224.25006-4-pvorel@suse.cz> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622141224.25006-1-pvorel@suse.cz> References: <20210622141224.25006-1-pvorel@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Travis is unreliable due "pull rate limit" issue, workaround does not work any more. Also GitHub Actions is a recommended way for projects hosted on GitHub. Nice bonus is that manual podman activation for distros using glibc >= 2.33 (e.g. openSUSE Tumbleweed, Fedora) it's not needed in GitHub. Signed-off-by: Petr Vorel --- .github/workflows/ci.yml | 121 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f08733a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,121 @@ +# Copyright (c) 2021 Petr Vorel +name: "distros" +on: [push, pull_request] + +jobs: + job: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + # 32bit build + - container: "debian:stable" + env: + CC: gcc + ARCH: i386 + TSS: tpm2-tss + VARIANT: i386 + + # cross compilation builds + - container: "debian:stable" + env: + ARCH: ppc64el + CC: powerpc64le-linux-gnu-gcc + TSS: ibmtss + VARIANT: cross-compile + + - container: "debian:stable" + env: + ARCH: arm64 + CC: aarch64-linux-gnu-gcc + TSS: tpm2-tss + VARIANT: cross-compile + + - container: "debian:stable" + env: + ARCH: s390x + CC: s390x-linux-gnu-gcc + TSS: ibmtss + VARIANT: cross-compile + + # musl (native) + - container: "alpine:latest" + env: + CC: gcc + TSS: tpm2-tss + + # glibc (gcc/clang) + - container: "opensuse/tumbleweed" + env: + CC: clang + TSS: ibmtss + + - container: "opensuse/leap" + env: + CC: gcc + TSS: tpm2-tss + + - container: "ubuntu:groovy" + env: + CC: gcc + TSS: ibmtss + + - container: "ubuntu:xenial" + env: + CC: clang + TSS: tpm2-tss + + - container: "fedora:latest" + env: + CC: clang + TSS: ibmtss + + - container: "centos:7" + env: + CC: gcc + TSS: tpm2-tss + + - container: "centos:latest" + env: + CC: gcc + TSS: tpm2-tss + + - container: "debian:testing" + env: + CC: clang + TSS: tpm2-tss + + - container: "debian:stable" + env: + CC: clang + TSS: ibmtss + + container: + image: ${{ matrix.container }} + env: ${{ matrix.env }} + + steps: + - name: Show OS + run: cat /etc/os-release + + - name: Git checkout + uses: actions/checkout@v1 + + - name: Install additional packages + run: | + INSTALL=${{ matrix.container }} + INSTALL="${INSTALL%%:*}" + INSTALL="${INSTALL%%/*}" + if [ "$VARIANT" ]; then ARCH="$ARCH" ./ci/$INSTALL.$VARIANT.sh; fi + ARCH="$ARCH" CC="$CC" TSS="$TSS" ./ci/$INSTALL.sh + + - name: Build swtpm + run: if [ ! "$VARIANT" ]; then which tpm_server || which swtpm || ./tests/install-swtpm.sh; fi + + - name: Compiler version + run: $CC --version + + - name: Compile + run: CC="$CC" VARIANT="$VARIANT" ./build.sh