Skip to content

Commit

Permalink
Updated build.yml and mod.rs for s390x
Browse files Browse the repository at this point in the history
  • Loading branch information
Satyam Gupta authored and Satyam Gupta committed May 20, 2024
1 parent 8dd5492 commit 7837564
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
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}}
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

0 comments on commit 7837564

Please sign in to comment.