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

Added support for s390x wheel package #667

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,48 @@ jobs:
name: wheels
path: dist

build-linux-s390x:
runs-on: ubuntu-latest
needs: [lint]
strategy:
fail-fast: false
matrix:
platform: ['s390x']
steps:
- name: Building package on ${{ matrix.platform }}
uses: appleboy/[email protected]
env:
GH_REPOSITORY: ${{ github.server_url }}/${{ github.repository }}
with:
host: ${{secrets.S390X_SSH_HOST}}
username: ${{secrets.S390X_SSH_USER }}
key: ${{secrets.S390X_SSH_KEY}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of secrets will break building any PR, including this one.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If those secret variables are included , then it won't break at all. I already allowed edits and access to secrets to maintainers

envs: GH_REPOSITORY
script: |
git clone ${GH_REPOSITORY}
cd py-spy
python3 -m build

- name: Extracting wheel package from remote s390x instance to runner os
env:
S390X_SSH_HOST: ${{ secrets.S390X_SSH_HOST }}
S390X_SSH_KEY: ${{ secrets.S390X_SSH_KEY }}
S390X_SSH_USER: ${{secrets.S390X_SSH_USER }}
run: |
mkdir ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/id_builder_s390x
chmod 600 ~/.ssh/id_builder_s390x
echo "$S390X_SSH_KEY" > ~/.ssh/id_builder_s390x
scp -i ~/.ssh/id_builder_s390x -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r $S390X_SSH_USER@$S390X_SSH_HOST:~/py-spy .
ssh -tt -i ~/.ssh/id_builder_s390x -o "StrictHostKeyChecking no" $S390X_SSH_USER@$S390X_SSH_HOST "rm -rf ~/py-spy"

- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: py-spy/dist

build-freebsd:
runs-on: ubuntu-22.04
needs: [lint]
Expand Down
3 changes: 2 additions & 1 deletion src/python_bindings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ pub mod pyruntime {
any(
target_arch = "powerpc64",
target_arch = "powerpc",
target_arch = "mips"
target_arch = "mips",
target_arch = "s390x"
)
))]
pub fn get_tstate_current_offset(version: &Version) -> Option<usize> {
Expand Down