Skip to content

Commit

Permalink
Try to fix build for ARM64 Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
pemistahl committed Mar 5, 2024
1 parent e39a006 commit c2ccc73
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
17 changes: 17 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright © 2019-today Peter M. Stahl [email protected]
#
# 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"
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
include:
- os: ubuntu-latest
name: Rust Release Build on Linux
x86_64-target: x86_64-unknown-linux-musl
aarch64-target: aarch64-unknown-linux-musl
x86_64-target: x86_64-unknown-linux-gnu
aarch64-target: aarch64-unknown-linux-gnu

- os: macos-latest
name: Rust Release Build on MacOS
Expand All @@ -50,6 +50,10 @@ 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 }}

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ jobs:
- name: Add rustup target
run: rustup target add ${{ matrix.target }}

- name: Install MUSL tools for Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install musl-tools libssl-dev

- name: Store or retrieve cargo caches
uses: actions/cache@v4
with:
Expand Down
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#
# Copyright © 2019-today Peter M. Stahl [email protected]
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -62,10 +63,6 @@ tempfile = "3.10.1"
[target.'cfg(target_family = "wasm")'.dev-dependencies]
wasm-bindgen-test = "0.3.42"

[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"
rustflags = ["-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc"]

[features]
default = ["cli"]
cli = ["clap"]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-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)
[![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)

[![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)
Expand Down

0 comments on commit c2ccc73

Please sign in to comment.