Skip to content

Commit

Permalink
Add support for Linux powerpc64le. (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois authored Dec 13, 2024
1 parent 0942975 commit 6cc2069
Show file tree
Hide file tree
Showing 14 changed files with 190 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
name: Linux s390x
cross-target: s390x-unknown-linux-gnu
docker-platform: linux/s390x
- os: ubuntu-24.04
name: Linux powerpc64le
cross-target: powerpc64le-unknown-linux-gnu
docker-platform: linux/ppc64le
- os: macos-13
name: macOS x86-64
- os: macos-14
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ jobs:
- os: ubuntu-24.04
name: Linux s390x
cross-target: s390x-unknown-linux-gnu
- os: ubuntu-24.04
name: Linux powerpc64le
cross-target: powerpc64le-unknown-linux-gnu
- os: macos-13
name: macOS x86-64
- os: macos-14
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.5.0

This release adds support for Linux powerpc64le.

## 1.4.1

This release fixes the `scie.platform` and `scie.platform.arch` placeholders for armv7l.
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.4.1"
version = "1.5.0"
description = "The self contained interpreted executable launcher."
authors = [
"John Sirois <john.sirois@gmail.com>",
Expand Down
4 changes: 2 additions & 2 deletions docs/packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ Further placeholders you can use in command "exe", "args" and "env" values inclu
+ `{scie.lift}`: This expands to the path to the lift manifest, which is extracted to disk when you
use this placeholder. This can be used to read custom metadata stored in the lift manifest.
+ `{scie.platform}`: The `<OS>-<ARCH>` value for the current platform where `<OS>` is one of
`linux`, `macos` or `windows` and `<ARCH>` is either `s390x` (Linux only), `armv7l` (Linux only),
`aarch64` or `x86_64`.
`linux`, `macos` or `windows` and `<ARCH>` is either `powerpc64`, `s390x` or `armv7l` (Linux
only); or else `aarch64` or `x86_64` (all supported OSes).
+ `{scie.platform.arch}`: The current chip architecture as described by `<ARCH>` above.
+ `{scie.platform.os}`: The current operating system as described by `<OS>` above.
+ `{scie.user.cache_dir=<fallback>}`: The default user cache dir or `<fallback>` if there is none.
Expand Down
10 changes: 5 additions & 5 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ this sort of artifact.

The `run.sh` script then looks for the default lift manifest for the example. The default lift
manifest is named `lift.<os>-<arch>.json` in the example directory where `<os>` is currently one of
`linux`, `macos` or `windows` and `<arch>` is currently one of `s390x` (Linux only), `armv7l` (Linux
only), `aarch64` or `x86_64`. If that lift manifest has a top-level "fetch" key, it's expected to
have a list of URL string values and all of those will be fetched. Use this facility when writing a
new example to ensure platform-specific artifacts are fetched - typically the interpreter
distribution being used by the example.
`linux`, `macos` or `windows` and `<arch>` is currently one of `powerpc64`, `s390x` or `armv7l` (
Linux only); or else `aarch64` or `x86_64` (all supported OSes). If that lift manifest has a
top-level "fetch" key, it's expected to have a list of URL string values and all of those will be
fetched. Use this facility when writing a new example to ensure platform-specific artifacts are
fetched - typically the interpreter distribution being used by the example.

Inside the example's directory there should be a `test.sh` bash script that need not be executable.
It will be run by the `run.sh` script using `bash -eou pipefail test.sh` with the example's
Expand Down
21 changes: 21 additions & 0 deletions examples/busybox/default-only-lift.linux-powerpc64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"scie": {
"lift": {
"name": "default-only",
"boot": {
"commands": {
"": {
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "import sys; print('.'.join(map(str, sys.version_info[:3])))"]
}
}
},
"files": [
{
"name": "cpython-3.11.11+20241206-ppc64le-unknown-linux-gnu-install_only_stripped.tar.gz",
"key": "cpython"
}
]
}
}
}
18 changes: 18 additions & 0 deletions examples/busybox/lift.linux-powerpc64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"scie": {
"lift": {
"name": "no-commands",
"boot": {
"commands": {}
},
"files": [
{
"name": "cpython-3.11.11+20241206-ppc64le-unknown-linux-gnu-install_only_stripped.tar.gz"
}
]
}
},
"fetch": [
"https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.11.11+20241206-ppc64le-unknown-linux-gnu-install_only_stripped.tar.gz"
]
}
36 changes: 36 additions & 0 deletions examples/busybox/mixed-no-default-desc-lift.linux-powerpc64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"scie": {
"lift": {
"name": "mixed-no-default-desc",
"description": "The scie's overall description.",
"boot": {
"commands": {
"": {
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "import sys; print('.'.join(map(str, sys.version_info[:3])))"]
},
"foo": {
"description": "Prints foo.",
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('foo')"]
},
"bar": {
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('bar')"]
},
"runs-baz": {
"description": "Runs baz.",
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('ran baz')"]
}
}
},
"files": [
{
"name": "cpython-3.11.11+20241206-ppc64le-unknown-linux-gnu-install_only_stripped.tar.gz",
"key": "cpython"
}
]
}
}
}
37 changes: 37 additions & 0 deletions examples/busybox/mixed-with-default-desc-lift.linux-powerpc64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"scie": {
"lift": {
"name": "mixed-with-default-desc",
"description": "The scie's overall description.",
"boot": {
"commands": {
"": {
"description": "Prints the Python version.",
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "import sys; print('.'.join(map(str, sys.version_info[:3])))"]
},
"foo": {
"description": "Prints foo.",
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('foo')"]
},
"bar": {
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('bar')"]
},
"runs-baz": {
"description": "Runs baz.",
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('ran baz')"]
}
}
},
"files": [
{
"name": "cpython-3.11.11+20241206-ppc64le-unknown-linux-gnu-install_only_stripped.tar.gz",
"key": "cpython"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"scie": {
"lift": {
"name": "named-commands-only-no-desc",
"boot": {
"commands": {
"foo": {
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('foo')"]
},
"bar": {
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('bar')"]
}
}
},
"files": [
{
"name": "cpython-3.11.11+20241206-ppc64le-unknown-linux-gnu-install_only_stripped.tar.gz",
"key": "cpython"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"scie": {
"lift": {
"name": "named-commands-only-with-desc",
"boot": {
"commands": {
"foo": {
"description": "Prints foo.",
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('foo')"]
},
"bar": {
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('bar')"]
},
"runs-baz": {
"description": "Runs baz.",
"exe": "{cpython}/python/bin/python3.11",
"args": ["-c", "print('ran baz')"]
}
}
},
"files": [
{
"name": "cpython-3.11.11+20241206-ppc64le-unknown-linux-gnu-install_only_stripped.tar.gz",
"key": "cpython"
}
]
}
}
}
2 changes: 2 additions & 0 deletions examples/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ function calculate_arch() {
echo armv7l
elif [[ "${arch}" == "s390x" ]]; then
echo s390x
elif [[ "${arch}" == "ppc64le" ]]; then
echo powerpc64
else
die "Integration tests are not supported for this chip architecture (${arch})."
fi
Expand Down

0 comments on commit 6cc2069

Please sign in to comment.