Skip to content

Commit 1759ba8

Browse files
committed
Test
1 parent e2e9868 commit 1759ba8

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2023-2024 Daniel Mueller <deso@posteo.net>
1+
# Copyright (C) 2023-2025 Daniel Mueller <deso@posteo.net>
22
# SPDX-License-Identifier: GPL-3.0-or-later
33

44
name: Build
@@ -17,24 +17,30 @@ jobs:
1717
build:
1818
name: Build statically linked binary
1919
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
# Please update the test workflow cross-compile matrix when adding a new
23+
# target here.
24+
target: [
25+
armv7-unknown-linux-musleabihf,
26+
x86_64-unknown-linux-musl,
27+
]
2028
steps:
2129
- uses: actions/checkout@v4
22-
- name: Install dependencies
23-
run: sudo apt-get install --yes --no-install-recommends musl-tools
24-
- uses: dtolnay/rust-toolchain@stable
30+
- uses: taiki-e/setup-cross-toolchain-action@v1
2531
with:
2632
target: x86_64-unknown-linux-musl
2733
- run: |
28-
CARGO_PROFILE_RELEASE_DEBUG=false CARGO_PROFILE_RELEASE_STRIP=true cargo install --bin=btrfs-backup --path=. --root=. --target x86_64-unknown-linux-musl
34+
CARGO_PROFILE_RELEASE_DEBUG=false CARGO_PROFILE_RELEASE_STRIP=true cargo install --bin=btrfs-backup --path=. --root=. --target ${{ matrix.target }}
2935
strip bin/btrfs-backup
3036
- uses: actions/upload-artifact@v4
3137
with:
32-
name: btrfs-backup
38+
name: btrfs-backup-${{ matrix.target }}
3339
path: bin/btrfs-backup
3440
- if: ${{ inputs.upload-release != '' }}
3541
name: Upload release asset
3642
env:
3743
GH_TOKEN: ${{ github.token }}
3844
run: |
39-
mv bin/btrfs-backup btrfs-backup
40-
gh release upload ${{ inputs.upload-release }} btrfs-backup
45+
mv bin/btrfs-backup btrfs-backup-${{ matrix.target }}
46+
gh release upload ${{ inputs.upload-release }} btrfs-backup-${{ matrix.target }}

0 commit comments

Comments
 (0)