Skip to content

Commit

Permalink
Merge pull request #40 from solarwindscloud/NH-46935
Browse files Browse the repository at this point in the history
NH-46935: update amazlinux and ubuntu for verify_install
  • Loading branch information
xuan-cao-swi authored Jul 19, 2023
2 parents 2183bd8 + 0d922fb commit 8bd6e67
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/scripts/verify_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,35 @@
# All rights reserved.

# setup the system
pretty_name=$(grep PRETTY_NAME /etc/os-release | sed 's/PRETTY_NAME="//' | sed 's/"//')
if [ -r /etc/alpine-release ]; then
apk update && apk add --upgrade ruby-dev g++ make
elif [ -r /etc/debian_version ]; then
# this is for ubuntu (> 22.04) and debian
apt-get update && apt-get install -y ruby-dev g++ make
elif [ "$pretty_name" = "Amazon Linux 2" ]; then
amazon-linux-extras install epel -y
yum update && yum install -y ruby-devel gcc-c++ make tar openssl-devel git
git clone https://github.com/rbenv/rbenv.git ~/.rbenv \
&& git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build \
&& git clone https://github.com/rbenv/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems \
&& echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile \
&& echo 'eval "$(rbenv init -)"' >> ~/.profile \
&& echo 'eval "$(rbenv init -)"' >> ~/.bashrc \
&& echo 'bundler' > ~/.rbenv/default-gems
. ~/.profile && rbenv install 3.1.0
rbenv local 3.1.0
elif [ "$pretty_name" = "Amazon Linux 2023" ]; then
yum update && yum install -y ruby-devel gcc-c++ make tar openssl-devel git zlib-devel
git clone https://github.com/rbenv/rbenv.git ~/.rbenv \
&& git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build \
&& git clone https://github.com/rbenv/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems \
&& echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile \
&& echo 'eval "$(rbenv init -)"' >> ~/.profile \
&& echo 'eval "$(rbenv init -)"' >> ~/.bashrc \
&& echo 'bundler' > ~/.rbenv/default-gems
. ~/.profile && rbenv install 3.1.0
rbenv local 3.1.0
fi

# install gem
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/verify_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
ruby:3.0.6-slim-bullseye
ruby:3.2.2-alpine3.17
ruby:3.2.2-slim-bullseye
amazonlinux:2
amazonlinux:2023
ubuntu:22.04
github-token: ${{ secrets.CI_GITHUB_TOKEN }}
runner-user: github
runner-directory: /gh
Expand All @@ -68,6 +71,9 @@ jobs:
- rb3.0.6-slim-bullseye
- rb3.2.2-alpine3.17
- rb3.2.2-slim-bullseye
- rb3.1.0-amazlinux2
- rb3.1.0-amazlinux2023
- rb3.0.2-ubuntu2204
arch:
- x64
- arm64
Expand All @@ -80,6 +86,12 @@ jobs:
image: ruby:3.2.2-alpine3.17
- hostname: rb3.2.2-slim-bullseye
image: ruby:3.2.2-slim-bullseye
- hostname: rb3.1.0-amazlinux2
image: amazonlinux:2
- hostname: rb3.1.0-amazlinux2023
image: amazonlinux:2023
- hostname: rb3.0.2-ubuntu2204
image: ubuntu:22.04
exclude:
- hostname: rb3.0.6-alpine3.16
arch: arm64
Expand All @@ -92,8 +104,9 @@ jobs:
image: "${{ matrix.image }}"
options: --hostname "${{ matrix.hostname }}"
steps:
- if: ${{ startsWith(matrix.image, 'amazonlinux') }}
run: yum install -y tar gzip
- uses: actions/checkout@v3

- name: Verify install
working-directory: .github/workflows/scripts
run: ./verify_install.sh
Expand Down
2 changes: 1 addition & 1 deletion test/run_otel_tests/.ruby_version_ubuntu
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.5
3.1.0

0 comments on commit 8bd6e67

Please sign in to comment.