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 60233b6 commit 41ab586
Showing 1 changed file with 35 additions and 33 deletions.
68 changes: 35 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,42 +120,44 @@ jobs:
build-linux-s390x:
runs-on: ubuntu-latest
needs: [lint]
strategy:
fail-fast: false
matrix:
platform: ['s390x']
steps:
- uses: actions/checkout@v2
- uses: uraimo/run-on-arch-action@v2
- uses: actions-rust-lang/setup-rust-toolchain@v1
name: Install dependencies and build py-spy
id: build-s390x-py-spy
with:
arch: s390x
distro: ubuntu_latest
env:
CARGO_TERM_COLOR: always
- 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
# Create an artifacts directory
setup: |
mkdir -p "${PWD}/artifacts"
# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
- 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"
run: |
apt-get update -y
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
apt-get install python3.9 python3-pip python3-dev libpython3.9-dev -y
apt-get install cargo -y
echo rustc --version
#Building py-spy
python3.9 -m build
echo pwd
WHEEL_PATH=$(find dist/ -name "py_spy-0.3.14-py3-none-linux_s390x*.whl")
WHEEL_NAME=$(basename $(find dist/ -name "py_spy-0.3.14-py3-none-linux_s390x*.whl"))
echo $WHEEL_PATH
echo $WHEEL_NAME
cp $WHEEL_PATH /artifacts/$WHEEL_NAME
ls /artifacts/
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: py-spy/dist

build-freebsd:
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 41ab586

Please sign in to comment.