From 16126bcff672a7951350879987659937ba741ae1 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 13 Apr 2023 16:33:19 +0200 Subject: [PATCH] btrfs-progs: ci: build static versions as artifacts Build static binaries (published as artifacts): - btrfs.static - the main tool - btrfs.box.static - all-in-one tool (functionality selected by file name) There are a few problems: - unstable URL, i.e. not one location to get the binaries from, multiple steps need on web or by using API - downloaded files are in .zip (compression cannot be disabled with upload-artifact@v3) - permissions of the file inside .zip are lost, manual chmod needed after extraction - artifacts can be downloaded only for logged users Issue: #593 Signed-off-by: David Sterba --- .github/workflows/artifacts-static-build.yml | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/artifacts-static-build.yml diff --git a/.github/workflows/artifacts-static-build.yml b/.github/workflows/artifacts-static-build.yml new file mode 100644 index 00000000..f4d2b9f6 --- /dev/null +++ b/.github/workflows/artifacts-static-build.yml @@ -0,0 +1,34 @@ +# Build static binaries (published as artifacts) +# - btrfs.static - the main tool +# - btrfs.box.static - all-in-one tool (functionality selected by file name) + +name: Static binaries +run-name: Static binaries +on: + push: + branches: + - release-test +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev + - name: Configure + run: ./autogen.sh && ./configure + - name: Make static + run: make V=1 static + - name: Make box.static + run: make V=1 btrfs.box.static + - name: Strip binaries + run: strip btrfs.static btrfs.box.static + - name: Save artifacts - btrfs.static + uses: actions/upload-artifact@v3 + with: + name: btrfs.static + path: btrfs.static + - name: Save artifacts - btrfs.box.static + uses: actions/upload-artifact@v3 + with: + name: btrfs.box.static + path: btrfs.box.static