rbbcc 0.9.1 → 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: 21812e821d8cced71e6942b17c96800e6ac9c8fcbb3f09abffea3dd755b41365
4
- data.tar.gz: 1c9d332fd7394ba8e0b4ca027335e4a02cc39ae5d3445e2103cf23b29cca6ccf
3
+ metadata.gz: 6550ee287fe7fb0e1e51112ed55345e2f7b314e9d581b8f28a166eec6f4542aa
4
+ data.tar.gz: 9c826257aa21ad3ba3862eb7324683db36f9081d02b45b61a5c189ecb24f8836
5
5
  SHA512:
6
- metadata.gz: 19b29f9942f91dc22bedd627879f967dde601a864678958f4d047b79302714ba68ab9eda5b4e260f987be7dcc5792b480bc14f92ac117af7da7a79e0092cfa44
7
- data.tar.gz: 3dd4df07f67f833b3e2157053ff0aa5a138dd65c907f40486845fe619553030711b5622f494142d7ca1fe66b0bebf31fa563e71e36ff9184bef71fc32bfb0116
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
@@ -9,19 +9,21 @@ jobs:
9
9
  test:
10
10
  strategy:
11
11
  matrix:
12
- libbcc_version: [0.17.0]
13
- ruby_version: [3.0.0]
12
+ libbcc_version: [0.29.0, 0.31.0, 0.35.0]
13
+ ruby_version: [4.0.2]
14
14
 
15
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'"
39
+ 'cd /rbbcc && git config --global --add safe.directory /rbbcc && bundle install && bundle exec rake test'"
38
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,35 +1,17 @@
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.1)
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 (19.2.12)
20
- concurrent-ruby
21
10
  coderay (1.1.3)
22
- concurrent-ruby (1.3.6)
23
- drb (2.2.3)
11
+ fiddle (1.1.8)
24
12
  io-console (0.8.2)
25
13
  method_source (1.1.0)
26
- minitest (6.0.2)
27
- drb (~> 2.0)
28
- prism (~> 1.5)
29
- mixlib-cli (2.1.8)
30
- mixlib-shellout (3.4.10)
31
- chef-utils
32
- prism (1.9.0)
14
+ minitest (5.27.0)
33
15
  pry (0.16.0)
34
16
  coderay (~> 1.1)
35
17
  method_source (~> 1.0)
@@ -37,7 +19,6 @@ GEM
37
19
  rake (13.3.1)
38
20
  reline (0.6.3)
39
21
  io-console (~> 0.5)
40
- specific_install (0.3.8)
41
22
 
42
23
  PLATFORMS
43
24
  aarch64-linux
@@ -45,14 +26,11 @@ PLATFORMS
45
26
  arm64-darwin-25
46
27
 
47
28
  DEPENDENCIES
48
- appbundler
49
29
  bundler (~> 2.0)
50
- minitest (>= 5)
30
+ minitest (~> 5)
51
31
  pry (~> 0.12)
52
32
  rake (~> 13.0)
53
33
  rbbcc!
54
- rbbcc-hello!
55
- specific_install
56
34
 
57
35
  BUNDLED WITH
58
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
@@ -25,7 +25,7 @@ module RbBCC
25
25
  end
26
26
 
27
27
  def self.system_libbcc_versions
28
- paths = ['/usr/lib', '/usr/lib64', '/usr/local/lib', '/usr/lib/x86_64-linux-gnu'].freeze
28
+ paths = ['/lib', '/usr/lib', '/usr/lib64', '/usr/local/lib', '/usr/lib/x86_64-linux-gnu', '/usr/lib/aarch64-linux-gnu'].freeze
29
29
  candidates = paths.flat_map do |path|
30
30
  Dir.glob("#{path}/libbcc.so.[0-9]*")
31
31
  end
data/lib/rbbcc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RbBCC
2
- VERSION = "0.9.1"
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,14 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbcc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uchio Kondo
8
8
  bindir: exe
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
- dependencies: []
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'
12
26
  description: BCC port for MRI. See https://github.com/iovisor/bcc
13
27
  email:
14
28
  - udzura@udzura.jp
@@ -18,6 +32,7 @@ extensions: []
18
32
  extra_rdoc_files: []
19
33
  files:
20
34
  - ".dockerignore"
35
+ - ".github/workflows/ci-image.yml"
21
36
  - ".github/workflows/ci.yml"
22
37
  - ".gitignore"
23
38
  - Dockerfile
@@ -26,6 +41,7 @@ files:
26
41
  - Gemfile
27
42
  - Gemfile.lock
28
43
  - LICENSE
44
+ - Makefile
29
45
  - README.md
30
46
  - Rakefile
31
47
  - bin/console
@@ -36,6 +52,7 @@ files:
36
52
  - ci/Dockerfile.0.16.0-3.0.0
37
53
  - ci/Dockerfile.0.17.0-2.7.2
38
54
  - ci/Dockerfile.0.17.0-3.0.0
55
+ - ci/Dockerfile.ci_base
39
56
  - docs/README.md
40
57
  - docs/answers/01-hello-world.rb
41
58
  - docs/answers/02-sys_sync.rb
@@ -106,7 +123,6 @@ files:
106
123
  - lib/rbbcc/version.rb
107
124
  - misc/rbbcc-dfm-ruby
108
125
  - rbbcc.gemspec
109
- - semaphore.sh
110
126
  homepage: https://github.com/udzura/rbbcc
111
127
  licenses:
112
128
  - Apache-2.0
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