rbbcc 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cd5d45a97213b496575bcc8bd01fdda9077598efa59ef841aa7724b15189418
4
- data.tar.gz: 9abd5b2278de91c67daa9d90e8ae85e8ce662b2213474633120cd12fb7c36ffc
3
+ metadata.gz: 6550ee287fe7fb0e1e51112ed55345e2f7b314e9d581b8f28a166eec6f4542aa
4
+ data.tar.gz: 9c826257aa21ad3ba3862eb7324683db36f9081d02b45b61a5c189ecb24f8836
5
5
  SHA512:
6
- metadata.gz: 8479707a606688b8f4ff57b854127cf383764bd0fe2bbfefbfcd51bea4108ef799f768a6f4b1e551c283a6315a3ff22d76cfc58e23d874187895fb76bb0d1e58
7
- data.tar.gz: 630c85668e1112f4957441f403d84128514eab1c157cd7d54d6c773c40cf63e22f4a7ad73c1dc2576ca02df1de75f9bf06a2393376b77b3c785baa3290c6688d
6
+ metadata.gz: 50cb035a4d0db91343599437ef2183b9a60eb138ee156ee406f2dd505e9725f8289f7ebdc6c6e04a07264d3eb6095a7a1c8b09a6b509840e6af03b767c38179d
7
+ data.tar.gz: bc64019b6a2aa9d3be9c255e9f49c15f6313984e504b910306eff4ad7c410d478b5b106d24dd6ae489848c23e7ae274537d8b38fd59773e0a2f14518e601610f
@@ -0,0 +1,69 @@
1
+ name: Build and Push CI Image
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ bcc_version:
7
+ description: 'BCC Version (e.g., 0.35.0)'
8
+ required: true
9
+ default: '0.35.0'
10
+ ruby_version:
11
+ description: 'Ruby Version (e.g., 4.0.2)'
12
+ required: true
13
+ default: '4.0.2'
14
+ push_image:
15
+ description: 'Push image to registry?'
16
+ type: boolean
17
+ default: true
18
+
19
+ jobs:
20
+ build:
21
+ runs-on: ubuntu-latest
22
+
23
+ permissions:
24
+ contents: read
25
+ packages: write
26
+
27
+ steps:
28
+ - name: Check user permission
29
+ uses: actions-cool/check-user-permission@v2
30
+ with:
31
+ require: 'write'
32
+
33
+ - name: Checkout repository
34
+ uses: actions/checkout@v4
35
+ - name: Set up Docker Buildx
36
+ uses: docker/setup-buildx-action@v3
37
+
38
+ - name: Login to GitHub Container Registry
39
+ uses: docker/login-action@v3
40
+ with:
41
+ registry: ghcr.io
42
+ username: ${{ github.actor }}
43
+ password: ${{ secrets.DOCKERHUB_WRITE_TOKEN }}
44
+
45
+ - name: Build
46
+ run: |
47
+ docker buildx build \
48
+ --platform linux/amd64 \
49
+ --build-arg BCC_VERSION=${{ inputs.bcc_version }} \
50
+ --build-arg RUBY_VERSION=${{ inputs.ruby_version }} \
51
+ -t ghcr.io/udzura/rbbcc-ci-images:libbcc-${{ inputs.bcc_version }}-ruby-${{ inputs.ruby_version }} \
52
+ --file Dockerfile.ci \
53
+ --load .
54
+
55
+ - name: Push
56
+ if: ${{ inputs.push_image }}
57
+ run: |
58
+ docker push \
59
+ ghcr.io/udzura/rbbcc-ci-images:libbcc-${{ inputs.bcc_version }}-ruby-${{ inputs.ruby_version }}
60
+
61
+ - name: Build Summary
62
+ run: |
63
+ echo "### Build Completed 🚀" >> $GITHUB_STEP_SUMMARY
64
+ echo "- **BCC Version**: ${{ inputs.bcc_version }}" >> $GITHUB_STEP_SUMMARY
65
+ echo "- **Ruby Version**: ${{ inputs.ruby_version }}" >> $GITHUB_STEP_SUMMARY
66
+ echo "- **Pushed**: ${{ inputs.push_image }}" >> $GITHUB_STEP_SUMMARY
67
+ if [ "${{ inputs.push_image }}" = "true" ]; then
68
+ echo "- **Image URL**: \`ghcr.io/udzura/rbbcc-ci-images:libbcc-${{ inputs.bcc_version }}-ruby-${{ inputs.ruby_version }}\`" >> $GITHUB_STEP_SUMMARY
69
+ fi
@@ -1,27 +1,29 @@
1
1
  name: Tests
