Skip to content

Commit

Permalink
Merge pull request #183 from stepchowfun/v1.8.4
Browse files Browse the repository at this point in the history
Add support for Windows on AArch64
  • Loading branch information
stepchowfun committed Jun 18, 2023
2 parents dd1c4c0 + 2815cc4 commit 8e9184f
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 24 deletions.
59 changes: 42 additions & 17 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/tagref-x86_64-unknown-linux-gnu artifacts/tagref
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: x86_64-unknown-linux-gnu
path: artifacts/tagref
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/tagref-x86_64-unknown-linux-musl artifacts/tagref
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: x86_64-unknown-linux-musl
path: artifacts/tagref
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/tagref-aarch64-unknown-linux-gnu artifacts/tagref
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: aarch64-unknown-linux-gnu
path: artifacts/tagref
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/tagref-aarch64-unknown-linux-musl artifacts/tagref
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: aarch64-unknown-linux-musl
path: artifacts/tagref
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/tagref.exe
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: aarch64-pc-windows-msvc
path: target/aarch64-pc-windows-msvc/release/tagref.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/tagref
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/tagref
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/tagref.exe \
artifacts/tagref-x86_64-pc-windows-msvc.exe
mv \
artifacts/aarch64-pc-windows-msvc/tagref.exe \
artifacts/tagref-aarch64-pc-windows-msvc.exe
# Create the release.
hub release create \
Expand All @@ -211,6 +235,7 @@ jobs:
--attach 'artifacts/tagref-x86_64-apple-darwin' \
--attach 'artifacts/tagref-aarch64-apple-darwin' \
--attach 'artifacts/tagref-x86_64-pc-windows-msvc.exe' \
--attach 'artifacts/tagref-aarch64-pc-windows-msvc.exe' \
"v$VERSION"
echo "Created release v$VERSION."
- uses: stepchowfun/toast/.github/actions/toast@main
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).

## [1.8.4] - 2023-06-18

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

## [1.8.3] - 2023-06-02

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

## [1.8.2] - 2023-05-22

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

## [1.8.1] - 2023-05-11

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 = "tagref"
version = "1.8.3"
version = "1.8.4"
authors = ["Stephan Boyer <[email protected]>"]
edition = "2021"
description = "Tagref helps you maintain cross-references in your code."
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ curl https://raw.githubusercontent.com/stepchowfun/tagref/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/tagref/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/tagref/releases) and rename it to `tagref` (or `tagref.exe` if you have file extensions visible). Create a directory called `Tagref` in your `%PROGRAMFILES%` directory (e.g., `C:\Program Files\Tagref`), 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 `Tagref` 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/tagref/releases) and rename it to `tagref` (or `tagref.exe` if you have file extensions visible). Create a directory called `Tagref` in your `%PROGRAMFILES%` directory (e.g., `C:\Program Files\Tagref`), 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 `Tagref` 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 @@ -200,7 +200,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 8e9184f

Please sign in to comment.