Skip to content

Commit

Permalink
Add a Windows ARM64 release.
Browse files Browse the repository at this point in the history
Fixup arch detection in `examples/run.sh` to handle Git for Windows
(and thus bash, etc.) being x86-64 still: use PowerShell to determine
the true arch.
  • Loading branch information
jsirois committed Aug 26, 2024
1 parent 629f5b4 commit 02a394a
Show file tree
Hide file tree
Showing 11 changed files with 247 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
matrix:
# N.B.: macos-12 is the oldest non-deprecated Intel Mac runner and macos-14 is the oldest
# non-deprecated ARM Mac runner.
os: [ubuntu-22.04, linux-arm64, macos-12, macos-14, windows-2022]
os: [ ubuntu-22.04, linux-arm64, macos-12, macos-14, windows-2022, windows-arm64 ]
steps:
- uses: actions/checkout@v4
- name: Check Formatting
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
matrix:
# N.B.: macos-12 is the oldest non-deprecated Intel Mac runner and macos-14 is the oldest
# non-deprecated ARM Mac runner.
os: [ ubuntu-22.04, linux-arm64, macos-12, macos-14, windows-2022 ]
os: [ ubuntu-22.04, linux-arm64, macos-12, macos-14, windows-2022, windows-arm64 ]
environment: Release
permissions:
id-token: write
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
with:
changelog-file: ${{ github.workspace }}/CHANGES.md
version: ${{ needs.determine-tag.outputs.release-version }}
setup-python: ${{ matrix.os != 'linux-arm64' }}
setup-python: ${{ matrix.os != 'linux-arm64' && matrix.os != 'windows-arm64' }}
- name: Create ${{ needs.determine-tag.outputs.release-tag }} Release
uses: softprops/action-gh-release@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 1.2.0

This release adds support for Windows ARM64.

## 1.1.1