2
2
  on:
3
3
  push:
4
- branches: [ default ]
4
+ branches: [ master ]
5
5
  pull_request:
6
- branches: [ default ]
6
+ branches: [ master ]
7
7
 
8
8
  jobs:
9
9
  test:
10
10
  strategy:
11
11
  matrix:
12
- libbcc_version: [0.17.0, 0.16.0, 0.12.0]
13
- ruby_version: [2.7.2, 3.0.0]
12
+ libbcc_version: [0.29.0, 0.31.0, 0.35.0]
13
+ ruby_version: [4.0.2]
14
14
 
15
- runs-on: ubuntu-18.04
15
+ runs-on: ubuntu-latest
16
16
  steps:
17
17
  - uses: actions/checkout@v2
18
18
  - name: Login to ghcr.io
19
19
  run: |
20
- echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u udzura --password-stdin
20
+ echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u udzura --password-stdin
21
21
  - name: Build docker container with all deps
22
22
  run: |
23
23
  docker build -t rbbcc-ci-${{ matrix.libbcc_version }}-${{ matrix.ruby_version }} \
24
- -f ci/Dockerfile.${{ matrix.libbcc_version }}-${{ matrix.ruby_version }} ci/
24
+ --build-arg BCC_VERSION=${{ matrix.libbcc_version }} \
25
+ --build-arg RUBY_VERSION=${{ matrix.ruby_version }} \
26
+ -f ci/Dockerfile.ci_base ci/
25
27
  - name: Run test
26
28
  run: |
27
29
  /bin/bash -c \
@@ -34,5 +36,5 @@ jobs:
34
36
  -v /usr/include/linux:/usr/include/linux:ro \
35
37
  rbbcc-ci-${{ matrix.libbcc_version }}-${{ matrix.ruby_version }} \
36
38
  /bin/bash -c \
37
- 'cd /rbbcc && bundle install && bundle exec rake test'"
38
-
39
+ 'cd /rbbcc && git config --global --add safe.directory /rbbcc && bundle install && bundle exec rake test'"
40
+
data/Dockerfile.ci CHANGED
@@ -1,98 +1,100 @@
1
- # ref: https://github.com/iovisor/bcc/blob/master/Dockerfile.tests
2
- FROM ubuntu:18.04
1
+ # ref: https://github.com/iovisor/bcc/blob/master/docker/build/Dockerfile.ubuntu
2
+ FROM ubuntu:24.04
3
3
 
4
- ENV LLVM_VERSION="9"
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
5
 
6
- ARG BCC_VERSION="0.16.0"
6
+ ENV LLVM_VERSION="18"
7
+
8
+ ARG BCC_VERSION="0.29.0"
7
9
  ENV BCC_VERSION=$BCC_VERSION
8
10
 
9
- ARG RUBY_VERSION="2.7.2"
11
+ ARG RUBY_VERSION="4.0.2"
10
12
  ENV RUBY_VERSION=$RUBY_VERSION
11
13
 
12
- ARG RUBY_VERSION_ARCHIVE="ruby-${RUBY_VERSION}.tar.bz2"
13
- ENV RUBY_VERSION_ARCHIVE=$RUBY_VERSION_ARCHIVE
14
-
15
14
  ARG RUBY_EXTRA_OPTS=""
16
15
  ENV RUBY_EXTRA_OPTS=$RUBY_EXTRA_OPTS
17
16
 
18
17
  ARG BCC_EXTRA_OPTS=""
19
18
  ENV BCC_EXTRA_OPTS=$BCC_EXTRA_OPTS
20
19
 
