Skip to content

Commit d30042c

Browse files
authored
Merge pull request #106 from stepchowfun/aarch64-unknown-linux-gnu
Add support for AArch64 GNU Linux
2 parents 367b128 + cbf166b commit d30042c

File tree

7 files changed

+46
-15
lines changed

7 files changed

+46
-15
lines changed

Diff for: .github/workflows/ci.yml

+14
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ jobs:
4141
name: x86_64-unknown-linux-musl
4242
path: artifacts/paxos
4343
if-no-files-found: error
44+
- run: |
45+
# Make Bash not silently ignore errors.
46+
set -euo pipefail
47+
# The artifact name will contain the target triple, so the file name doesn't need to.
48+
mv artifacts/paxos-aarch64-unknown-linux-gnu artifacts/paxos
49+
- uses: actions/upload-artifact@v2
50+
with:
51+
name: aarch64-unknown-linux-gnu
52+
path: artifacts/paxos
53+
if-no-files-found: error
4454
ci-windows:
4555
name: Build for Windows
4656
runs-on: windows-latest
@@ -162,6 +172,9 @@ jobs:
162172
mv \
163173
artifacts/x86_64-unknown-linux-musl/paxos \
164174
artifacts/paxos-x86_64-unknown-linux-musl
175+
mv \
176+
artifacts/aarch64-unknown-linux-gnu/paxos \
177+
artifacts/paxos-aarch64-unknown-linux-gnu
165178
mv \
166179
artifacts/x86_64-apple-darwin/paxos \
167180
artifacts/paxos-x86_64-apple-darwin
@@ -178,6 +191,7 @@ jobs:
178191
--message "v$VERSION" \
179192
--attach 'artifacts/paxos-x86_64-unknown-linux-gnu' \
180193
--attach 'artifacts/paxos-x86_64-unknown-linux-musl' \
194+
--attach 'artifacts/paxos-aarch64-unknown-linux-gnu' \
181195
--attach 'artifacts/paxos-x86_64-apple-darwin' \
182196
--attach 'artifacts/paxos-aarch64-apple-darwin' \
183197
--attach 'artifacts/paxos-x86_64-pc-windows-msvc.exe' \

Diff for: CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.2] - 2023-05-23
9+
10+
### Added
11+
- Paxos supports a new platform: AArch64 GNU Linux.
12+
813
## [1.0.1] - 2023-05-13
914

1015
### Added

Diff for: Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "paxos"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
authors = ["Stephan Boyer <[email protected]>"]
55
edition = "2021"
66
description = "An implementation of single-decree Paxos."

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ OPTIONS:
5252

5353
## Installation instructions
5454

55-
### Installation on macOS (AArch64 or x86-64) or Linux (x86-64)
55+
### Installation on macOS or Linux (AArch64 or x86-64)
5656

57-
If you're running macOS (AArch64 or x86-64) or Linux (x86-64), you can install Paxos with this command:
57+
If you're running macOS or Linux (AArch64 or x86-64), you can install Paxos with this command:
5858

5959
If you're running macOS or Linux on an x86-64 CPU, you can install Paxos with this command:
6060

Diff for: install.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@
2121
if uname -a | grep -qi 'x86_64.*GNU/Linux'; then
2222
echo 'x86-64 GNU Linux detected.'
2323
FILENAME=paxos-x86_64-unknown-linux-gnu
24-
elif uname -a | grep -qi 'x86_64 Linux'; then
24+
elif uname -a | grep -qi 'x86_64.*Linux'; then
2525
echo 'x86-64 non-GNU Linux detected.'
2626
FILENAME=paxos-x86_64-unknown-linux-musl
27-
fi
28-
if uname -a | grep -qi 'Darwin.*x86_64'; then
27+
elif uname -a | grep -qi 'aarch64.*GNU/Linux'; then
28+
echo 'AArch64 GNU Linux detected.'
29+
FILENAME=paxos-aarch64-unknown-linux-gnu
30+
elif uname -a | grep -qi 'Darwin.*x86_64'; then
2931
echo 'x86-64 macOS detected.'
3032
FILENAME=paxos-x86_64-apple-darwin
31-
fi
32-
if uname -a | grep -qi 'Darwin.*arm64'; then
33+
elif uname -a | grep -qi 'Darwin.*arm64'; then
3334
echo 'AArch64 macOS detected.'
3435
FILENAME=paxos-aarch64-apple-darwin
3536
fi

Diff for: toast.yml

+17-6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ tasks:
2929
command: |
3030
# Install the following packages:
3131
#
32-
# - build-essential - Used for linking the binary
33-
# - curl - Used for installing Tagref and Rust
34-
# - ripgrep - Used for various linting tasks
35-
# - shellcheck - Used for linting shell scripts
32+
# - curl - Used for installing Tagref and Rust
33+
# - gcc-aarch64-linux-gnu - Used for linking the binary for AArch64
34+
# - gcc-x86-64-linux-gnu - Used for linking the binary for x86-64
35+
# - ripgrep - Used for various linting tasks
36+
# - shellcheck - Used for linting shell scripts
3637
apt-get update
37-
apt-get install --yes build-essential curl ripgrep shellcheck
38+
apt-get install --yes curl gcc-aarch64-linux-gnu gcc-x86-64-linux-gnu ripgrep shellcheck
3839
3940
install_tagref:
4041
description: Install Tagref, a reference checking tool.
@@ -203,10 +204,17 @@ tasks:
203204
# Add the targets. It's likely that this script is currently running in one of them.
204205
rustup target add x86_64-unknown-linux-gnu
205206
rustup target add x86_64-unknown-linux-musl
207+
rustup target add aarch64-unknown-linux-gnu
206208
207-
# Build the project for both Linux targets with Cargo.
209+
# Set the linkers.
210+
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc
211+
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-gnu-gcc
212+
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
213+
214+
# Build the project with Cargo for each Linux target.
208215
cargo-online build --release --target x86_64-unknown-linux-gnu
209216
cargo-online build --release --target x86_64-unknown-linux-musl
217+
cargo-online build --release --target aarch64-unknown-linux-gnu
210218
211219
# Move the binaries to a more conveniennt location for exporting.
212220
mkdir artifacts
@@ -216,3 +224,6 @@ tasks:
216224
cp \
217225
target/x86_64-unknown-linux-musl/release/paxos \
218226
artifacts/paxos-x86_64-unknown-linux-musl
227+
cp \
228+
target/aarch64-unknown-linux-gnu/release/paxos \
229+
artifacts/paxos-aarch64-unknown-linux-gnu

0 commit comments

Comments
 (0)