Skip to content

Commit

Permalink
Merge pull request #473 from stepchowfun/v0.47.5
Browse files Browse the repository at this point in the history
Add support for Windows on AArch64
  • Loading branch information
stepchowfun authored Jun 18, 2023
2 parents b7141f3 + 461f92f commit 206213d
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 25 deletions.
61 changes: 43 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Build for Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- if: ${{ github.event_name == 'push' }}
uses: azure/docker-login@v1
with:
Expand All @@ -25,7 +25,7 @@ jobs:
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/toast-x86_64-unknown-linux-gnu artifacts/toast
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: x86_64-unknown-linux-gnu
path: artifacts/toast
Expand All @@ -36,7 +36,7 @@ jobs:
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/toast-x86_64-unknown-linux-musl artifacts/toast
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: x86_64-unknown-linux-musl
path: artifacts/toast
Expand All @@ -47,7 +47,7 @@ jobs:
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/toast-aarch64-unknown-linux-gnu artifacts/toast
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: aarch64-unknown-linux-gnu
path: artifacts/toast
Expand All @@ -58,7 +58,7 @@ jobs:
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/toast-aarch64-unknown-linux-musl artifacts/toast
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: aarch64-unknown-linux-musl
path: artifacts/toast
Expand All @@ -67,7 +67,7 @@ jobs:
name: Build for Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
Expand All @@ -76,22 +76,38 @@ 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.
# Add the targets.
rustup target add x86_64-pc-windows-msvc
rustup target add aarch64-pc-windows-msvc
# Build and test for x86_64-pc-windows-msvc.
RUSTFLAGS='--codegen target-feature=+crt-static' cargo build \
--locked \
--release \
--target x86_64-pc-windows-msvc
NO_COLOR=true cargo test --locked # [ref:colorless_tests]
- uses: actions/upload-artifact@v2
# Build and test for aarch64-pc-windows-msvc.
RUSTFLAGS='--codegen target-feature=+crt-static' cargo build \
--locked \
--release \
--target aarch64-pc-windows-msvc
NO_COLOR=true cargo test --locked # [ref:colorless_tests]
- uses: actions/upload-artifact@v3
with:
name: x86_64-pc-windows-msvc
path: target/x86_64-pc-windows-msvc/release/toast.exe
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: aarch64-pc-windows-msvc
path: target/aarch64-pc-windows-msvc/release/toast.exe
if-no-files-found: error
ci-macos:
name: Build for macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
Expand All @@ -100,22 +116,27 @@ jobs:
rustup toolchain install 1.65.0 # [ref:rust_1.65.0]
rustup default 1.65.0 # [ref:rust_1.65.0]
# Add the targets.
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
# Build and test for x86_64-apple-darwin.
cargo build --locked --release --target x86_64-apple-darwin
SDKROOT=$(xcrun --show-sdk-path) \
MACOSX_DEPLOYMENT_TARGET=$(xcrun --show-sdk-version) \
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
- uses: actions/upload-artifact@v3
with:
name: x86_64-apple-darwin
path: target/x86_64-apple-darwin/release/toast
if-no-files-found: error
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: aarch64-apple-darwin
path: target/aarch64-apple-darwin/release/toast
Expand All @@ -124,7 +145,7 @@ jobs:
name: Install on macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
Expand All @@ -138,7 +159,7 @@ jobs:
name: Install on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
Expand All @@ -154,8 +175,8 @@ jobs:
runs-on: ubuntu-latest
needs: [ci-linux, ci-macos, ci-windows, install-macos, install-ubuntu]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: artifacts/
- env:
Expand Down Expand Up @@ -199,6 +220,9 @@ jobs:
mv \
artifacts/x86_64-pc-windows-msvc/toast.exe \
artifacts/toast-x86_64-pc-windows-msvc.exe
mv \
artifacts/aarch64-pc-windows-msvc/toast.exe \
artifacts/toast-aarch64-pc-windows-msvc.exe
# Create the release.
hub release create \
Expand All @@ -211,9 +235,10 @@ jobs:
--attach 'artifacts/toast-x86_64-apple-darwin' \
--attach 'artifacts/toast-aarch64-apple-darwin' \
--attach 'artifacts/toast-x86_64-pc-windows-msvc.exe' \
--attach 'artifacts/toast-aarch64-pc-windows-msvc.exe' \
"v$VERSION"
echo "Created release v$VERSION."
- uses: ./.github/actions/toast
- uses: stepchowfun/toast/.github/actions/toast@main
with:
tasks: publish
docker_repo: stephanmisc/toast
Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ 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.47.5] - 2023-06-18

### Added
- Toast supports a new platform: Windows on AArch64.

## [0.47.4] - 2023-06-02

### Added
- Toast supports a new platform: AArch64 musl Linux.
- Toast supports a new platform: musl Linux on AArch64.

## [0.47.3] - 2023-05-23

### Added
- Toast supports a new platform: AArch64 GNU Linux.
- Toast supports a new platform: GNU Linux on AArch64.

## [0.47.2] - 2023-05-13

Expand Down
2 changes: 1 addition & 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 = "toast"
version = "0.47.4"
version = "0.47.5"
authors = ["Stephan Boyer <stephan@stephanboyer.com>"]
edition = "2021"
description = "Containerize your development and continuous integration environments."
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@ curl https://raw.githubusercontent.com/stepchowfun/toast/main/install.sh -LSfs |

If you prefer not to use this installation method, you can download the binary from the [releases page](https://github.com/stepchowfun/toast/releases), make it executable (e.g., with `chmod`), and place it in some directory in your [`PATH`](https://en.wikipedia.org/wiki/PATH_\(variable\)) (e.g., `/usr/local/bin`).

### Installation on Windows (x86-64)
### Installation on Windows (AArch64 or x86-64)

If you're running Windows on an x86-64 CPU, download the latest binary from the [releases page](https://github.com/stepchowfun/toast/releases) and rename it to `toast` (or `toast.exe` if you have file extensions visible). Create a directory called `Toast` in your `%PROGRAMFILES%` directory (e.g., `C:\Program Files\Toast`), and place the renamed binary in there. Then, in the "Advanced" tab of the "System Properties" section of Control Panel, click on "Environment Variables..." and add the full path to the new `Toast` directory to the `PATH` variable under "System variables". Note that the `Program Files` directory might have a different name if Windows is configured for a language other than English.
If you're running Windows (AArch64 or x86-64), download the latest binary from the [releases page](https://github.com/stepchowfun/toast/releases) and rename it to `toast` (or `toast.exe` if you have file extensions visible). Create a directory called `Toast` in your `%PROGRAMFILES%` directory (e.g., `C:\Program Files\Toast`), and place the renamed binary in there. Then, in the "Advanced" tab of the "System Properties" section of Control Panel, click on "Environment Variables..." and add the full path to the new `Toast` directory to the `PATH` variable under "System variables". Note that the `Program Files` directory might have a different name if Windows is configured for a language other than English.

To update to an existing installation, simply replace the existing binary.

Expand Down
2 changes: 1 addition & 1 deletion toast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ tasks:
output_paths:
- artifacts
command: |
# Add the targets. It's likely that this script is currently running in one of them.
# Add the targets.
rustup target add x86_64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-musl
rustup target add aarch64-unknown-linux-gnu
Expand Down

0 comments on commit 206213d

Please sign in to comment.