2023-04-13 14:33:19 +00:00
|
|
|
# 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:
|
2023-06-15 11:41:52 +00:00
|
|
|
- master
|
2023-04-13 14:33:19 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
2024-06-13 00:58:25 +00:00
|
|
|
runs-on: ubuntu-24.04
|
2023-04-13 14:33:19 +00:00
|
|
|
steps:
|
2024-01-30 18:32:58 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-13 14:33:19 +00:00
|
|
|
- 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
|
2023-12-06 13:51:35 +00:00
|
|
|
run: ./autogen.sh && ./configure --disable-documentation
|
2023-04-13 14:33:19 +00:00
|
|
|
- name: Make static
|
2023-08-26 00:33:33 +00:00
|
|
|
run: make V=1 EXTRA_CFLAGS='-march=x86-64' static
|
2023-04-13 14:33:19 +00:00
|
|
|
- name: Make box.static
|
2023-08-26 00:33:33 +00:00
|
|
|
run: make V=1 EXTRA_CFLAGS='-march=x86-64' btrfs.box.static
|
2023-04-13 14:33:19 +00:00
|
|
|
- name: Strip binaries
|
|
|
|
run: strip btrfs.static btrfs.box.static
|
2023-05-02 12:01:39 +00:00
|
|
|
- name: Calculate SHA256 checksums
|
|
|
|
run: |
|
|
|
|
sha256sum btrfs.static | tee btrfs.static.sha256
|
|
|
|
sha256sum btrfs.box.static | tee btrfs.box.static.sha256
|
2023-04-13 14:33:19 +00:00
|
|
|
- name: Save artifacts - btrfs.static
|
2024-01-30 18:32:58 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-04-13 14:33:19 +00:00
|
|
|
with:
|
|
|
|
name: btrfs.static
|
|
|
|
path: btrfs.static
|
2023-05-02 12:01:39 +00:00
|
|
|
- name: Save artifacts - btrfs.static.sha256
|
2024-01-30 18:32:58 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-05-02 12:01:39 +00:00
|
|
|
with:
|
|
|
|
name: btrfs.static.sha256
|
|
|
|
path: btrfs.static.sha256
|
2023-04-13 14:33:19 +00:00
|
|
|
- name: Save artifacts - btrfs.box.static
|
2024-01-30 18:32:58 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-04-13 14:33:19 +00:00
|
|
|
with:
|
|
|
|
name: btrfs.box.static
|
|
|
|
path: btrfs.box.static
|
2023-05-02 12:01:39 +00:00
|
|
|
- name: Save artifacts - btrfs.box.static.sha256
|
2024-01-30 18:32:58 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-05-02 12:01:39 +00:00
|
|
|
with:
|
|
|
|
name: btrfs.box.static.sha256
|
|
|
|
path: btrfs.box.static.sha256
|