@@ -61,62 +61,41 @@ jobs:
6161 - {target: aarch64-apple-darwin, os: macos-latest, jreleaser_platform: osx-aarch_64}
6262 - {target: x86_64-apple-darwin, os: macos-latest, jreleaser_platform: osx-x86_64}
6363 - {target: x86_64-pc-windows-msvc, os: windows-latest, jreleaser_platform: windows-x86_64}
64- - {target: x86_64-unknown-linux-gnu, os: ubuntu-latest, container: 'ubuntu:20.04' , jreleaser_platform: linux-x86_64}
65- - {target: i686-unknown-linux-gnu, os: ubuntu-latest, container: 'ubuntu:20.04' , jreleaser_platform: linux-x86_32}
66- - {target: aarch64-unknown-linux-gnu, os: ubuntu-latest, container: 'ubuntu:20.04' , jreleaser_platform: linux-aarch_64}
64+ - {target: x86_64-unknown-linux-gnu, os: ubuntu-latest, linux: true , jreleaser_platform: linux-x86_64}
65+ - {target: i686-unknown-linux-gnu, os: ubuntu-latest, linux: true , jreleaser_platform: linux-x86_32}
66+ - {target: aarch64-unknown-linux-gnu, os: ubuntu-latest, linux: true , jreleaser_platform: linux-aarch_64}
6767 runs-on : ${{ matrix.job.os }}
68- container :
69- image : ${{ matrix.job.container }}
70- options : --privileged
7168 steps :
7269 - name : Checkout
7370 uses : actions/checkout@v6
7471 with :
7572 fetch-depth : 0
7673 ref : master
7774
78- - name : Install dependencies (Linux containers)
79- if : matrix.job.container
80- run : |
81- apt-get update
82- apt-get install -y curl build-essential zip unzip
83-
8475 - name : Install Rust toolchain
8576 uses : dtolnay/rust-toolchain@stable
8677 with :
8778 targets : ${{ matrix.job.target }}
8879
8980 - name : Setup cross-compilation toolchain
90- if : matrix.job.container
81+ if : matrix.job.linux
9182 uses : taiki-e/setup-cross-toolchain-action@v1
9283 with :
9384 target : ${{ matrix.job.target }}
9485
95- - name : Install SDKMAN and JReleaser (Linux containers)
96- if : matrix.job.container
97- shell : bash
98- run : |
99- curl -s "https://get.sdkman.io" | bash
100- source ~/.sdkman/bin/sdkman-init.sh
101- sdk install java 17.0.2-tem
102- sdk install jreleaser
86+ - name : Install cargo-zigbuild
87+ if : matrix.job.linux
88+ run : cargo install cargo-zigbuild
10389
104- - name : Build
105- run : cargo build --locked --release --target=${{ matrix.job.target }}
90+ - name : Build (Linux, GLIBC 2.17 floor)
91+ if : matrix.job.linux
92+ run : cargo zigbuild --locked --release --target=${{ matrix.job.target }}.2.17
10693
107- - name : Assemble (Linux containers)
108- if : matrix.job.container
109- shell : bash
110- run : |
111- source ~/.sdkman/bin/sdkman-init.sh
112- jreleaser assemble
113- env :
114- JRELEASER_PROJECT_VERSION : ${{ needs.prerelease.outputs.VERSION }}
115- JRELEASER_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
116- JRELEASER_PLATFORM_OVERRIDE : ${{ matrix.job.jreleaser_platform }}
94+ - name : Build (non-Linux)
95+ if : ' !matrix.job.linux'
96+ run : cargo build --locked --release --target=${{ matrix.job.target }}
11797
118- - name : Assemble (Non-Linux)
119- if : ' !matrix.job.container'
98+ - name : Assemble
12099 uses : jreleaser/release-action@v2
121100 with :
122101 version : latest
0 commit comments