From 3015560a69206d7c1165ba07e100771311cbeb9b Mon Sep 17 00:00:00 2001 From: Stephan Boyer Date: Sat, 13 May 2023 17:05:27 -0700 Subject: [PATCH] Add support for Apple silicon --- .github/workflows/ci.yml | 18 +++++++++++++++++- CHANGELOG.md | 7 ++++++- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 4 ++-- 5 files changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18f93b2..e38d482 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,14 +78,26 @@ jobs: rustup toolchain install 1.65.0 # [ref:rust_1.65.0] rustup default 1.65.0 # [ref:rust_1.65.0] - # Build and test. + # Build and test for x86_64-apple-darwin. cargo build --locked --release --target x86_64-apple-darwin NO_COLOR=true cargo test --locked # [ref:colorless_tests] + + # Build and test for aarch64-apple-darwin. + rustup target add aarch64-apple-darwin + SDKROOT=$(xcrun --show-sdk-path) \ + MACOSX_DEPLOYMENT_TARGET=$(xcrun --show-sdk-version) \ + cargo build --locked --release --target aarch64-apple-darwin + NO_COLOR=true cargo test --locked # [ref:colorless_tests] - uses: actions/upload-artifact@v2 with: name: x86_64-apple-darwin path: target/x86_64-apple-darwin/release/docuum if-no-files-found: error + - uses: actions/upload-artifact@v2 + with: + name: aarch64-apple-darwin + path: target/aarch64-apple-darwin/release/docuum + if-no-files-found: error install-macos: name: Install on macOS runs-on: macos-latest @@ -157,6 +169,9 @@ jobs: mv \ artifacts/x86_64-apple-darwin/docuum \ artifacts/docuum-x86_64-apple-darwin + mv \ + artifacts/aarch64-apple-darwin/docuum \ + artifacts/docuum-aarch64-apple-darwin mv \ artifacts/x86_64-pc-windows-msvc/docuum.exe \ artifacts/docuum-x86_64-pc-windows-msvc.exe @@ -189,6 +204,7 @@ jobs: --attach 'artifacts/docuum-x86_64-unknown-linux-gnu' \ --attach 'artifacts/docuum-x86_64-unknown-linux-musl' \ --attach 'artifacts/docuum-x86_64-apple-darwin' \ + --attach 'artifacts/docuum-aarch64-apple-darwin' \ --attach 'artifacts/docuum-x86_64-pc-windows-msvc.exe' \ "v$VERSION" echo "Created release v$VERSION." diff --git a/CHANGELOG.md b/CHANGELOG.md index 534fd79..05added 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,12 @@ 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). -## [1.22.0] - 2023-04-09 +## [0.22.1] - 2023-05-13 + +### Added +- Docuum supports a new platform: macOS on Apple silicon. + +## [0.22.0] - 2023-04-09 ### Added - Added `--deletion-chunk-size`, thanks to Kulek Alexandr. diff --git a/Cargo.lock b/Cargo.lock index 595b3ce..592ebe1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,7 +162,7 @@ dependencies = [ [[package]] name = "docuum" -version = "0.22.0" +version = "0.22.1" dependencies = [ "atty", "byte-unit", diff --git a/Cargo.toml b/Cargo.toml index 654a503..2508ec0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "docuum" -version = "0.22.0" +version = "0.22.1" authors = ["Stephan Boyer "] edition = "2021" description = "LRU eviction of Docker images." diff --git a/README.md b/README.md index a1f6bdd..503a11b 100644 --- a/README.md +++ b/README.md @@ -70,9 +70,9 @@ Installation consists of two steps: ### Installing the binary -#### Installation on macOS or Linux (x86-64) +### Installation on macOS (AArch64 or x86-64) or Linux (x86-64) -If you're running macOS or Linux on an x86-64 CPU, you can install Docuum with this command: +If you're running macOS (AArch64 or x86-64) or Linux (x86-64), you can install Docuum with this command: ```sh curl https://raw.githubusercontent.com/stepchowfun/docuum/main/install.sh -LSfs | sh