From fe21a51c2449eb149af3312dfdc44cf184651ec8 Mon Sep 17 00:00:00 2001 From: Shahid Shaikh Date: Mon, 4 Mar 2024 15:39:00 -0500 Subject: [PATCH] Add dotnet support in runner image for build-selfhosted.sh --- build-files/install-python.sh | 27 +++++++++++++++++++++++++++ build-files/install-ruby.sh | 19 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 build-files/install-python.sh create mode 100644 build-files/install-ruby.sh diff --git a/build-files/install-python.sh b/build-files/install-python.sh new file mode 100644 index 0000000..86fc93e --- /dev/null +++ b/build-files/install-python.sh @@ -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 + + + + + + + + diff --git a/build-files/install-ruby.sh b/build-files/install-ruby.sh new file mode 100644 index 0000000..0615e49 --- /dev/null +++ b/build-files/install-ruby.sh @@ -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-* +