@@ -120,42 +120,44 @@ jobs:
120120 build-linux-s390x :
121121 runs-on : ubuntu-latest
122122 needs : [lint]
123+ strategy :
124+ fail-fast : false
125+ matrix :
126+ platform : ['s390x']
123127 steps :
124- - uses : actions/checkout@v2
125- - uses : uraimo/run-on-arch-action@v2
126- - uses : actions-rust-lang/setup-rust-toolchain@v1
127- name : Install dependencies and build py-spy
128- id : build-s390x-py-spy
129- with :
130- arch : s390x
131- distro : ubuntu_latest
132- env :
133- CARGO_TERM_COLOR : always
128+ - name : Building package on ${{ matrix.platform }}
129+ uses : appleboy/ssh-action@v0.1.10
130+ env :
131+ GH_REPOSITORY : ${{ github.server_url }}/${{ github.repository }}
132+ with :
133+ host : ${{secrets.S390X_SSH_HOST}}
134+ username : ${{secrets.S390X_SSH_USER }}
135+ key : ${{secrets.S390X_SSH_KEY}}
136+ envs : GH_REPOSITORY
137+ script : |
138+ git clone ${GH_REPOSITORY}
139+ cd py-spy
140+ python3 -m build
134141
135- # Create an artifacts directory
136- setup : |
137- mkdir -p "${PWD}/artifacts"
138-
139- # Mount the artifacts directory as /artifacts in the container
140- dockerRunArgs : |
141- --volume "${PWD}/artifacts:/artifacts"
142+ - name : Extracting wheel package from remote s390x instance to runner os
143+ env :
144+ S390X_SSH_HOST : ${{ secrets.S390X_SSH_HOST }}
145+ S390X_SSH_KEY : ${{ secrets.S390X_SSH_KEY }}
146+ S390X_SSH_USER : ${{secrets.S390X_SSH_USER }}
147+ run : |
148+ mkdir ~/.ssh
149+ chmod 700 ~/.ssh
150+ touch ~/.ssh/id_builder_s390x
151+ chmod 600 ~/.ssh/id_builder_s390x
152+ echo "$S390X_SSH_KEY" > ~/.ssh/id_builder_s390x
153+ scp -i ~/.ssh/id_builder_s390x -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r $S390X_SSH_USER@$S390X_SSH_HOST:~/py-spy .
154+ ssh -tt -i ~/.ssh/id_builder_s390x -o "StrictHostKeyChecking no" $S390X_SSH_USER@$S390X_SSH_HOST "rm -rf ~/py-spy"
142155
143- run : |
144- apt-get update -y
145- apt-get install -y build-essential libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev wget curl git
146- apt-get install python3.9 python3-pip python3-dev libpython3.9-dev -y
147- apt-get install cargo -y
148- echo rustc --version
149-
150- #Building py-spy
151- python3.9 -m build
152- echo pwd
153- WHEEL_PATH=$(find dist/ -name "py_spy-0.3.14-py3-none-linux_s390x*.whl")
154- WHEEL_NAME=$(basename $(find dist/ -name "py_spy-0.3.14-py3-none-linux_s390x*.whl"))
155- echo $WHEEL_PATH
156- echo $WHEEL_NAME
157- cp $WHEEL_PATH /artifacts/$WHEEL_NAME
158- ls /artifacts/
156+ - name : Upload wheels
157+ uses : actions/upload-artifact@v3
158+ with :
159+ name : wheels
160+ path : py-spy/dist
159161
160162 build-freebsd :
161163 runs-on : ubuntu-22.04
0 commit comments