Skip to content

Commit

Permalink
Add dotnet support in runner image for build-selfhosted.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
shahidhs-ibm committed Mar 12, 2024
1 parent fe7b3ae commit fe21a51
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
27 changes: 27 additions & 0 deletions build-files/install-python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

PYTHON_VERSIONS="3.8.18 3.10.13 3.12.1"

for pyver in ${PYTHON_VERSIONS}
do
export PYTHON_VERSION=${pyver}
export PYTHON_MAJOR=${PYTHON_VERSION%.*.*}
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
tar -xzf Python-${PYTHON_VERSION}.tgz
cd Python-${PYTHON_VERSION}
./configure --prefix=/opt/runner/_work/_tool/Python/${PYTHON_VERSION}/ppc64le --enable-shared --enable-optimizations --enable-ipv6 LDFLAGS=-Wl,-rpath=/opt/runner/_work/_tool/Python/${PYTHON_VERSION}/ppc64le/lib,--disable-new-dtags
make -j$(nproc)
sudo make install
sudo touch /opt/runner/_work/_tool/Python/${PYTHON_VERSION}/ppc64le.complete
sudo ln -s /opt/runner/_work/_tool/Python/${PYTHON_VERSION}/ppc64le/bin/python${PYTHON_MAJOR} /opt/runner/_work/_tool/Python/${PYTHON_VERSION}/ppc64le/bin/python
cd ..
rm -rf Python-${PYTHON_VERSION} Python-${PYTHON_VERSION}.tgz
done








19 changes: 19 additions & 0 deletions build-files/install-ruby.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

sudo apt-get install -y gcc g++ make zlib1g-dev libffi-dev libtool libyaml-dev libssl-dev openjdk-11-jdk ruby

wget -O /tmp/ruby-build-v20240119.tar.gz https://github.com/rbenv/ruby-build/archive/refs/tags/v20240119.tar.gz
cd /tmp
tar -xzf ruby-build-*.tar.gz
sudo PREFIX=/usr/local ./ruby-build-*/install.sh

ruby-build --list| while IFS= read -r line; do
if [[ "$line" != *"picoruby"* ]] && [[ "$line" != *"truffleruby"* ]]; then
ruby-build $line /opt/runner/_work/_tool/Ruby/$line/ppc64
touch /opt/runner/_work/_tool/Ruby/$line/ppc64.complete
echo "Installed $line";
fi
done

rm -rf /tmp/ruby-build-v20240119.tar.gz ./ruby-build-*

0 comments on commit fe21a51

Please sign in to comment.