Skip to content

Fix errors when compiling C source files into eBPF bytecode. #231

Fix errors when compiling C source files into eBPF bytecode.

Fix errors when compiling C source files into eBPF bytecode. #231

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: CI
on:
pull_request:
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v2
with:
go-version: "1.21"
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
submodules: true
- name: Check License
uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587
- name: Get dependencies
run: make deps
- name: Test
run: make container-test
- name: BTF Generate
run: make container-btfgen
- name: Lint
run: make container-safe-lint
- name: Make binary
run: make linux
- name: Check CI Consistency
run: make check
docker:
name: Docker images
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build and save docker images
run: |
make docker
docker save -o docker-images-skywalking-rover.tar apache/skywalking-rover:latest
- name: Upload docker images
uses: actions/upload-artifact@v2
with:
name: docker-images-skywalking-rover
path: docker-images-skywalking-rover.tar
e2e-test:
name: E2E test
needs: [ docker ]
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
test:
- name: Golang On CPU Profiling
base: test/e2e/cases/profiling/task/oncpu/golang
config: e2e.yaml
docker:
file: Dockerfile.sqrt
name: test/oncpu-golang:test
- name: C++ On CPU Profiling
base: test/e2e/cases/profiling/task/oncpu/c++
config: e2e.yaml
docker:
file: Dockerfile.sqrt
name: test/oncpu-c_plus_plus:test
- name: C On CPU Profiling
base: test/e2e/cases/profiling/task/oncpu/c
config: e2e.yaml
docker:
file: Dockerfile.sqrt
name: test/oncpu-c:test
- name: Rust On CPU Profiling
base: test/e2e/cases/profiling/task/oncpu/rust
config: e2e.yaml
docker:
file: Dockerfile.sqrt
name: test/oncpu-rust:test
- name: Golang Off CPU Profiling
base: test/e2e/cases/profiling/task/offcpu/golang
config: e2e.yaml
docker:
file: Dockerfile.file
name: test/offcpu-golang:test
- name: C++ Off CPU Profiling
base: test/e2e/cases/profiling/task/offcpu/c++
config: e2e.yaml
docker:
file: Dockerfile.file
name: test/offcpu-c_plus_plus:test
- name: C Off CPU Profiling
base: test/e2e/cases/profiling/task/offcpu/c
config: e2e.yaml
docker:
file: Dockerfile.file
name: test/offcpu-c:test
- name: Rust Off CPU Profiling
base: test/e2e/cases/profiling/task/offcpu/rust
config: e2e.yaml
docker:
file: Dockerfile.file
name: test/offcpu-rust:test
- name: Istio Process Finder 1.8.2
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.8.2
- name: Istio Process Finder 1.9.1
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.9.1
- name: Istio Process Finder 1.10.3
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.10.3
- name: Istio Process Finder 1.11.4
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.11.4
- name: Istio Process Finder 1.12.0
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.12.0
- name: Istio Process Finder 1.13.1
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.13.1
- name: Access Log
base: test/e2e/cases/access_log
config: e2e.yaml
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/download-artifact@v2
name: Download docker images
with:
name: docker-images-skywalking-rover
path: docker-images
- name: Load docker images
run: find docker-images -name "*.tar" -exec docker load -i {} \;
- name: Set env var
run: echo "${{ matrix.test.env }}" >> $GITHUB_ENV
- name: Build test image
if: matrix.test.docker != null
run: docker build -t ${{ matrix.test.docker.name }} -f ${{ matrix.test.base }}/${{ matrix.test.docker.file }} ${{ matrix.test.base }}
- name: ${{ matrix.test.name }}
uses: apache/skywalking-infra-e2e@c3eb3241f649289465eda12af8214ca60aaaaa5f
with:
e2e-file: $GITHUB_WORKSPACE/${{ matrix.test.base }}/${{ matrix.test.config }}
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
name: Upload Logs
with:
name: logs
path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
network-profiling-https-e2e-test-prepare:
name: Prepare Network Profiling HTTPS E2E test
needs: [ docker ]
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup SSL Certs
run: |
mkdir -p $(pwd)/test/e2e/cases/profiling/task/network/base/ssl/
bash test/e2e/base/scripts/gen-selfsigned-ssl.sh service $(pwd)/test/e2e/cases/profiling/task/network/base/ssl/
bash test/e2e/base/scripts/gen-selfsigned-ssl.sh proxy $(pwd)/test/e2e/cases/profiling/task/network/base/ssl/
- name: Build nginx docker image
run: |
docker build -t test/test-nginx:test -f test/e2e/cases/profiling/task/network/base/Dockerfile.nginx test/e2e/cases/profiling/task/network/base/
docker save -o docker-images-nginx.tar test/test-nginx:test
- name: Upload SSL Certs
uses: actions/upload-artifact@v2
with:
name: network-ssl-data
path: test/e2e/cases/profiling/task/network/base/ssl
- name: Upload docker images
uses: actions/upload-artifact@v2
with:
name: docker-images-test-nginx
path: docker-images-nginx.tar
network-profiling-https-e2e-test:
name: Network Profiling HTTPS E2E test
needs: [ network-profiling-https-e2e-test-prepare ]
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
test:
- name: Golang Profiling
config: golang/e2e.yaml
docker:
file: golang/Dockerfile
name: test/network-golang:test
- name: Envoy Profiling
config: envoy/e2e.yaml
env: ISTIO_VERSION=1.13.1
- name: C++ Profiling
config: c_plus_plus/e2e.yaml
docker:
file: c_plus_plus/Dockerfile
name: test/network-c_plus_plus:test
- name: Nodejs Profiling
config: nodejs/e2e.yaml
docker:
file: nodejs/Dockerfile
name: test/network-nodejs:test
- name: HTTP2 Profiling
config: http2/e2e.yaml
docker:
file: http2/Dockerfile
name: test/network-http2:test
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/download-artifact@v2
name: Download rover docker image
with:
name: docker-images-skywalking-rover
path: docker-images
- uses: actions/download-artifact@v2
name: Download nginx docker image
with:
name: docker-images-test-nginx
path: docker-images
- uses: actions/download-artifact@v2
name: Download SSL Data
with:
name: network-ssl-data
path: test/e2e/cases/profiling/task/network/base/ssl/
- name: Load docker images
run: find docker-images -name "*.tar" -exec docker load -i {} \;
- name: Set env var
run: echo "${{ matrix.test.env }}" >> $GITHUB_ENV
- name: Build test image
if: matrix.test.docker != null
run: docker build -t ${{ matrix.test.docker.name }} -f test/e2e/cases/profiling/task/network/${{ matrix.test.docker.file }} test/e2e/cases/profiling/task/network
- name: Copy SSL Cert to the absolute host path and trust it
run: |
cp -r test/e2e/cases/profiling/task/network/base/ssl/ /tmp/ssl_data
bash test/e2e/base/scripts/update-signed-ssl.sh service /tmp/ssl_data
bash test/e2e/base/scripts/update-signed-ssl.sh proxy /tmp/ssl_data
- name: ${{ matrix.test.name }}
uses: apache/skywalking-infra-e2e@c3eb3241f649289465eda12af8214ca60aaaaa5f
with:
e2e-file: $GITHUB_WORKSPACE/test/e2e/cases/profiling/task/network/${{ matrix.test.config }}
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
name: Upload Logs
with:
name: logs
path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
continuous-profiling-e2e-tests:
name: Continuous Profiling E2E tests
needs: [ docker ]
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
test:
- name: HTTP Avg Response Time
config: http_avg_response_time/e2e.yaml
docker:
file: http_avg_response_time/Dockerfile
name: test/continuous-http_avg_response_time:test
- name: HTTP Error Rate
config: http_error_rate/e2e.yaml
docker:
file: http_error_rate/Dockerfile
name: test/continuous-http_error_rate:test
- name: Process CPU
config: process_cpu/e2e.yaml
docker:
file: process_cpu/Dockerfile
name: test/continuous-process_cpu:test
- name: Process Thread Count
config: process_thread_count/e2e.yaml
docker:
file: process_thread_count/Dockerfile
name: test/continuous-process_thread_count:test
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/download-artifact@v2
name: Download docker images
with:
name: docker-images-skywalking-rover
path: docker-images
- name: Load docker images
run: find docker-images -name "*.tar" -exec docker load -i {} \;
- name: Set env var
run: echo "${{ matrix.test.env }}" >> $GITHUB_ENV
- name: Setup SSL Certs
run: |
mkdir -p $(pwd)/test/e2e/cases/profiling/continuous/ssl/
mkdir -p /tmp/ssl_data
bash test/e2e/base/scripts/gen-selfsigned-ssl.sh service $(pwd)/test/e2e/cases/profiling/continuous/ssl/
cp $(pwd)/test/e2e/cases/profiling/continuous/ssl/* /tmp/ssl_data
- name: Build test image
if: matrix.test.docker != null
run: docker build -t ${{ matrix.test.docker.name }} -f test/e2e/cases/profiling/continuous/${{ matrix.test.docker.file }} test/e2e/cases/profiling/continuous
- name: ${{ matrix.test.name }}
uses: apache/skywalking-infra-e2e@c3eb3241f649289465eda12af8214ca60aaaaa5f
with:
e2e-file: $GITHUB_WORKSPACE/test/e2e/cases/profiling/continuous/${{ matrix.test.config }}
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
name: Upload Logs
with:
name: logs
path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
required:
if: always()
name: Required
needs:
- build
- e2e-test
- network-profiling-https-e2e-test
- continuous-profiling-e2e-tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Merge Requirement
run: |
if [[ ${{ needs.build.result }} != 'success' ]]; then
exit -1
fi
if [[ ${{ needs.e2e-test.result }} != 'success' ]]; then
exit -1
fi
if [[ ${{ needs.network-profiling-https-e2e-test.result }} != 'success' ]]; then
exit -1
fi
if [[ ${{ needs.continuous-profiling-e2e-tests.result }} != 'success' ]]; then
exit -1
fi