Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 15 additions & 117 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,73 +15,29 @@ jobs:
- uses: actions/checkout@v2
- run: make style

test:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Linux (gcc 7, 32-bit)
os: ubuntu-18.04
CC: gcc-7
CXX: g++-7
TEST_X86: 1
- name: Linux (gcc 10)
os: ubuntu-20.04
CC: gcc-10
CXX: g++-10
# ERROR_ON_WARNINGS: 1
# The GCC analyzer 10.0.1 (as on CI) has an internal compiler error
# currently, and is not stable enough to activate.
# RUN_ANALYZER: gcc
- name: Linux (clang 10 + asan + llvm-cov)
os: ubuntu-20.04
CC: clang-10
CXX: clang++-10
ERROR_ON_WARNINGS: 1
RUN_ANALYZER: asan,llvm-cov
- name: Linux (clang 10 + kcov)
os: ubuntu-20.04
CC: clang-10
CXX: clang++-10
ERROR_ON_WARNINGS: 1
RUN_ANALYZER: kcov
- name: Linux (code-checker + valgrind)
os: ubuntu-20.04
RUN_ANALYZER: code-checker,valgrind
- name: macOS (xcode llvm)
os: macOs-latest
ERROR_ON_WARNINGS: 1
- name: macOS (clang 10 + asan + llvm-cov)
- name: macOS (xcode)
os: macOs-latest
CC: clang
CXX: clang++
ERROR_ON_WARNINGS: 1
RUN_ANALYZER: asan,llvm-cov
- name: Windows (VS2017, 32bit)
os: vs2017-win2016
TEST_X86: 1
- name: Windows (latest)
os: windows-latest
# The Android emulator is currently only available on macos, see:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator
- name: Android (API 16, NDK 19)
os: macOs-latest
ANDROID_API: 16
ANDROID_NDK: 19.2.5345600
- name: Android (API 30 NDK 21)
os: macOs-latest
ANDROID_API: 30
ANDROID_NDK: 21.3.6528147

name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}

env:
TEST_X86: ${{ matrix.TEST_X86 }}
ERROR_ON_WARNINGS: ${{ matrix.ERROR_ON_WARNINGS }}
RUN_ANALYZER: ${{ matrix.RUN_ANALYZER }}
ANDROID_API: ${{ matrix.ANDROID_API }}
ANDROID_NDK: ${{ matrix.ANDROID_NDK }}

steps:
- uses: actions/checkout@v2
Expand All @@ -93,10 +49,8 @@ jobs:
if: ${{ runner.os == 'Linux' && !env['TEST_X86'] }}
# workaround: https://github.com/actions/virtual-environments/issues/1536#issuecomment-698537248
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/focal llvm-toolchain-focal-10 main' -y
sudo apt update
sudo apt install clang-10 clang-tools llvm kcov g++-10 valgrind libcurl4-openssl-dev
sudo apt install clang-10 clang-tools g++-10 libcurl4-openssl-dev

- name: Installing Linux 32-bit Dependencies
if: ${{ runner.os == 'Linux' && env['TEST_X86'] }}
Expand All @@ -105,77 +59,21 @@ jobs:
sudo apt update
sudo apt install gcc-multilib g++-multilib zlib1g-dev:i386 libssl-dev:i386 libcurl4-openssl-dev:i386

- name: Installing CodeChecker
if: ${{ contains(env['RUN_ANALYZER'], 'code-checker') }}
run: |
sudo apt install clang-tidy curl doxygen gcc-multilib python3-dev python3-virtualenv
git clone https://github.com/Ericsson/CodeChecker.git --depth 1
cd CodeChecker
BUILD_LOGGER_64_BIT_ONLY=YES make standalone_package
echo "::add-path::$PWD/build/CodeChecker/bin"

- name: Expose llvm PATH for Mac
if: ${{ runner.os == 'macOS' }}
run: echo "::add-path::/usr/local/opt/llvm/bin/"

- name: Installing Android SDK Dependencies
if: ${{ env['ANDROID_API'] }}
run: |
export ANDROID_IMAGE="system-images;android-$ANDROID_API;google_apis;x86"
echo "Downloading ndk;$ANDROID_NDK and $ANDROID_IMAGE"
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install \
"ndk;$ANDROID_NDK" "$ANDROID_IMAGE" | \
grep -v "\[=" || true # suppress the progress bar, so we get meaningful logs

