From 4f609ac5fd24141f05d0bcd5558ccb4f187af1e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20R=C3=B6hling?= Date: Thu, 3 Aug 2023 12:17:56 +0200 Subject: [PATCH] Add workflow for statically linked build --- .github/workflows/musl.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/musl.yml diff --git a/.github/workflows/musl.yml b/.github/workflows/musl.yml new file mode 100644 index 0000000..f949bd4 --- /dev/null +++ b/.github/workflows/musl.yml @@ -0,0 +1,38 @@ +# Copyright 2022 Timo Röhling +# SPDX-License-Identifier: FSFAP +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice and +# this notice are preserved. This file is offered as-is, without any warranty. +# +name: Build statically linked PostSRSd +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -y cmake musl-dev musl-tools + - name: Build PostSRSd + run: | + mkdir _build + cd _build + cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_C_COMPILER=musl-gcc -DCMAKE_EXE_LINKER_FLAGS=-static -DBUILD_TESTING=OFF -DWITH_SQLITE=ON -DWITH_REDIS=ON -DGENERATE_SRS_SECRET=OFF + make VERBOSE=ON + - name: Install PostSRSd + run: | + cd _build + make install DESTDIR=$PWD/_install + - name: Create TAR + run: tar -C_build/_install -cvf postsrsd_static.tar ./ + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: prebuilt + path: postsrsd_static.tar