btrfs-progs/.github/workflows/artifacts-static-build.yml
Yaroslav Halchenko c4190ca330 btrfs-progs: ci: do apt-get update before trying to install
To ensure that package indexes are up to date.

That should help to avoid recent failed CI runs, which failed to install
certain packages as local cache is out-of-date and remote mirrors no
longer provide that specific (and out-of-date) version of package:

 E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_255.4-1ubuntu8.1_amd64.deb  404  Not Found [IP: 52.147.219.192 80]

Signed-off-by: Yaroslav Halchenko <debian@onerussian.com>
[ Minor modification on the commit message. ]
Signed-off-by: Qu Wenruo <wqu@suse.com>
[ Move cache update to a separate command. ]
Signed-off-by: David Sterba <dsterba@suse.com>
2024-07-30 19:56:08 +02:00

50 lines
1.7 KiB
YAML

# 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:
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update -qqq
- 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 --disable-documentation
- name: Make static
run: make V=1 EXTRA_CFLAGS='-march=x86-64' static
- name: Make box.static
run: make V=1 EXTRA_CFLAGS='-march=x86-64' btrfs.box.static
- name: Strip binaries
run: strip btrfs.static btrfs.box.static
- name: Calculate SHA256 checksums
run: |
sha256sum btrfs.static | tee btrfs.static.sha256
sha256sum btrfs.box.static | tee btrfs.box.static.sha256
- name: Save artifacts - btrfs.static
uses: actions/upload-artifact@v4
with:
name: btrfs.static
path: btrfs.static
- name: Save artifacts - btrfs.static.sha256
uses: actions/upload-artifact@v4
with:
name: btrfs.static.sha256
path: btrfs.static.sha256
- name: Save artifacts - btrfs.box.static
uses: actions/upload-artifact@v4
with:
name: btrfs.box.static
path: btrfs.box.static
- name: Save artifacts - btrfs.box.static.sha256
uses: actions/upload-artifact@v4
with:
name: btrfs.box.static.sha256
path: btrfs.box.static.sha256