Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Linux s390x. #258

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
name: Linux armv7l (musl)
cross-target: armv7-unknown-linux-musleabihf
docker-platform: linux/arm/v7
- os: ubuntu-24.04
name: Linux s390x
cross-target: s390x-unknown-linux-gnu
docker-platform: linux/s390x
- 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 @@ -57,6 +57,9 @@ jobs:
- os: ubuntu-24.04
name: Linux armv7l
cross-target: armv7-unknown-linux-musleabihf
- os: ubuntu-24.04
name: Linux s390x
cross-target: s390x-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.4.0

This release adds support for Linux s390x.

## 1.3.0

This release adds support for Linux ARM (armv7l and armv8l 32 bit mode).
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.3.0"
version = "1.4.0"
description = "The self contained interpreted executable launcher."
authors = [
"John Sirois <[email protected]>",
Expand Down
3 changes: 2 additions & 1 deletion docs/packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +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 `armv7l` (Linux only), `aarch64` or `x86_64`.
`linux`, `macos` or `windows` and `<ARCH>` is either `s390x` (Linux only), `armv7l` (Linux only),
`aarch64` or `x86_64`.
+ `{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
9 changes: 5 additions & 4 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +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 `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 `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.

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-s390x.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-s390x-unknown-linux-gnu-install_only_stripped.tar.gz",
"key": "cpython"
}
]
}
}
}
18 changes: 18 additions & 0 deletions examples/busybox/lift.linux-s390x.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-s390x-unknown-linux-gnu-install_only_stripped.tar.gz"
}
]
}
},
"fetch": [
"https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.11.11+20241206-s390x-unknown-linux-gnu-install_only_stripped.tar.gz"
]
}
36 changes: 36 additions & 0 deletions examples/busybox/mixed-no-default-desc-lift.linux-s390x.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-s390x-unknown-linux-gnu-install_only_stripped.tar.gz",
"key": "cpython"
}
]
}
}
}
37 changes: 37 additions & 0 deletions examples/busybox/mixed-with-default-desc-lift.linux-s390x.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-s390x-unknown-linux-gnu-install_only_stripped.tar.gz",
"key": "cpython"
}
]
}
}
}
25 changes: 25 additions & 0 deletions examples/busybox/named-commands-only-no-desc-lift.linux-s390x.json
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-s390x-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-s390x-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 @@ -49,6 +49,8 @@ function calculate_arch() {
echo aarch64
elif [[ "${arch}" =~ armv8l|armv7l ]]; then
echo armv7l
elif [[ "${arch}" == "s390x" ]]; then
echo s390x
else
die "Integration tests are not supported for this chip architecture (${arch})."
fi
Expand Down