This release fixes missing attestations for Linux ARM64 artifacts.
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
Expand Up @@ -5,7 +5,7 @@ members = [

[package]
name = "scie-jump"
version = "1.1.1"
version = "1.2.0"
description = "The self contained interpreted executable launcher."
authors = [
"John Sirois <[email protected]>",
Expand Down
42 changes: 42 additions & 0 deletions examples/cat/lift.windows-aarch64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"scie": {
"lift": {
"name": "java",
"files": [
{
"name": "openjdk-19.0.1_windows-x64_bin.zip",
"key": "jdk",
"size": 194441800,
"hash": "adb1a33c07b45c39b926bdeeadf800f701be9c3d04e0deb543069e5f09856185",
"type": "zip"
},
{
"name": "cowsay-1.1.0.jar",
"key": "cowsay.jar",
"size": 1724250,
"hash": "212ee64546eb8b5074572fed4107d850eb90bc462aa3099c0ac8ea63fdca7811",
"type": "blob"
}
],
"boot": {
"commands": {
"": {
"exe": "{jdk}/jdk-19.0.1/bin/java",
"args": [
"-jar",
"{cowsay.jar}"
],
"env": {
"=JAVA_HOME": "{jdk}/jdk-19.0.1",
"=PATH": "{jdk}/jdk-19.0.1/bin:{scie.env.PATH}"
}
}
}
}
},
"jump": null
},
"fetch": [
"https://download.java.net/java/GA/jdk19.0.1/afdd2e245b014143b62ccb916125e3ce/10/GPL/openjdk-19.0.1_windows-x64_bin.zip"
]
}
38 changes: 38 additions & 0 deletions examples/java/lift.windows-aarch64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"scie": {
"lift": {
"name": "coursier",
"boot": {
"commands": {
"": {
"env": {
"=JAVA_HOME": "{jdk}/jdk11.0.17_8",
"=PATH": "{jdk}/jdk11.0.17_8/bin:{scie.env.PATH}"
},
"exe": "{jdk}/jdk11.0.17_8/bin/java",
"args": [
"-jar",
"{coursier.jar}"
]
}
}
},
"files": [
{
"name": "amazon-corretto-11.0.17.8.1-windows-x64-jdk.zip",
"key": "jdk"
},
{
"name": "coursier.jar"
}
]
}
},
"fetch": [
"https://corretto.aws/downloads/resources/11.0.17.8.1/amazon-corretto-11.0.17.8.1-windows-x64-jdk.zip"
],
"custom": {
"arbitrary": 3
},
"more": ["and", "more"]
}
57 changes: 57 additions & 0 deletions examples/load/lift.windows-aarch64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"scie": {
"lift": {
"name": "cowsay",
"load_dotenv": true,
"files": [
{
"name": "get.sh"
},
{
"name": "cowsay-1.1.0.jar",
"key": "cowsay.jar",
"size": 1724250,
"hash": "212ee64546eb8b5074572fed4107d850eb90bc462aa3099c0ac8ea63fdca7811",
"type": "blob",
"source": "get"
},
{
"name": "openjdk-19.0.1_windows-x64_bin.zip",
"key": "jdk",
"size": 194441800,
"hash": "adb1a33c07b45c39b926bdeeadf800f701be9c3d04e0deb543069e5f09856185",
"type": "zip",
"source": "get"
}
],
"boot": {
"commands": {
"": {
"exe": "{jdk}/jdk-19.0.1/bin/java",
"args": [
"-jar",
"{cowsay.jar}"
],
"env": {
"=JAVA_HOME": "{jdk}/jdk-19.0.1",
"=PATH": "{jdk}/jdk-19.0.1/bin:{scie.env.PATH}"
}
}
},
"bindings": {
"get": {
"exe": "C:\\Program Files\\Git\\usr\\bin\\bash",
"args": [
"{get.sh}",
"{scie.env.GET_CONFIG={scie.lift}}"
]
}
}
}
}
},
"get": {
"openjdk-19.0.1_windows-x64_bin.zip": "https://download.java.net/java/GA/jdk19.0.1/afdd2e245b014143b62ccb916125e3ce/10/GPL/openjdk-19.0.1_windows-x64_bin.zip",
"cowsay-1.1.0.jar": "https://repo1.maven.org/maven2/com/github/ricksbrown/cowsay/1.1.0/cowsay-1.1.0.jar"
}
}
32 changes: 32 additions & 0 deletions examples/node/lift.windows-aarch64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"scie": {
"lift": {
"name": "node.js",
"boot": {
"commands": {
"node": {
"env": {
"=PATH": "{node}/node-v18.12.0-win-x64:{scie.env.PATH}"
},
"exe": "{node}/node-v18.12.0-win-x64/node.exe"
},
"npm": {
"env": {
"=PATH": "{node}/node-v18.12.0-win-x64/bin:{scie.env.PATH}"
},
"exe": "{node}/node-v18.12.0-win-x64/npm.cmd"
}
}
},
"files": [
{
"name": "node-v18.12.0-win-x64.zip",
"key": "node"
}
]
}
},
"fetch": [
"https://nodejs.org/dist/v18.12.0/node-v18.12.0-win-x64.zip"
]
}
59 changes: 59 additions & 0 deletions examples/ptex/lift.windows-aarch64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"scie": {
"lift": {
"name": "cowsay",
"files": [
{
"name": "ptex-windows-x86_64.exe",
"key": "ptex"
},
{
"name": "cowsay-1.1.0.jar",
"key": "cowsay.jar",
"size": 1724250,
"hash": "212ee64546eb8b5074572fed4107d850eb90bc462aa3099c0ac8ea63fdca7811",
"type": "blob",
"source": "ptex-fetch"
},
{
"name": "openjdk-19.0.1_windows-x64_bin.zip",
"key": "jdk",
"size": 194441800,
"hash": "adb1a33c07b45c39b926bdeeadf800f701be9c3d04e0deb543069e5f09856185",
"type": "zip",
"source": "ptex-fetch"
}
],
"boot": {
"commands": {
"": {
"exe": "{jdk}/jdk-19.0.1/bin/java",
"args": [
"-jar",
"{cowsay.jar}"
],
"env": {
"=JAVA_HOME": "{jdk}/jdk-19.0.1",
"=PATH": "{jdk}/jdk-19.0.1/bin:{scie.env.PATH}"
}
}
},
"bindings": {
"ptex-fetch": {
"exe": "{ptex}",
"args": [
"{scie.lift}"
]
}
}
}
}
},
"fetch": [
"https://github.com/a-scie/ptex/releases/download/v0.2.0/ptex-windows-x86_64.exe"
],
"ptex": {
"openjdk-19.0.1_windows-x64_bin.zip": "https://download.java.net/java/GA/jdk19.0.1/afdd2e245b014143b62ccb916125e3ce/10/GPL/openjdk-19.0.1_windows-x64_bin.zip",
"cowsay-1.1.0.jar": "https://repo1.maven.org/maven2/com/github/ricksbrown/cowsay/1.1.0/cowsay-1.1.0.jar"
}
}
15 changes: 10 additions & 5 deletions examples/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ function calculate_os() {
function calculate_arch() {
local arch

arch="$(uname -m)"
if [[ "${arch}" =~ x86[_-]64 ]]; then
echo x86_64
elif [[ "${arch}" =~ arm64|aarch64 ]]; then
if [[ "windows" == "$1" ]]; then
arch="$(pwsh -c '$Env:PROCESSOR_ARCHITECTURE')"
else
arch="$(uname -m)"
fi

if [[ "${arch,,}" =~ x86[_-]64 ]]; then
echo x86_64
elif [[ "${arch,,}" =~ arm64|aarch64 ]]; then
echo aarch64
else
die "Integration tests are not supported for this chip architecture (${arch})."
Expand Down Expand Up @@ -122,7 +127,7 @@ for arg in "$@"; do
fi
done

ARCH="$(calculate_arch)"
ARCH="$(calculate_arch "${OS}")"
OS_ARCH="${OS}-${ARCH}"
LIFT="lift.${OS_ARCH}.json"
DIST_DIR="${REPO_ROOT}/dist"
Expand Down

0 comments on commit 02a394a

Please sign in to comment.