Skip to content
Draft
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
54 changes: 49 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
- name: CMake
run: |
mkdir cbuild
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -G Ninja
cmake --build cbuild/

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Crashpad distribution ZIP
run: |
ruby backtrace/save_artifacts.rb --output Crashpad_Linux_build.zip

- uses: actions/upload-artifact@v3
with:
name: Crashpad_Linux_build_${{ github.sha }}
Expand Down Expand Up @@ -85,6 +85,50 @@ jobs:
run: |
bundle exec ruby ./test.rb -v

- name: Crashpad distribution ZIP
run: |
ruby backtrace/save_artifacts.rb --output Crashpad_Windows_build.zip

- uses: actions/upload-artifact@v3
with:
name: Crashpad_Windows_build_${{ github.sha }}
path: Crashpad_Windows_build.zip

build-windows-ninja:
# Because we want to use Visual Studio 16 2019, we need to use the windows-2019 GitHub runner
runs-on: windows-2019
steps:
# Install latest CMake.
- uses: lukka/get-cmake@latest

- uses: actions/checkout@v2
with:
submodules: recursive

# Ensure we load the correct environment and compiler is available in $PATH
- uses: ilammy/msvc-dev-cmd@v1

- name: CMake
run: |
# make a build directory (note: build is already used by Crashpad)
mkdir cbuild

# run CMake (additional options like -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE are possible)
# it is recommended to specify the compiler version used for the build
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -G Ninja
cmake --build cbuild/

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
working-directory: ./backtrace/test
bundler-cache: true

- name: Run tests
working-directory: ./backtrace/test
run: |
bundle exec ruby ./test.rb -v

- name: Crashpad distribution ZIP
run: |
ruby backtrace/save_artifacts.rb --output Crashpad_Windows_build.zip
Expand Down Expand Up @@ -113,7 +157,7 @@ jobs:
- name: CMake
run: |
mkdir cbuild
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -G Ninja
cmake --build cbuild/

- uses: ruby/setup-ruby@v1
Expand Down Expand Up @@ -180,7 +224,7 @@ jobs:
- name: CMake
run: |
mkdir cbuild
cmake -S . -B cbuild/ -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk/${{ matrix.ndk }}/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.abi }} -DANDROID_PLATFORM=android-${{ matrix.apiLevel }} -DANDROID_NATIVE_API_LEVEL=${{ matrix.apiLevel }} -DANDROID_TOOLCHAIN=clang -DANDROID_SSL_MODE=${{ env.SSL_MODE }} -DBUILD_EXAMPLES=TRUE
cmake -S . -B cbuild/ -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk/${{ matrix.ndk }}/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.abi }} -DANDROID_PLATFORM=android-${{ matrix.apiLevel }} -DANDROID_NATIVE_API_LEVEL=${{ matrix.apiLevel }} -DANDROID_TOOLCHAIN=clang -DANDROID_SSL_MODE=${{ env.SSL_MODE }} -DBUILD_EXAMPLES=TRUE -G Ninja
cmake --build cbuild/

- name: Crashpad distribution ZIP
Expand Down
7 changes: 6 additions & 1 deletion backtrace/test/test_windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class TestLinux < Minitest::Test
def test_crashpad_uploads
result = Crashpad::perform_test executable: 'examples/windows/demo/Debug/demo_windows.exe'
if (File.file?('examples/windows/demo/Debug/demo_windows.exe'))
tests_path = 'examples/windows/demo/Debug/demo_windows.exe'
else
tests_path = 'examples/windows/demo/demo_windows.exe'
end
result = Crashpad::perform_test executable: tests_path
assert result
assert result.has_key? :upload

Expand Down
1 change: 1 addition & 0 deletions compat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ endif (WIN32)

add_library(compat_incl INTERFACE)
add_library(compat OBJECT)
set_target_properties(compat PROPERTIES LINKER_LANGUAGE CXX)

target_sources(compat PRIVATE ${CRASHPAD_COMPAT_LIBRARY_FILES})
target_link_libraries(compat PUBLIC util compat_incl)
Expand Down