From ceb175e3f159259e909690ac286f7dc05307aa76 Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 13 Jan 2022 00:55:06 +0000 Subject: [PATCH] chore: Add check that the static build script works. Otherwise it'll break again in the future and we won't know. --- .cirrus.yml | 3 +-- .github/settings.yml | 1 + .github/workflows/ci.yml | 16 ++++++++++++++++ BUILD.bazel | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 503439e..4068e3d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,7 @@ --- cirrus-ci_task: container: - image: toxchat/toktok-stack:0.0.31-third_party + image: toxchat/toktok-stack:0.0.31-release cpu: 2 memory: 2G configure_script: @@ -9,5 +9,4 @@ cirrus-ci_task: test_all_script: - cd /src/workspace && bazel test -k --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST - --config=release //toxic/... diff --git a/.github/settings.yml b/.github/settings.yml index 4bee1d1..fb60fc5 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -12,6 +12,7 @@ branches: required_status_checks: contexts: - build + - build-static - cirrus-ci - Codacy Static Code Analysis - code-review/reviewable diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd7f65b..c117e02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,22 @@ jobs: - name: Build toxic run: make -j4 + build-static: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Build minimal static toxic binary + run: docker run --rm + -v /tmp/artifact:/artifact + -v $PWD:/toxic + amd64/alpine:latest + sh -c 'yes | /toxic/script/build-minimal-static-toxic.sh' + - name: Display binary checksum + run: | + tar Jxf /tmp/artifact/toxic-minimal-static-musl_linux_x86-64.tar.xz + sha256sum toxic-minimal-static-musl_linux_x86-64/toxic + infer: runs-on: ubuntu-latest container: toxchat/infer diff --git a/BUILD.bazel b/BUILD.bazel index e1b74a2..1e832aa 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,6 +1,8 @@ load("@rules_cc//cc:defs.bzl", "cc_binary") load("//tools/project:build_defs.bzl", "project") +package(features = ["layering_check"]) + project() cc_binary(