Skip to content

Commit

Permalink
Merge pull request #15 from calyptia/bump-up-using-cmetrics-v0.5.9
Browse files Browse the repository at this point in the history
Bump up using cmetrics to v0.5.9
  • Loading branch information
cosmo0920 committed Mar 27, 2023
2 parents 4bad327 + b529a2b commit 79ccff6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,12 @@ jobs:
matrix:
label:
- Debian GNU/Linux Bullseye amd64
- Debian GNU/Linux Buster amd64
- Ubuntu Bionic amd64
- Ubuntu Focal amd64
- Ubuntu Jammy amd64
include:
- label: Debian GNU/Linux Bullseye amd64
test-docker-image: debian:bullseye
test-script: ci/apt-test.sh
- label: Debian GNU/Linux Buster amd64
test-docker-image: debian:buster
test-script: ci/apt-test.sh
- label: Ubuntu Bionic amd64
test-docker-image: ubuntu:bionic
test-script: ci/apt-test.sh
- label: Ubuntu Focal amd64
test-docker-image: ubuntu:focal
test-script: ci/apt-test.sh
Expand All @@ -32,7 +24,7 @@ jobs:
test-script: ci/apt-test.sh
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: rake compile & rake test
run: |
docker run \
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/yum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
label:
- CentOS 7 x86_64
- RockyLinux OS 8 x86_64
- Fedora 34 x86_64
- RockyLinux OS 9 x86_64
- Fedora 37 x86_64
- AmazonLinux 2 x86_64
include:
- label: CentOS 7 x86_64
Expand All @@ -20,15 +21,18 @@ jobs:
- label: RockyLinux OS 8 x86_64
test-docker-image: rockylinux:8
test-script: ci/yum-test.sh
- label: Fedora 34 x86_64
- label: RockyLinux OS 9 x86_64
test-docker-image: rockylinux:9
test-script: ci/yum-test.sh
- label: Fedora 37 x86_64
test-docker-image: fedora:34
test-script: ci/yum-test.sh
- label: AmazonLinux 2 x86_64
test-docker-image: amazonlinux:2
test-script: ci/yum-test.sh
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: rake compile & rake test
run: |
docker run \
Expand Down
18 changes: 14 additions & 4 deletions ci/yum-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ distribution=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o
version=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f4)
USE_SCL=0
USE_AMZN_EXT=0
USE_DNF_MODULE=0

case ${distribution} in
amazon)
Expand All @@ -25,24 +26,26 @@ case ${distribution} in
DNF=yum
USE_SCL=1
;;
*)
8)
DNF="dnf --enablerepo=powertools"
USE_SCL=1
;;
esac
;;
rocky)
case ${version} in
8)
DNF="dnf --enablerepo=powertools"
USE_DNF_MODULE=1
;;
*)
DNF="dnf --enablerepo=powertools"
9)
DNF="dnf --enablerepo=crb"
;;
esac
;;
fedoraproject)
case ${version} in
33|34)
33|34|35|36|37)
DNF=yum
;;
esac
Expand All @@ -60,6 +63,13 @@ if [ $USE_SCL -eq 1 ]; then
rh-ruby26-rubygem-rake \
rpm-build \
cmake3
elif [ $USE_DNF_MODULE -eq 1 ]; then
dnf update -y && \
dnf module install -y ruby:3.0 && \
dnf install -y ruby-devel \
rubygems \
rpm-build \
cmake
elif [ $USE_AMZN_EXT -eq 1 ]; then
yum update -y && \
yum install -y yum-utils && \
Expand Down
4 changes: 2 additions & 2 deletions ext/cmetrics/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def initialize(version=nil, fluent_otel_version= "0.9.0", cfl_version= "0.2.0",
@recipe.target = File.join(ROOT, "ports")
@recipe.files << {
url: "https://codeload.github.com/fluent/cmetrics/tar.gz/v#{version}",
sha256sum: "e576e2cb6a7784a8094b0a050d918d48ca913740d4c1bfee3d8645a7bfe8b2bd",
sha256sum: "d099dd037dea04585ccf2f8ebe817ff5fcaf8b6ef6394c220f8100c78fc4ee86",
}

@otel_proto_recipe = MiniPortileCMake.new("fluent-otel-proto", @fluent_otel_version, **kwargs)
Expand Down Expand Up @@ -141,7 +141,7 @@ def activate
end
end

cmetrics = BuildCMetrics.new("0.5.8", cmake_command: determine_preferred_command("cmake3", "cmake"))
cmetrics = BuildCMetrics.new("0.5.9", cmake_command: determine_preferred_command("cmake3", "cmake"))
cmetrics.build

libdir = RbConfig::CONFIG["libdir"]
Expand Down

0 comments on commit 79ccff6

Please sign in to comment.