From 460a867d0f4bfb6ba6e162d22d5957001c00f11d Mon Sep 17 00:00:00 2001 From: Stephan Boyer Date: Fri, 2 Jun 2023 09:06:24 -0400 Subject: [PATCH] Add support for AArch64 musl Linux --- .github/workflows/ci.yml | 16 ++++++++++++++++ CHANGELOG.md | 5 +++++ Cargo.lock | 2 +- Cargo.toml | 2 +- toast.yml | 6 ++++++ 5 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc081f26..db866f44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,7 @@ jobs: - run: | # Make Bash not silently ignore errors. set -euo pipefail + # The artifact name will contain the target triple, so the file name doesn't need to. mv artifacts/typical-aarch64-unknown-linux-gnu artifacts/typical - uses: actions/upload-artifact@v2 @@ -51,6 +52,17 @@ jobs: name: aarch64-unknown-linux-gnu path: artifacts/typical if-no-files-found: error + - run: | + # Make Bash not silently ignore errors. + set -euo pipefail + + # The artifact name will contain the target triple, so the file name doesn't need to. + mv artifacts/typical-aarch64-unknown-linux-musl artifacts/typical + - uses: actions/upload-artifact@v2 + with: + name: aarch64-unknown-linux-musl + path: artifacts/typical + if-no-files-found: error ci-windows: name: Build for Windows runs-on: windows-latest @@ -182,6 +194,9 @@ jobs: mv \ artifacts/aarch64-unknown-linux-gnu/typical \ artifacts/typical-aarch64-unknown-linux-gnu + mv \ + artifacts/aarch64-unknown-linux-musl/typical \ + artifacts/typical-aarch64-unknown-linux-musl mv \ artifacts/x86_64-apple-darwin/typical \ artifacts/typical-x86_64-apple-darwin @@ -199,6 +214,7 @@ jobs: --attach 'artifacts/typical-x86_64-unknown-linux-gnu' \ --attach 'artifacts/typical-x86_64-unknown-linux-musl' \ --attach 'artifacts/typical-aarch64-unknown-linux-gnu' \ + --attach 'artifacts/typical-aarch64-unknown-linux-musl' \ --attach 'artifacts/typical-x86_64-apple-darwin' \ --attach 'artifacts/typical-aarch64-apple-darwin' \ --attach 'artifacts/typical-x86_64-pc-windows-msvc.exe' \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 15f1a6b1..e5604271 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.9.5] - 2023-06-02 + +### Added +- Typical supports a new platform: AArch64 musl Linux. + ## [0.9.4] - 2023-05-23 ### Added diff --git a/Cargo.lock b/Cargo.lock index 4b84c795..b75c027a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,7 +162,7 @@ dependencies = [ [[package]] name = "typical" -version = "0.9.4" +version = "0.9.5" dependencies = [ "clap", "colored", diff --git a/Cargo.toml b/Cargo.toml index 63bccbb1..5959f22b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "typical" -version = "0.9.4" +version = "0.9.5" authors = ["Stephan Boyer "] edition = "2021" description = "Data interchange with algebraic data types." diff --git a/toast.yml b/toast.yml index fa15c87a..9f51eef3 100644 --- a/toast.yml +++ b/toast.yml @@ -315,16 +315,19 @@ tasks: rustup target add x86_64-unknown-linux-gnu rustup target add x86_64-unknown-linux-musl rustup target add aarch64-unknown-linux-gnu + rustup target add aarch64-unknown-linux-musl # Set the linkers. export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-gnu-gcc export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc + export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc # Build the project with Cargo for each Linux target. cargo-online build --release --target x86_64-unknown-linux-gnu cargo-online build --release --target x86_64-unknown-linux-musl cargo-online build --release --target aarch64-unknown-linux-gnu + cargo-online build --release --target aarch64-unknown-linux-musl # Move the binaries to a more conveniennt location for exporting. mkdir artifacts @@ -337,6 +340,9 @@ tasks: cp \ target/aarch64-unknown-linux-gnu/release/typical \ artifacts/typical-aarch64-unknown-linux-gnu + cp \ + target/aarch64-unknown-linux-musl/release/typical \ + artifacts/typical-aarch64-unknown-linux-musl publish: description: Publish the crate to crates.io.