Skip to content

feat: Sentry native crash backend #3

feat: Sentry native crash backend

feat: Sentry native crash backend #3

Workflow file for this run

name: E2E Integration Tests
on:
push:
branches:
- master
- "release/**"
pull_request:
concurrency:
group: e2e-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e-test:
name: E2E Test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
cmake_generator: "Unix Makefiles"
- os: windows-latest
cmake_generator: "Visual Studio 17 2022"
- os: macos-latest
cmake_generator: "Unix Makefiles"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y cmake libcurl4-openssl-dev
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install test dependencies
run: pip install -r tests/requirements.txt
- name: Configure CMake
run: cmake -B build -DSENTRY_BACKEND=native -DSENTRY_BUILD_EXAMPLES=ON
- name: Build
run: cmake --build build --target sentry_example --parallel
- name: Generate dSYM (macOS)
if: runner.os == 'macOS'
run: |
dsymutil build/sentry_example -o build/sentry_example.dSYM
dsymutil build/libsentry.dylib -o build/libsentry.dylib.dSYM
- name: Install sentry-cli (Unix)
if: runner.os != 'Windows'
run: curl -sL https://sentry.io/get-cli/ | bash
- name: Install sentry-cli (Windows)
if: runner.os == 'Windows'
run: |
Invoke-WebRequest -Uri "https://release-registry.services.sentry.io/apps/sentry-cli/latest?response=download&arch=x86_64&platform=Windows&package=zip" -OutFile sentry-cli.zip
Expand-Archive sentry-cli.zip -DestinationPath .
echo "$PWD" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh
- name: Upload debug symbols to Sentry
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_E2E_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_E2E_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_E2E_PROJECT }}
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
sentry-cli debug-files upload build/sentry_example.dSYM build/libsentry.dylib.dSYM
elif [ "$RUNNER_OS" == "Linux" ]; then
sentry-cli debug-files upload build/sentry_example build/libsentry.so
fi
shell: bash
if: runner.os != 'Windows'
- name: Upload debug symbols to Sentry (Windows)
if: runner.os == 'Windows'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_E2E_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_E2E_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_E2E_PROJECT }}
run: |
sentry-cli debug-files upload build/Release/sentry_example.pdb build/Release/sentry.pdb
shell: pwsh
- name: Add hosts entry (Linux/macOS)
if: runner.os != 'Windows'
run: sudo sh -c 'echo "127.0.0.1 sentry.native.test" >> /etc/hosts'
- name: Add hosts entry (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: Add-Content C:\Windows\System32\drivers\etc\hosts "127.0.0.1 sentry.native.test"
- name: Run E2E tests
env:
SENTRY_E2E_DSN: ${{ secrets.SENTRY_E2E_DSN }}
SENTRY_E2E_AUTH_TOKEN: ${{ secrets.SENTRY_E2E_AUTH_TOKEN }}
SENTRY_E2E_ORG: ${{ secrets.SENTRY_E2E_ORG }}
SENTRY_E2E_PROJECT: ${{ secrets.SENTRY_E2E_PROJECT }}
run: pytest --capture=no --verbose tests/test_e2e_sentry.py