mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
ci: change gnu libraries to musl
This commit is contained in:
parent
28a59f8fda
commit
4a1ec3276d
2 changed files with 20 additions and 7 deletions
23
.github/workflows/build.yaml
vendored
23
.github/workflows/build.yaml
vendored
|
|
@ -23,24 +23,28 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-musl
|
||||||
deb: true
|
deb: true
|
||||||
rpm: true
|
rpm: true
|
||||||
|
musl: true
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: i686-unknown-linux-gnu
|
target: i686-unknown-linux-musl
|
||||||
deb: true
|
deb: true
|
||||||
rpm: true
|
rpm: true
|
||||||
cross: true
|
cross: true
|
||||||
|
musl: true
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-musl
|
||||||
deb: true
|
deb: true
|
||||||
rpm: true
|
rpm: true
|
||||||
cross: true
|
cross: true
|
||||||
|
musl: true
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: armv7-unknown-linux-gnueabihf
|
target: armv7-unknown-linux-musleabihf
|
||||||
deb: true
|
deb: true
|
||||||
rpm: true
|
rpm: true
|
||||||
cross: true
|
cross: true
|
||||||
|
musl: true
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: aarch64-linux-android
|
target: aarch64-linux-android
|
||||||
cross: true
|
cross: true
|
||||||
|
|
@ -67,16 +71,25 @@ jobs:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
profile: minimal
|
profile: minimal
|
||||||
|
|
||||||
|
- name: Install musl
|
||||||
|
if: matrix.musl == true
|
||||||
|
run: sudo apt-get install -y musl-tools
|
||||||
|
|
||||||
- name: Caching
|
- name: Caching
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.target }}
|
key: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: ${{ matrix.cross == false}}
|
if: ${{ matrix.cross == false && matrix.musl == false }}
|
||||||
run:
|
run:
|
||||||
cargo build --release --workspace --locked --target ${{ matrix.target }}
|
cargo build --release --workspace --locked --target ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Build (musl)
|
||||||
|
if: ${{ matrix.cross == false && matrix.musl == true }}
|
||||||
|
run:
|
||||||
|
cargo build --release --workspace --no-default-features --locked --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Build (cross)
|
- name: Build (cross)
|
||||||
if: ${{ matrix.cross == true}}
|
if: ${{ matrix.cross == true}}
|
||||||
# cross 0.2.5 broken for android
|
# cross 0.2.5 broken for android
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ get_architecture() {
|
||||||
local _ostype _cputype _bitness _arch _clibtype
|
local _ostype _cputype _bitness _arch _clibtype
|
||||||
_ostype="$(uname -s)"
|
_ostype="$(uname -s)"
|
||||||
_cputype="$(uname -m)"
|
_cputype="$(uname -m)"
|
||||||
_clibtype="gnu"
|
_clibtype="musl"
|
||||||
|
|
||||||
if [ "${_ostype}" = Linux ]; then
|
if [ "${_ostype}" = Linux ]; then
|
||||||
if [ "$(uname -o || true)" = Android ]; then
|
if [ "$(uname -o || true)" = Android ]; then
|
||||||
|
|
@ -329,7 +329,7 @@ get_architecture() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Detect 64-bit linux with 32-bit userland
|
# Detect 64-bit linux with 32-bit userland
|
||||||
if [ "${_ostype}" = unknown-linux-gnu ] && [ "${_bitness}" -eq 32 ]; then
|
if [ "${_ostype}" = unknown-linux-musl ] && [ "${_bitness}" -eq 32 ]; then
|
||||||
case ${_cputype} in
|
case ${_cputype} in
|
||||||
x86_64)
|
x86_64)
|
||||||
# 32-bit executable for amd64 = x32
|
# 32-bit executable for amd64 = x32
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue