Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
nsavoire committed Jun 12, 2024
1 parent 00ba997 commit 8cc066d
Showing 1 changed file with 121 additions and 121 deletions.
242 changes: 121 additions & 121 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,134 +8,134 @@ on:
workflow_call:

jobs:
# lint:
# name: Lint
# runs-on: ubuntu-22.04
# strategy:
# fail-fast: true
# max-parallel: 2
# matrix:
# go: ["stable"]
# steps:
# - name: Install dependencies
# run: sudo apt-get install -y llvm clang dwz cmake curl unzip
# - name: Install Zydis
# shell: bash
# run: |
# cd /tmp
# git clone --depth 1 --branch v3.1.0 --recursive https://github.com/zyantific/zydis.git
# cd zydis
# rm -rf build
# mkdir build
# cd build
# cmake -DZYDIS_BUILD_EXAMPLES=OFF ..
# make -j$(nproc)
# sudo make install
# cd zycore
# sudo make install
# - name: Check out
# uses: actions/checkout@v4
# - name: Set up Go ${{matrix.go}}
# uses: actions/setup-go@v5
# with:
# go-version: ${{matrix.go}}
# check-latest: true
# cache-dependency-path: |
# go.sum
# id: go
# - name: Install gRPC dependencies
# env:
# PB_URL: "https://github.com/protocolbuffers/protobuf/releases/download/v24.4/"
# PB_FILE: "protoc-24.4-linux-x86_64.zip"
# INSTALL_DIR: "/usr/local"
# run: |
# go install google.golang.org/protobuf/cmd/[email protected]
# go install google.golang.org/grpc/cmd/[email protected]
# curl -LO "$PB_URL/$PB_FILE"
# sudo unzip "$PB_FILE" -d "$INSTALL_DIR" 'bin/*' 'include/*'
# sudo chmod +xr "$INSTALL_DIR/bin/protoc"
# sudo find "$INSTALL_DIR/include" -type d -exec chmod +x {} \;
# sudo find "$INSTALL_DIR/include" -type f -exec chmod +r {} \;
# rm "$PB_FILE"
# - name: Linter
# run: |
# go version
# curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2
# make lint
lint:
name: Lint
runs-on: ubuntu-22.04
strategy:
fail-fast: true
max-parallel: 2
matrix:
go: ["stable"]
steps:
- name: Install dependencies
run: sudo apt-get install -y llvm clang dwz cmake curl unzip
- name: Install Zydis
shell: bash
run: |
cd /tmp
git clone --depth 1 --branch v3.1.0 --recursive https://github.com/zyantific/zydis.git
cd zydis
rm -rf build
mkdir build
cd build
cmake -DZYDIS_BUILD_EXAMPLES=OFF ..
make -j$(nproc)
sudo make install
cd zycore
sudo make install
- name: Check out
uses: actions/checkout@v4
- name: Set up Go ${{matrix.go}}
uses: actions/setup-go@v5
with:
go-version: ${{matrix.go}}
check-latest: true
cache-dependency-path: |
go.sum
id: go
- name: Install gRPC dependencies
env:
PB_URL: "https://github.com/protocolbuffers/protobuf/releases/download/v24.4/"
PB_FILE: "protoc-24.4-linux-x86_64.zip"
INSTALL_DIR: "/usr/local"
run: |
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
curl -LO "$PB_URL/$PB_FILE"
sudo unzip "$PB_FILE" -d "$INSTALL_DIR" 'bin/*' 'include/*'
sudo chmod +xr "$INSTALL_DIR/bin/protoc"
sudo find "$INSTALL_DIR/include" -type d -exec chmod +x {} \;
sudo find "$INSTALL_DIR/include" -type f -exec chmod +r {} \;
rm "$PB_FILE"
- name: Linter
run: |
go version
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2
make lint
# test:
# name: Test
# strategy:
# fail-fast: true
# max-parallel: 2
# matrix:
# go: ["stable"]
# os: ["arm-4core-linux", "ubuntu-22.04"]
# runs-on: ${{ matrix.os }}
# steps:
# - name: Install dependencies
# run: sudo apt-get update && sudo apt-get install -y --no-install-recommends gcc make llvm clang dwz cmake curl unzip
# - name: Install Zydis
# shell: bash
# run: |
# cd /tmp
# git clone --depth 1 --branch v3.1.0 --recursive https://github.com/zyantific/zydis.git
# cd zydis
# rm -rf build
# mkdir build
# cd build
# cmake -DZYDIS_BUILD_EXAMPLES=OFF ..
# make -j$(nproc)
# sudo make install
# cd zycore
# sudo make install
# - name: Set up Go ${{matrix.go}}
# uses: actions/setup-go@v5
# with:
# go-version: ${{matrix.go}}
# check-latest: true
# cache-dependency-path: |
# go.sum
# id: go
# - name: Install gRPC dependencies
# env:
# PB_URL: "https://github.com/protocolbuffers/protobuf/releases/download/v24.4/"
# PB_FILE: "protoc-24.4-linux-%arch%.zip"
# INSTALL_DIR: "/usr/local"
# run: |
# go install google.golang.org/protobuf/cmd/[email protected]
# go install google.golang.org/grpc/cmd/[email protected]
# ARCH=$(uname -m | sed 's/aarch64/aarch_64/')
# PB_FILE=$(echo $PB_FILE | sed "s/%arch%/$ARCH/g")
# curl -LO "$PB_URL/$PB_FILE"
# sudo unzip "$PB_FILE" -d "$INSTALL_DIR" 'bin/*' 'include/*'
# sudo chmod +xr "$INSTALL_DIR/bin/protoc"
# sudo find "$INSTALL_DIR/include" -type d -exec chmod +x {} \;
# sudo find "$INSTALL_DIR/include" -type f -exec chmod +r {} \;
# rm "$PB_FILE"
# - name: Check out
# uses: actions/checkout@v4
# - name: Build
# run: |
# echo $PATH
# make
# - name: Tests
# # Tests fail on arm
# if: matrix.os != 'arm-4core-linux'
# run: |
# make test
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: agent-${{ matrix.os == 'arm-4core-linux' && 'aarch64' || 'x86_64' }}
# path: otel-profiling-agent
test:
name: Test
strategy:
fail-fast: true
max-parallel: 2
matrix:
go: ["stable"]
os: ["arm-4core-linux", "ubuntu-22.04"]
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends gcc make llvm clang dwz cmake curl unzip
- name: Install Zydis
shell: bash
run: |
cd /tmp
git clone --depth 1 --branch v3.1.0 --recursive https://github.com/zyantific/zydis.git
cd zydis
rm -rf build
mkdir build
cd build
cmake -DZYDIS_BUILD_EXAMPLES=OFF ..
make -j$(nproc)
sudo make install
cd zycore
sudo make install
- name: Set up Go ${{matrix.go}}
uses: actions/setup-go@v5
with:
go-version: ${{matrix.go}}
check-latest: true
cache-dependency-path: |
go.sum
id: go
- name: Install gRPC dependencies
env:
PB_URL: "https://github.com/protocolbuffers/protobuf/releases/download/v24.4/"
PB_FILE: "protoc-24.4-linux-%arch%.zip"
INSTALL_DIR: "/usr/local"
run: |
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
ARCH=$(uname -m | sed 's/aarch64/aarch_64/')
PB_FILE=$(echo $PB_FILE | sed "s/%arch%/$ARCH/g")
curl -LO "$PB_URL/$PB_FILE"
sudo unzip "$PB_FILE" -d "$INSTALL_DIR" 'bin/*' 'include/*'
sudo chmod +xr "$INSTALL_DIR/bin/protoc"
sudo find "$INSTALL_DIR/include" -type d -exec chmod +x {} \;
sudo find "$INSTALL_DIR/include" -type f -exec chmod +r {} \;
rm "$PB_FILE"
- name: Check out
uses: actions/checkout@v4
- name: Build
run: |
echo $PATH
make
- name: Tests
# Tests fail on arm
if: matrix.os != 'arm-4core-linux'
run: |
make test
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: agent-${{ matrix.os == 'arm-4core-linux' && 'aarch64' || 'x86_64' }}
path: otel-profiling-agent

publish:
env:
RELEASE_VERSION: dev
if: ${{ github.event_name == 'push' }}
name: Publish pre-release
# needs: [test, lint]
needs: [test, lint]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
Expand Down

0 comments on commit 8cc066d

Please sign in to comment.