From 3c4d5d9c9623d5a2b61c81bf6d28c0a2677cb534 Mon Sep 17 00:00:00 2001 From: "Peter M. Stahl" Date: Wed, 6 Mar 2024 10:47:44 +0100 Subject: [PATCH] Try to cross-compile for MUSL Linux --- .cargo/config.toml | 17 ----------------- .github/workflows/release.yml | 35 ++++++++++++++--------------------- README.md | 4 ++-- RELEASE_NOTES.md | 2 +- 4 files changed, 17 insertions(+), 41 deletions(-) delete mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 31c00e8..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -[target.aarch64-unknown-linux-gnu] -linker = "aarch64-linux-gnu-gcc" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ae2aa4..b29d163 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,14 +27,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: - fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] include: - os: ubuntu-latest name: Rust Release Build on Linux - x86_64-target: x86_64-unknown-linux-gnu - aarch64-target: aarch64-unknown-linux-gnu + x86_64-target: x86_64-unknown-linux-musl + aarch64-target: aarch64-unknown-linux-musl - os: macos-latest name: Rust Release Build on MacOS @@ -50,21 +49,17 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - - name: Install gcc-aarch64-linux-gnu - if: ${{ matrix.os == 'ubuntu-latest' }} - run: sudo apt-get install gcc-aarch64-linux-gnu - - - name: Add rustup x86_64 target - run: rustup target add ${{ matrix.x86_64-target }} - - - name: Add rustup aarch64 target - run: rustup target add ${{ matrix.aarch64-target }} - - name: Build x86_64 target in release mode - run: cargo build --release --target ${{ matrix.x86_64-target }} --locked + uses: houseabsolute/actions-rust-cross@v0 + with: + target: ${{ matrix.x86_64-target }} + args: '--release --locked' - name: Build aarch64 target in release mode - run: cargo build --release --target ${{ matrix.aarch64-target }} --locked + uses: houseabsolute/actions-rust-cross@v0 + with: + target: ${{ matrix.aarch64-target }} + args: '--release --locked' - name: Get latest release version number id: get_version @@ -102,7 +97,7 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.ref }} - release_name: grex ${{ steps.get_version.outputs.version }} + release_name: grex ${{ steps.get_version.outputs.version-without-v }} file_glob: true file: target/*/release/grex-${{ steps.get_version.outputs.version }}-*.{zip,tar.gz} @@ -137,7 +132,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels + name: linux-${{ matrix.target }}-wheels path: dist python-windows-release-build: @@ -171,7 +166,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels + name: windows-${{ matrix.target }}-wheels path: dist python-macos-release-build: @@ -204,7 +199,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels + name: macos-${{ matrix.target }}-wheels path: dist python-release-upload: @@ -216,8 +211,6 @@ jobs: steps: - name: Download wheels from previous jobs uses: actions/download-artifact@v4 - with: - name: wheels - name: Upload to PyPI uses: PyO3/maturin-action@v1 diff --git a/README.md b/README.md index 613f68d..fc412c1 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ [![pypi](https://img.shields.io/badge/PYPI-v1.0.1-blue?logo=PyPI&logoColor=yellow)](https://pypi.org/project/grex) [![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0) - [![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) - [![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) + [![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) + [![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) [![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) [![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) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index a689f40..d749dce 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,4 +1,4 @@ -## grex 1.4.5 (released on 05 Mar 2024) +## grex 1.4.5 (released on 06 Mar 2024) ### Improvements