File tree Expand file tree Collapse file tree 4 files changed +74
-68
lines changed
Expand file tree Collapse file tree 4 files changed +74
-68
lines changed Original file line number Diff line number Diff line change 4141 - name : Run Gradle Build
4242 run : ./gradlew build -Ptarget=${{ matrix.target }}
4343
44+ linux-musl :
45+ strategy :
46+ matrix :
47+ include :
48+ - target : x86_64-unknown-linux-musl
49+ arch : x86_64
50+ - target : aarch64-unknown-linux-musl
51+ arch : aarch64
52+ deps : |
53+ mkdir -p /root/musl
54+ curl -q https://musl.cc/aarch64-linux-musl-cross.tgz | tar xzf - -C /root/musl
55+ export PATH="$PATH:/root/musl/aarch64-linux-musl-cross/bin"
56+
57+ name : Build ${{ matrix.target }}
58+ runs-on : ubuntu-latest
59+ container :
60+ image : clux/muslrust:stable
61+ steps :
62+ - name : Checkout sources
63+ uses : taiki-e/checkout-action@v1
64+ - name : Install Essentials
65+ run : |
66+ apt-get update -y
67+ apt-get install -y gcc curl openjdk-17-jdk-headless
68+ - name : Install Rust toolchain
69+ run : |
70+ rustup target add x86_64-unknown-linux-musl ${{ matrix.target }}
71+ - name : Install linker dependencies
72+ run : ${{ matrix.deps }}
73+ if : ${{ matrix.deps != '' }}
74+ - name : Run Gradle Build
75+ env :
76+ RUSTFLAGS : " -C target-feature=-crt-static -C link-args=-static-libgcc"
77+ run : |
78+ ./gradlew build -Ptarget=${{ matrix.target }}
79+
4480 windows :
4581 strategy :
4682 matrix :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5050 JRELEASER_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
5151 run : ./gradlew native:publish native:jreleaserRelease -Ptarget=${{ matrix.target }}
5252
53+ linux-musl :
54+ strategy :
55+ matrix :
56+ include :
57+ - target : x86_64-unknown-linux-musl
58+ arch : x86_64
59+ - target : aarch64-unknown-linux-musl
60+ arch : aarch64
61+
62+ name : Publish ${{ matrix.target }}
63+ environment : MavenRelease
64+ runs-on : ubuntu-latest
65+ container :
66+ image : ghcr.io/blackdex/rust-musl:${{ matrix.arch }}-musl-stable
67+ steps :
68+ - name : Checkout sources
69+ uses : taiki-e/checkout-action@v1
70+ - name : Install Essentials
71+ run : |
72+ apt-get update -y
73+ apt-get install -y openjdk-17-jdk-headless
74+ - name : Install Rust toolchain
75+ uses : dtolnay/rust-toolchain@stable
76+ with :
77+ toolchain : stable
78+ target : x86_64-unknown-linux-musl ${{ matrix.target }} # requires native target installed to build proc-macros2
79+ - name : Build and Publish
80+ env :
81+ JRELEASER_MAVENCENTRAL_USERNAME : ${{ secrets.MAVENCENTRAL_USERNAME }}
82+ JRELEASER_MAVENCENTRAL_TOKEN : ${{ secrets.MAVENCENTRAL_TOKEN }}
83+ JRELEASER_GPG_PUBLIC_KEY : ${{ secrets.GPG_PUBLIC_KEY }}
84+ JRELEASER_GPG_SECRET_KEY : ${{ secrets.GPG_SECRET_KEY }}
85+ JRELEASER_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
86+ run : ./gradlew native:publish native:jreleaserRelease -Ptarget=${{ matrix.target }}
87+
5388 windows :
5489 strategy :
5590 matrix :
85120
86121 macos :
87122 name : Build macOS universal binary
123+ environment : MavenRelease
88124 runs-on : macos-14
89125 steps :
90126 - name : Checkout sources
Original file line number Diff line number Diff line change @@ -6,14 +6,8 @@ linker = "arm-linux-gnueabihf-gcc"
66
77[target .x86_64-unknown-linux-musl ]
88rustflags = [" -C" , " target-feature=-crt-static" , " -C" , " link-args=-static-libgcc" ]
9- linker = " /root/musl/x86_64-linux-musl-cross/bin/ x86_64-linux-musl-gcc"
9+ linker = " x86_64-linux-musl-gcc"
1010
1111[target .aarch64-unknown-linux-musl ]
1212rustflags = [" -C" , " target-feature=-crt-static" , " -C" , " link-args=-static-libgcc" ]
13- linker = " /root/musl/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc"
14-
15- # [target.i686-unknown-linux-musl]
16- # rustflags = ["-C", "target-feature=-crt-static"]
17- # [target.armv7-unknown-linux-musleabihf]
18- # rustflags = ["-C", "target-feature=-crt-static"]
19- # linker = "arm-linux-gnueabihf-gcc"
13+ linker = " aarch64-linux-musl-gcc"
You can’t perform that action at this time.
0 commit comments