Build musl Debian packages in addition to glibc

Closes str4d/rage#252.
This commit is contained in:
Jack Grigg 2022-04-30 15:17:59 +00:00
parent f4d4fe281c
commit e5e40c6675
2 changed files with 38 additions and 2 deletions

View file

@ -118,7 +118,7 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
name: [linux, armv7, arm64]
name: [linux, linux-musl, armv7, armv7-musl, arm64, arm64-musl]
include:
- name: linux
target: x86_64-unknown-linux-gnu
@ -126,6 +126,12 @@ jobs:
libfuse-dev
build_flags: --features mount
- name: linux-musl
target: x86_64-unknown-linux-musl
build_deps: >
musl-tools
deb_flags: --variant=musl
- name: armv7
target: armv7-unknown-linux-gnueabihf
build_deps: >
@ -134,6 +140,16 @@ jobs:
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
- name: armv7-musl
target: armv7-unknown-linux-musleabihf
build_deps: >
gcc-arm-linux-gnueabihf
musl-tools
cargo_config: |
[target.armv7-unknown-linux-musleabihf]
linker = "arm-linux-gnueabihf-gcc"
deb_flags: --variant=musl
- name: arm64
target: aarch64-unknown-linux-gnu
build_deps: >
@ -142,6 +158,16 @@ jobs:
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
- name: arm64-musl
target: aarch64-unknown-linux-musl
build_deps: >
gcc-aarch64-linux-gnu
musl-tools
cargo_config: |
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"
deb_flags: --variant=musl
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
@ -190,7 +216,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: deb
args: --package rage --no-build --target ${{ matrix.target }}
args: --package rage --no-build --target ${{ matrix.target }} ${{ matrix.deb_flags }}
- name: Upload Debian package to release
uses: svenstaro/upload-release-action@2.2.1

View file

@ -13,6 +13,7 @@ default-run = "rage"
[package.metadata.deb]
name = "rage"
conflicts = "rage-musl"
extended-description = """\
age is a simple, modern, and secure encryption format with small explicit keys, \
no config options, and UNIX-style composability. rage is a Rust implementation \
@ -38,6 +39,15 @@ assets = [
]
features = ["mount"]
[package.metadata.deb.variants.musl]
name = "rage-musl"
conflicts = "rage"
extended-description = """\
age is a simple, modern, and secure encryption format with small explicit keys, \
no config options, and UNIX-style composability. rage is a Rust implementation \
of the age specification. This package is statically linked against musl."""
features = []
[badges]
maintenance = { status = "experimental" }