Skip to content

try to fix the error #159

try to fix the error

try to fix the error #159

Workflow file for this run

name: CI
on:
push:
branches:
- master
- use-common
pull_request:
workflow_dispatch:
concurrency: # Cancel stale PR builds (but not push builds)
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
snappy-cpp:
uses: status-im/nimbus-common-workflow/.github/workflows/common.yml@main
with:
test-command: |
cd tests/snappycpp
mkdir -p build
cd build
if [[ '${{ matrix.target.os }}' == 'windows' ]]; then
cmake -E env CXXFLAGS="-w" cmake .. -G "MinGW Makefiles" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin"
mingw32-make
elif echo | gcc -dM -E - | grep -q '__clang__'; then
cmake -E env CC=gcc CXX=g++ cmake -D CMAKE_CXX_FLAGS="-Wno-error=unused-variable -Wno-error=unused-parameter -Wno-error=unknown-warning-option -Wno-error=uninitialized-const-pointer" ../
make
else
cmake -E env CC=gcc CXX=g++ cmake -D CMAKE_CXX_FLAGS="-Wno-unused-variable -Wno-unused-parameter" ../
make
fi
cp libsnappy.a ../../
fuzzing-engines:
strategy:
fail-fast: false
matrix:
target:
- os: linux
- os: macos
include:
- target:
os: linux
builder: ubuntu-latest
- target:
os: macos
builder: macos-latest
name: '${{ matrix.target.os }} Fuzz'
runs-on: ${{ matrix.builder }}
steps:
- name: Install fuzzing engines (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
# libFuzzer
sudo apt-get install -y clang
# honggfuzz
nimble install -y testutils
"$(nimble path testutils | head -1)/scripts/install_honggfuzz.sh"
echo "/opt/honggfuzz/usr/local/bin" >> "$GITHUB_PATH"
# afl
sudo apt-get install -y afl++
sudo afl-system-config
- name: Install fuzzing engines (macOS)
if: runner.os == 'macOS'
run: |
brew update
# libFuzzer
brew install llvm
echo "/opt/homebrew/opt/llvm/bin" >> "$GITHUB_PATH"
# honggfuzz
nimble install -y testutils
"$(nimble path testutils | head -1)/scripts/install_honggfuzz.sh"
echo "/opt/honggfuzz/usr/local/bin" >> "$GITHUB_PATH"
# afl
brew install afl++
sudo afl-system-config
build:
needs: snappy-cpp
uses: status-im/nimbus-common-workflow/.github/workflows/common.yml@main
fuzz:
needs: [snappy-cpp, fuzzing-engines]
# strategy:
# fail-fast: false
# matrix:
# target:
# - os: linux
# - os: macos
# include:
# - target:
# os: linux
# builder: ubuntu-latest
# - target:
# os: macos
# builder: macos-latest
# name: '${{ matrix.target.os }} Fuzz'
# runs-on: ${{ matrix.builder }}
uses: status-im/nimbus-common-workflow/.github/workflows/common.yml@main
with:
test-command: |
nimble fuzz