diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b74c603..be93796c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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/ssh-action@v0.1.10 + 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] diff --git a/src/python_bindings/mod.rs b/src/python_bindings/mod.rs index 420e3c9a..6f257cc6 100644 --- a/src/python_bindings/mod.rs +++ b/src/python_bindings/mod.rs @@ -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 {