Build dist-x86_64-unknown-linux-musl releases

This commit is contained in:
andylizi 2021-02-13 16:39:02 +08:00
parent 935830d05b
commit 726f9e3163
No known key found for this signature in database
GPG key ID: 9429B030E974305F
2 changed files with 34 additions and 2 deletions

View file

@ -121,6 +121,34 @@ jobs:
name: dist-x86_64-unknown-linux-gnu
path: ./dist
dist-x86_64-unknown-linux-musl:
name: dist (x86_64-unknown-linux-musl)
runs-on: ubuntu-20.04
env:
RA_TARGET: x86_64-unknown-linux-musl
# For some reason `-crt-static` is not working for clang without lld
RUSTFLAGS: "-C link-arg=-fuse-ld=lld -C target-feature=-crt-static"
container:
image: rust:alpine
volumes:
- /usr/local/cargo/registry
steps:
- name: Install dependencies
run: apk add --no-cache git clang lld musl-dev
- name: Checkout repository
uses: actions/checkout@v2
- name: Dist
run: cargo xtask dist
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: dist-x86_64-unknown-linux-musl
path: ./dist
dist-aarch64-unknown-linux-gnu:
name: dist (aarch64-unknown-linux-gnu)
runs-on: ubuntu-16.04
@ -216,7 +244,7 @@ jobs:
publish:
name: publish
runs-on: ubuntu-16.04
needs: ['dist-x86_64-pc-windows-msvc', 'dist-aarch64-pc-windows-msvc', 'dist-x86_64-unknown-linux-gnu', 'dist-aarch64-unknown-linux-gnu', 'dist-x86_64-apple-darwin', 'dist-aarch64-apple-darwin']
needs: ['dist-x86_64-pc-windows-msvc', 'dist-aarch64-pc-windows-msvc', 'dist-x86_64-unknown-linux-gnu', 'dist-x86_64-unknown-linux-musl', 'dist-aarch64-unknown-linux-gnu', 'dist-x86_64-apple-darwin', 'dist-aarch64-apple-darwin']
steps:
- name: Install Nodejs
uses: actions/setup-node@v1
@ -247,6 +275,10 @@ jobs:
with:
name: dist-x86_64-unknown-linux-gnu
path: dist
- uses: actions/download-artifact@v1
with:
name: dist-x86_64-unknown-linux-musl
path: dist
- uses: actions/download-artifact@v1
with:
name: dist-aarch64-unknown-linux-gnu

View file

@ -59,7 +59,7 @@ fn dist_client(version: &str, release_tag: &str) -> Result<()> {
fn dist_server() -> Result<()> {
let target = get_target();
if target.contains("-linux-gnu") {
if target.contains("-linux-gnu") || target.contains("-linux-musl") {
env::set_var("CC", "clang");
}