- name: Starting Android Simulator
if: ${{ env['ANDROID_API'] }}
run: bash scripts/start-android.sh

- name: Test
- name: Building w/ Breakpad
if: ${{ runner.os == 'Windows' || runner.os == 'Linux' }}
shell: bash
run: |
pip install --upgrade --requirement tests/requirements.txt
[ "${{ matrix.CC }}" ] && export CC="${{ matrix.CC }}"
[ "${{ matrix.CXX }}" ] && export CXX="${{ matrix.CXX }}"
pytest --capture=no --verbose tests

- name: "Upload to codecov.io"
if: ${{ contains(env['RUN_ANALYZER'], 'cov') }}
uses: codecov/codecov-action@v1
with:
directory: coverage
cmake --version
cmake -B build -DSENTRY_BUILD_SHARED_LIBS=OFF -DSENTRY_BACKEND=breakpad
cmake --build build --parallel --config Release
cmake --install build --prefix install --config Release

archive:
name: Create Release Archive
runs-on: ubuntu-latest
needs: [lint, test]
if: ${{ needs.test.result == 'success' && github.repository_owner == 'getsentry' }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Remove unneeded files
- name: Building w/ Crashpad
if: ${{ runner.os == 'macOS' }}
shell: bash
run: rm -rf build .c* .e* .git* scripts Makefile external/breakpad/src/tools external/breakpad/src/processor

- name: Create source archive
shell: python
run: |
import shutil
shutil.make_archive("sentry-native-source", "zip", ".")
cmake --version
cmake -B build -DSENTRY_BUILD_SHARED_LIBS=OFF -DSENTRY_BACKEND=crashpad
cmake --build build --parallel --config Release
cmake --install build --prefix install --config Release

- name: Upload source artifact
uses: actions/upload-artifact@v2
with:
name: sentry-native-source
# meh: https://github.com/actions/upload-artifact#zipped-artifact-downloads
path: sentry-native-source.zip

- name: Upload archive to zeus
run: |
npx -p "@zeus-ci/cli" zeus job update --build ${{ github.run_id }} --job ${{ github.job }} --ref ${{ github.sha }}
npx -p "@zeus-ci/cli" zeus upload --build ${{ github.run_id }} --job ${{ github.job }} --type "application/zip" --name "sentry-native.zip" "sentry-native-source.zip"
npx -p "@zeus-ci/cli" zeus job update --build ${{ github.run_id }} --job ${{ github.job }} --status passed
env:
ZEUS_HOOK_BASE: ${{ secrets.ZEUS_HOOK_BASE }}
12 changes: 12 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"scanSettings": {
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
<br />
</p>

# Time Doctor Fork of sentry-native

- This contains Git Submodules. Clone with `git clone --recurse-submodules git@github.com:mystaff/sentry-native.git`
- Make sure the latest version of CMake is installed

# Official Sentry SDK for C/C++ <!-- omit in toc -->

The _Sentry Native SDK_ is an error and crash reporting client for native
Expand All @@ -23,15 +28,16 @@ Please see [Known Limitations](#known-limitations).

## Table of Contents <!-- omit in toc -->

- [Downloads](#downloads)
- [What is Inside](#what-is-inside)
- [Platform and Feature Support](#platform-and-feature-support)
- [Building and Installation](#building-and-installation)
- [Compile-Time Options](#compile-time-options)
- [Build Targets](#build-targets)
- [Runtime Configuration](#runtime-configuration)
- [Known Limitations](#known-limitations)
- [Development](#development)
- [Time Doctor Fork of Sentry-Native](#time-doctor-fork-of-sentry-native)
- [Downloads](#downloads)
- [What is Inside](#what-is-inside)
- [Platform and Feature Support](#platform-and-feature-support)
- [Building and Installation](#building-and-installation)
- [Compile-Time Options](#compile-time-options)
- [Build Targets](#build-targets)
- [Runtime Configuration](#runtime-configuration)
- [Known Limitations](#known-limitations)
- [Development](#development)

## Downloads

Expand Down