Skip to content

feat: build the latest .0 release of the SDK. Our current latest buil… #12

feat: build the latest .0 release of the SDK. Our current latest buil…

feat: build the latest .0 release of the SDK. Our current latest buil… #12

Workflow file for this run

---
name: CI
env:
# The version of sentry-native that should get built
# This will need to match the tags used in the getsentry/sentry-native repo
# For example this version will use source from getsenttry/sentry-native tag "0.12.0"
sentry_native_version: "0.12.0"
on:
pull_request:
branches: [main]
paths-ignore:
- '**/*.md'
push:
tags:
- v*
paths-ignore:
- '**/*.md'
jobs:
build:
name: "Build ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
steps:
- id: config
run: |
artefact_name="sentry-native-${{ env.sentry_native_version }}-${{ matrix.os }}.tar.gz"
echo "artefact_name=$artefact_name" >> $GITHUB_OUTPUT
- name: Install dependencies
run: |
# Actions runners include some awful PPAs!
ls /etc/apt/sources.list.d/
sudo sudo add-apt-repository --remove ppa:ondrej/php
sudo apt-get purge -y libicu-dev
sudo apt-get update
sudo apt-get install -y \
libcurl4-openssl-dev \
cmake
- name: Download sentry-native version
run: |
mkdir -p sentry-native
cd sentry-native
curl -L -O https://github.com/getsentry/sentry-native/releases/download/${{ env.sentry_native_version }}/sentry-native.zip
unzip sentry-native.zip
- name: Build
run: |
mkdir -p sentry-native/build
cd sentry-native
cmake -B build -DSENTRY_BUILD_TESTS=OFF -DSENTRY_BUILD_EXAMPLES=OFF
cmake --build build --parallel
cmake --install build --prefix ${{ github.workspace }}/opt/sentry-native
- name: Archive
working-directory: ${{ github.workspace }}/opt
run: tar cJfv "${{ steps.config.outputs.artefact_name }}" sentry-native
- name: Upload
uses: actions/upload-artifact@v4
with:
name: "${{ steps.config.outputs.artefact_name }}"
path: "${{ github.workspace }}/opt/${{ steps.config.outputs.artefact_name }}"
release:
if: contains(github.ref, 'tags/v')
name: Create Release
runs-on: ubuntu-latest
needs:
- build
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
upload:
if: contains(github.ref, 'tags/v')
name: "Upload ${{ matrix.os }} to release"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
needs: release
steps:
- name: Download artifact
uses: actions/download-artifact@v4
env:
artefact_name: sentry-native-${{ env.sentry_native_version }}-${{ matrix.os }}.tar.gz
with:
name: "${{ env.artefact_name }}"
path: ./
- name: Upload to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
artefact_name: sentry-native-${{ env.sentry_native_version }}-${{ matrix.os }}.tar.gz
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: "./${{ env.artefact_name }}"
asset_name: "${{ env.artefact_name }}"
asset_content_type: application/x-gtar