Skip to content

Commit 3c4d5d9

Browse files
committed
Try to cross-compile for MUSL Linux
1 parent c2ccc73 commit 3c4d5d9

File tree

4 files changed

+17
-41
lines changed

4 files changed

+17
-41
lines changed

.cargo/config.toml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@ jobs:
2727
runs-on: ${{ matrix.os }}
2828

2929
strategy:
30-
fail-fast: false
3130
matrix:
3231
os: [ubuntu-latest, macos-latest, windows-latest]
3332
include:
3433
- os: ubuntu-latest
3534
name: Rust Release Build on Linux
36-
x86_64-target: x86_64-unknown-linux-gnu
37-
aarch64-target: aarch64-unknown-linux-gnu
35+
x86_64-target: x86_64-unknown-linux-musl
36+
aarch64-target: aarch64-unknown-linux-musl
3837

3938
- os: macos-latest
4039
name: Rust Release Build on MacOS
@@ -50,21 +49,17 @@ jobs:
5049
- name: Check out repository
5150
uses: actions/checkout@v4
5251

53-
- name: Install gcc-aarch64-linux-gnu
54-
if: ${{ matrix.os == 'ubuntu-latest' }}
55-
run: sudo apt-get install gcc-aarch64-linux-gnu
56-
57-
- name: Add rustup x86_64 target
58-
run: rustup target add ${{ matrix.x86_64-target }}
59-
60-
- name: Add rustup aarch64 target
61-
run: rustup target add ${{ matrix.aarch64-target }}
62-
6352
- name: Build x86_64 target in release mode
64-
run: cargo build --release --target ${{ matrix.x86_64-target }} --locked
53+
uses: houseabsolute/actions-rust-cross@v0
54+
with:
55+
target: ${{ matrix.x86_64-target }}
56+
args: '--release --locked'
6557

6658
- name: Build aarch64 target in release mode
67-
run: cargo build --release --target ${{ matrix.aarch64-target }} --locked
59+
uses: houseabsolute/actions-rust-cross@v0
60+
with:
61+
target: ${{ matrix.aarch64-target }}
62+
args: '--release --locked'
6863

6964
- name: Get latest release version number
7065
id: get_version
@@ -102,7 +97,7 @@ jobs:
10297
with:
10398
repo_token: ${{ secrets.GITHUB_TOKEN }}
10499
tag: ${{ github.ref }}
105-
release_name: grex ${{ steps.get_version.outputs.version }}
100+
release_name: grex ${{ steps.get_version.outputs.version-without-v }}
106101
file_glob: true
107102
file: target/*/release/grex-${{ steps.get_version.outputs.version }}-*.{zip,tar.gz}
108103

@@ -137,7 +132,7 @@ jobs:
137132
- name: Upload wheels
138133
uses: actions/upload-artifact@v4
139134
with:
140-
name: wheels
135+
name: linux-${{ matrix.target }}-wheels
141136
path: dist
142137

143138
python-windows-release-build:
@@ -171,7 +166,7 @@ jobs:
171166
- name: Upload wheels
172167
uses: actions/upload-artifact@v4
173168
with:
174-
name: wheels
169+
name: windows-${{ matrix.target }}-wheels
175170
path: dist
176171

177172
python-macos-release-build:
@@ -204,7 +199,7 @@ jobs:
204199
- name: Upload wheels
205200
uses: actions/upload-artifact@v4
206201
with:
207-
name: wheels
202+
name: macos-${{ matrix.target }}-wheels
208203
path: dist
209204

210205
python-release-upload:
@@ -216,8 +211,6 @@ jobs:
216211
steps:
217212
- name: Download wheels from previous jobs
218213
uses: actions/download-artifact@v4
219-
with:
220-
name: wheels
221214

222215
- name: Upload to PyPI
223216
uses: PyO3/maturin-action@v1

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
[![pypi](https://img.shields.io/badge/PYPI-v1.0.1-blue?logo=PyPI&logoColor=yellow)](https://pypi.org/project/grex)
1919
[![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
2020

21-
[![Linux 64-bit Download](https://img.shields.io/badge/Linux%2064bit%20Download-v1.4.5-blue?logo=Linux)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-x86_64-unknown-linux-gnu.tar.gz)
22-
[![Linux ARM64 Download](https://img.shields.io/badge/Linux%20ARM64%20Download-v1.4.5-blue?logo=Linux)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-aarch64-unknown-linux-gnu.tar.gz)
21+
[![Linux 64-bit Download](https://img.shields.io/badge/Linux%2064bit%20Download-v1.4.5-blue?logo=Linux)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-x86_64-unknown-linux-musl.tar.gz)
22+
[![Linux ARM64 Download](https://img.shields.io/badge/Linux%20ARM64%20Download-v1.4.5-blue?logo=Linux)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-aarch64-unknown-linux-musl.tar.gz)
2323

2424
[![MacOS 64-bit Download](https://img.shields.io/badge/macOS%2064bit%20Download-v1.4.5-blue?logo=Apple)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-x86_64-apple-darwin.tar.gz)
2525
[![MacOS ARM64 Download](https://img.shields.io/badge/macOS%20ARM64%20Download-v1.4.5-blue?logo=Apple)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-aarch64-apple-darwin.tar.gz)

RELEASE_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## grex 1.4.5 (released on 05 Mar 2024)
1+
## grex 1.4.5 (released on 06 Mar 2024)
22

33
### Improvements
44

0 commit comments

Comments
 (0)