21
- RUN apt-get update && apt-get install -y curl gnupg && \
22
- llvmRepository="\n\
23
- deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\n\
24
- deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\n\
25
- deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${LLVM_VERSION} main\n\
26
- deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${LLVM_VERSION} main\n" && \
27
- echo $llvmRepository >> /etc/apt/sources.list && \
28
- curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
29
- apt-get update && apt-get install -y \
30
- util-linux \
31
- bison \
32
- binutils-dev \
33
- cmake \
34
- flex \
35
- g++ \
36
- git \
37
- kmod \
38
- wget \
39
- libelf-dev \
40
- zlib1g-dev \
41
- libiberty-dev \
42
- libbfd-dev \
43
- libedit-dev \
44
- clang-${LLVM_VERSION} \
45
- libclang-${LLVM_VERSION}-dev \
46
- libclang-common-${LLVM_VERSION}-dev \
47
- libclang1-${LLVM_VERSION} \
48
- llvm-${LLVM_VERSION} \
49
- llvm-${LLVM_VERSION}-dev \
50
- llvm-${LLVM_VERSION}-runtime \
51
- libllvm${LLVM_VERSION} \
52
- systemtap-sdt-dev \
53
- sudo \
54
- iproute2 \
55
- iputils-ping \
56
- bridge-utils \
57
- libtinfo5 \
58
- libtinfo-dev && \
59
- wget -O ruby-install-0.7.1.tar.gz \
60
- https://github.com/postmodern/ruby-install/archive/v0.7.1.tar.gz && \
61
- tar -xzvf ruby-install-0.7.1.tar.gz && \
62
- cd ruby-install-0.7.1/ && \
63
- make install && \
64
- sed -i 's/^ruby_archive=.*/ruby_archive="${ruby_archive:-ruby-$ruby_version.tar.bz2}"/' /usr/local/share/ruby-install/ruby/functions.sh && \
65
- env ruby_archive=$RUBY_VERSION_ARCHIVE ruby-install --system $RUBY_EXTRA_OPTS ruby $RUBY_VERSION && \
66
- git config --global user.name 'udzura' && \
67
- git config --global user.email 'udzura@udzura.jp' && \
68
- wget -O bcc-$BCC_VERSION.tar.gz \
69
- https://github.com/iovisor/bcc/releases/download/v$BCC_VERSION/bcc-src-with-submodule.tar.gz && \
70
- tar -xzvf bcc-$BCC_VERSION.tar.gz && \
71
- cd bcc/ && \
72
- ( test "$BCC_VERSION" = "0.12.0" && curl https://github.com/iovisor/bcc/commit/977a7e3a568c4c929fabeb4a025528d9b6f1e84c.patch | patch -p1 || true ) && \
73
- git init . && git add . && git commit -m 'Dummy' && git tag v$BCC_VERSION && \
74
- mkdir build && cd build/ && \
75
- cmake $BCC_EXTRA_OPTS -DCMAKE_BUILD_TYPE=Release .. && \
76
- cd src/cc && \
77
- make -j8 && make install && \
78
- cd ../.. && \
79
- apt-get remove --purge -y \
80
- binutils-dev \
81
- libelf-dev \
82
- zlib1g-dev \
83
- libiberty-dev \
84
- libbfd-dev \
85
- libedit-dev \
86
- clang-${LLVM_VERSION} \
87
- libclang-${LLVM_VERSION}-dev \
88
- libclang-common-${LLVM_VERSION}-dev \
89
- libclang1-${LLVM_VERSION} \
90
- llvm-${LLVM_VERSION} \
91
- llvm-${LLVM_VERSION}-dev \
92
- llvm-${LLVM_VERSION}-runtime \
93
- libllvm${LLVM_VERSION} \
94
- systemtap-sdt-dev \
95
- libtinfo-dev && \
96
- apt autoremove -y && \
97
- apt-get clean -y && \
98
- rm -rf *.tar.gz bcc/
20
+ RUN apt-get update && apt-get install -y \
21
+ curl \
22
+ gnupg \
23
+ util-linux \
24
+ bison \
25
+ cmake \
26
+ flex \
27
+ g++ \
28
+ make \
29
+ git \
30
+ kmod \
31
+ wget \
32
+ sudo \
33
+ iproute2 \
34
+ iputils-ping \
35
+ bridge-utils \
36
+ libncurses-dev \
37
+ libssl-dev \
38
+ libreadline-dev \
39
+ zlib1g-dev \
40
+ libyaml-dev \
41
+ libffi-dev \
42
+ libdebuginfod1 \
43
+ libelf1 \
44
+ liblzma5 \
45
+ binutils-dev \
46
+ libelf-dev \
47
+ libiberty-dev \
48
+ libbfd-dev \
49
+ libedit-dev \
50
+ libfl-dev \
51
+ liblzma-dev \
52
+ libdebuginfod-dev \
53
+ python3 \
54
+ python3-setuptools \
55
+ clang-${LLVM_VERSION} \
56
+ libclang-${LLVM_VERSION}-dev \
57
+ libclang-common-${LLVM_VERSION}-dev \
58
+ libclang1-${LLVM_VERSION} \
59
+ llvm-${LLVM_VERSION} \
60
+ llvm-${LLVM_VERSION}-dev \
61
+ llvm-${LLVM_VERSION}-runtime \
62
+ libllvm${LLVM_VERSION} \
63
+ libpolly-${LLVM_VERSION}-dev \
64
+ systemtap-sdt-dev
65
+
66
+ RUN wget -O ruby-install-0.9.3.tar.gz https://github.com/postmodern/ruby-install/archive/v0.9.3.tar.gz && \
67
+ tar -xzvf ruby-install-0.9.3.tar.gz && \
68
+ cd ruby-install-0.9.3/ && make install && \
69
+ ruby-install --system ruby $RUBY_VERSION && \
70
+ cd / && rm -rf ruby-install-0.9.3*
71
+
72
+ RUN git config --global user.name 'udzura' && git config --global user.email 'udzura@udzura.jp' && \
73
+ wget -O bcc-$BCC_VERSION.tar.gz https://github.com/iovisor/bcc/releases/download/v$BCC_VERSION/bcc-src-with-submodule.tar.gz && \
74
+ tar -xzvf bcc-$BCC_VERSION.tar.gz && \
75
+ cd bcc/ && \
76
+ git config --global --add safe.directory /bcc && \
77
+ git init . && git add . && git commit -m 'Dummy' && git tag v$BCC_VERSION && \
78
+ mkdir build && cd build/ && \
79
+ cmake -DCMAKE_BUILD_TYPE=Release .. && \
80
+ cd src/cc && make -j$(nproc) && make install && \
81
+ cd / && rm -rf bcc/ bcc-$BCC_VERSION.tar.gz
82
+
83
+ RUN apt-get remove --purge -y \
84
+ binutils-dev \
85
+ libiberty-dev \
86
+ libbfd-dev \
87
+ libedit-dev \
88
+ libfl-dev \
89
+ liblzma-dev \
90
+ libdebuginfod-dev \
91
+ clang-${LLVM_VERSION} \
92
+ libclang-${LLVM_VERSION}-dev \
93
+ libclang-common-${LLVM_VERSION}-dev \
94
+ llvm-${LLVM_VERSION}-dev \
95
+ libllvm${LLVM_VERSION} \
96
+ libpolly-${LLVM_VERSION}-dev \
97
+ systemtap-sdt-dev && \
98
+ apt autoremove -y && \
99
+ apt-get clean -y && \
100
+ rm -rf /var/lib/apt/lists/*
data/Gemfile CHANGED
@@ -6,13 +6,13 @@ gemspec
6
6
  gem "bundler", "~> 2.0"
7
7
  gem "rake", "~> 13.0"
8
8
  gem "pry", "~> 0.12"
9
- gem "minitest", ">= 5"
9
+ gem "minitest", "~> 5"
10
10
 
11
- group :omnibus_package do
12
- gem "appbundler"
13
- gem "specific_install"
14
- end
11
+ #group :omnibus_package do
12
+ # gem "appbundler"
13
+ # gem "specific_install"
14
+ #end
15
15
 
16
- group :plugin_dev do
17
- gem "rbbcc-hello", git: "https://github.com/udzura/rbbcc-hello.git"
18
- end
16
+ #group :plugin_dev do
17
+ # gem "rbbcc-hello", git: "https://github.com/udzura/rbbcc-hello.git"
18
+ #end
data/Gemfile.lock CHANGED
@@ -1,49 +1,36 @@
1
- GIT
2
- remote: https://github.com/udzura/rbbcc-hello.git
3
- revision: 2e1af47d22e7cc92e970dc6c058e113cf00821db
4
- specs:
5
- rbbcc-hello (0.1.0)
6
- rbbcc
7
-
8
1
  PATH
9
2
  remote: .
10
3
  specs:
11
- rbbcc (0.9.0)
4
+ rbbcc (0.10.0)
5
+ fiddle
12
6
 
13
7
  GEM
14
8
  remote: https://rubygems.org/
15
9
  specs:
16
- appbundler (0.13.4)
17
- mixlib-cli (>= 1.4, < 3.0)
18
- mixlib-shellout (>= 2.0, < 4.0)
19
- chef-utils (17.10.0)
20
- concurrent-ruby
21
10
  coderay (1.1.3)
22
- concurrent-ruby (1.1.10)
23
- method_source (1.0.0)
24
- minitest (5.16.1)
25
- mixlib-cli (2.1.8)
26
- mixlib-shellout (3.2.7)
27
- chef-utils
28
- pry (0.14.1)
11
+ fiddle (1.1.8)
12
+ io-console (0.8.2)
13
+ method_source (1.1.0)
14
+ minitest (5.27.0)
15
+ pry (0.16.0)
29
16
  coderay (~> 1.1)
30
17
  method_source (~> 1.0)
31
- rake (13.0.6)
32
- specific_install (0.3.7)
18
+ reline (>= 0.6.0)
19
+ rake (13.3.1)
20
+ reline (0.6.3)
21
+ io-console (~> 0.5)
33
22
 
34
23
  PLATFORMS
35
24
  aarch64-linux
36
25
  arm64-darwin-21
26
+ arm64-darwin-25
37
27
 
38
28
  DEPENDENCIES
39
- appbundler
40
29
  bundler (~> 2.0)
41
- minitest (>= 5)
30
+ minitest (~> 5)
42
31
  pry (~> 0.12)
43
32
  rake (~> 13.0)
44
33
  rbbcc!
45
- rbbcc-hello!
46
- specific_install
47
34
 
48
35
  BUNDLED WITH
49
36
  2.3.16
data/Makefile ADDED
@@ -0,0 +1,15 @@
1
+ ci-base-all:
2
+ @docker buildx build --platform linux/amd64/v3 -t ghcr.io/udzura/rbbcc-ci-images:libbcc-0.29.0-ruby-4.0.2 --file Dockerfile.ci --load .
3
+ @docker buildx build --platform linux/amd64/v3 --build-arg RUBY_VERSION=3.4.9 -t ghcr.io/udzura/rbbcc-ci-images:libbcc-0.29.0-ruby-3.4.9 --file Dockerfile.ci --load .
4
+ @docker buildx build --platform linux/amd64/v3 --build-arg BCC_VERSION=0.31.0 -t ghcr.io/udzura/rbbcc-ci-images:libbcc-0.31.0-ruby-4.0.2 --file Dockerfile.ci --load .
5
+ @docker buildx build --platform linux/amd64/v3 --build-arg BCC_VERSION=0.31.0 --build-arg RUBY_VERSION=3.4.9 -t ghcr.io/udzura/rbbcc-ci-images:libbcc-0.31.0-ruby-3.4.9 --file Dockerfile.ci --load .
6
+ @docker buildx build --platform linux/amd64/v3 --build-arg BCC_VERSION=0.35.0 -t ghcr.io/udzura/rbbcc-ci-images:libbcc-0.35.0-ruby-4.0.2 --file Dockerfile.ci --load .
7
+ @docker buildx build --platform linux/amd64/v3 --build-arg BCC_VERSION=0.35.0 --build-arg RUBY_VERSION=3.4.9 -t ghcr.io/udzura/rbbcc-ci-images:libbcc-0.35.0-ruby-3.4.9 --file Dockerfile.ci --load .
8
+
9
+ push-base-all:
10
+ @docker push ghcr.io/udzura/rbbcc-ci-images:libbcc-0.29.0-ruby-4.0.2
11
+ @docker push ghcr.io/udzura/rbbcc-ci-images:libbcc-0.29.0-ruby-3.4.9
12
+ @docker push ghcr.io/udzura/rbbcc-ci-images:libbcc-0.31.0-ruby-4.0.2
13
+ @docker push ghcr.io/udzura/rbbcc-ci-images:libbcc-0.31.0-ruby-3.4.9
14
+ @docker push ghcr.io/udzura/rbbcc-ci-images:libbcc-0.35.0-ruby-4.0.2
15
+ @docker push ghcr.io/udzura/rbbcc-ci-images:libbcc-0.35.0-ruby-3.4.9
@@ -0,0 +1,4 @@
1
+ ARG BCC_VERSION="0.29.0"
2
+ ARG RUBY_VERSION="4.0.2"
3
+
4
+ FROM ghcr.io/udzura/rbbcc-ci-images:libbcc-${BCC_VERSION}-ruby-${RUBY_VERSION}
data/lib/rbbcc/clib.rb CHANGED
@@ -24,13 +24,27 @@ module RbBCC
24
24
  @@libbcc_version >= Gem::Version.new(ver)
25
25
  end
26
26
 
27
- extend Fiddle::Importer
28
- targets = %w(0.29.1 0.26.0 0.22.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0)
29
- if default_load = ENV['LIBBCC_VERSION']
30
- targets.unshift(default_load)
31
- targets.uniq!
27
+ def self.system_libbcc_versions
28
+ paths = ['/lib', '/usr/lib', '/usr/lib64', '/usr/local/lib', '/usr/lib/x86_64-linux-gnu', '/usr/lib/aarch64-linux-gnu'].freeze
29
+ candidates = paths.flat_map do |path|
30
+ Dir.glob("#{path}/libbcc.so.[0-9]*")
31
+ end
32
+
33
+ candidates.map do |path|
34
+ path.match(/libbcc\.so\.([\d.]+)/)&.captures&.first
35
+ end.compact.uniq.sort_by { |v| Gem::Version.new(v) }.reverse
36
+ rescue
37
+ []
32
38
  end
33
39
 
40
+ extend Fiddle::Importer
41
+
42
+ targets = if (env_ver = ENV['LIBBCC_VERSION'])
43
+ [env_ver]
44
+ else
45
+ self.system_libbcc_versions
46
+ end
47
+ raise LoadError, "no target libbcc to load" if targets.empty?
34
48
  targets.each do |to_load|
35
49
  begin
36
50
  dlload "libbcc.so.#{to_load}"
data/lib/rbbcc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RbBCC
2
- VERSION = "0.9.0"
2
+ VERSION = "0.10.0"
3
3
  end
data/rbbcc.gemspec CHANGED
@@ -21,4 +21,6 @@ Gem::Specification.new do |spec|
21
21
  spec.bindir = "exe"
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
+
25
+ spec.add_dependency "fiddle"
24
26
  end
metadata CHANGED
@@ -1,15 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbcc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uchio Kondo
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-07-10 00:00:00.000000000 Z
12
- dependencies: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: fiddle
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
13
26
  description: BCC port for MRI. See https://github.com/iovisor/bcc
14
27
  email:
15
28
  - udzura@udzura.jp
@@ -19,6 +32,7 @@ extensions: []
19
32
  extra_rdoc_files: []
20
33
  files:
21
34
  - ".dockerignore"
35
+ - ".github/workflows/ci-image.yml"
22
36
  - ".github/workflows/ci.yml"
23
37
  - ".gitignore"
24
38
  - Dockerfile
@@ -27,6 +41,7 @@ files:
27
41
  - Gemfile
28
42
  - Gemfile.lock
29
43
  - LICENSE
44
+ - Makefile
30
45
  - README.md
31
46
  - Rakefile
32
47
  - bin/console
@@ -37,6 +52,7 @@ files:
37
52
  - ci/Dockerfile.0.16.0-3.0.0
38
53
  - ci/Dockerfile.0.17.0-2.7.2
39
54
  - ci/Dockerfile.0.17.0-3.0.0
55
+ - ci/Dockerfile.ci_base
40
56
  - docs/README.md
41
57
  - docs/answers/01-hello-world.rb
42
58
  - docs/answers/02-sys_sync.rb
@@ -107,12 +123,10 @@ files:
107
123
  - lib/rbbcc/version.rb
108
124
  - misc/rbbcc-dfm-ruby
109
125
  - rbbcc.gemspec
110
- - semaphore.sh
111
126
  homepage: https://github.com/udzura/rbbcc
112
127
  licenses:
113
128
  - Apache-2.0
114
129
  metadata: {}
115
- post_install_message:
116
130
  rdoc_options: []
117
131
  require_paths:
118
132
  - lib
@@ -127,8 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
141
  - !ruby/object:Gem::Version
128
142
  version: '0'
129
143
  requirements: []
130
- rubygems_version: 3.4.0.dev
131
- signing_key:
144
+ rubygems_version: 4.0.6
132
145
  specification_version: 4
133
146
  summary: BCC port for MRI
134
147
  test_files: []
data/semaphore.sh DELETED
@@ -1,73 +0,0 @@
1
- #!/bin/bash
2
-
3
- # packages
4
-
5
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4052245BD4284CDD
6
- echo "deb https://repo.iovisor.org/apt/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/iovisor.list
7
- sudo apt -y update
8
- sudo apt -y install libbcc
9
-
10
- # build libbcc 0.11/0.12
11
- ORIG_DIR=$(pwd)
12
- sudo mkdir -p /opt/bcc
13
-
14
- cd /
15
- sudo chown $(whoami) /opt/bcc
16
- cache has_key libbcc-so && cache restore libbcc-so
17
- sudo chown -R root /opt/bcc
18
- cd -
19
-
20
- if test "$(ls /opt/bcc | wc -l)" -le "0"; then
21
- sudo apt -y install bison build-essential cmake flex git libedit-dev \
22
- libllvm6.0 llvm-6.0-dev libclang-6.0-dev python zlib1g-dev libelf-dev
23
-
24
- sudo mkdir -p /opt/bcc-work
25
- sudo chown $(whoami) /opt/bcc-work
26
- cd /opt/bcc-work
27
- git clone https://github.com/iovisor/bcc.git
28
- mkdir bcc/build
29
- cd bcc
30
-
31
- git checkout v0.11.0
32
- git submodule init
33
- git submodule sync
34
- git submodule update
35
- cd build
36
- cmake .. -DCMAKE_INSTALL_PREFIX=/opt/bcc
37
- make -j$(nproc)
38
- sudo make install
39
- make clean
40
- cd ..
41
-
42
- V0_12_HASH=2d099cd8c5cb1598d6e911c0b389132ebc7c101b
43
- git checkout $V0_12_HASH
44
- git submodule init
45
- git submodule sync
46
- git submodule update
47
- cd build
48
- cmake .. -DCMAKE_INSTALL_PREFIX=/opt/bcc
49
- make -j$(nproc)
50
- sudo make install
51
-
52
- cd /
53
- cache has_key libbcc-so && cache clear libbcc-so
54
- cache store libbcc-so opt/bcc
55
- cd -
56
- fi
57
- cd $ORIG_DIR
58
-
59
- # link all tha objects under /lib from /opt/bcc
60
- sudo ln -sf /opt/bcc/lib/libbcc.so.0.11.0 /opt/bcc/lib/libbcc.so.0.12.0 /usr/lib/x86_64-linux-gnu/
61
-
62
- # Doing tests
63
- set -e
64
-
65
- bundle install --path vendor/bundle
66
-
67
- bundle exec ruby -e "require 'rbbcc'; puts 'Using rbbcc: %s && libbcc: %s' % [RbBCC::VERSION, RbBCC::Clib.libbcc_version.to_s]"
68
- if test "$(bundle exec ruby -e 'require %q(rbbcc); print RbBCC::Clib.libbcc_version.to_s')" != "${LIBBCC_VERSION}"; then
69
- echo "Test target mismatch"
70
- exit 127
71
- fi
72
-
73
- sudo -E env PATH=$PATH bundle exec rake test