Skip to content

Commit

Permalink
Merge pull request #399 from gramlang/apple-silicon
Browse files Browse the repository at this point in the history
Add support for Apple silicon
  • Loading branch information
stepchowfun authored May 14, 2023
2 parents 9d2d601 + 5e2aff3 commit af320a3
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/gram
if-no-files-found: error
- uses: actions/upload-artifact@v2
with:
name: aarch64-apple-darwin
path: target/aarch64-apple-darwin/release/gram
if-no-files-found: error
install-macos:
name: Install on macOS
runs-on: macos-latest
Expand Down Expand Up @@ -153,6 +165,9 @@ jobs:
mv \
artifacts/x86_64-apple-darwin/gram \
artifacts/gram-x86_64-apple-darwin
mv \
artifacts/aarch64-apple-darwin/gram \
artifacts/gram-aarch64-apple-darwin
mv \
artifacts/x86_64-pc-windows-msvc/gram.exe \
artifacts/gram-x86_64-pc-windows-msvc.exe
Expand All @@ -164,6 +179,7 @@ jobs:
--attach 'artifacts/gram-x86_64-unknown-linux-gnu' \
--attach 'artifacts/gram-x86_64-unknown-linux-musl' \
--attach 'artifacts/gram-x86_64-apple-darwin' \
--attach 'artifacts/gram-aarch64-apple-darwin' \
--attach 'artifacts/gram-x86_64-pc-windows-msvc.exe' \
"v$VERSION"
echo "Created release v$VERSION."
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.1] - 2023-05-13

### Added
- Gram supports a new platform: macOS on Apple silicon.

## [0.0.0] - 2021-06-20

### Added
Expand Down
4 changes: 3 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gram"
version = "0.0.0"
version = "0.0.1"
authors = ["Stephan Boyer <[email protected]>"]
edition = "2021"
description = "A programming language for distributed systems."
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

## Installation instructions

### 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 Gram with this command:
If you're running macOS (AArch64 or x86-64) or Linux (x86-64), you can install Gram with this command:

```sh
curl https://raw.githubusercontent.com/gramlang/gram/main/install.sh -LSfs | sh
Expand Down

0 comments on commit af320a3

Please sign in to comment.