From 8fa7b60a28e39f6f706890fd43b9c820ec85cfe9 Mon Sep 17 00:00:00 2001 From: krzaq Date: Fri, 18 Nov 2022 01:34:43 +0100 Subject: [PATCH] github: add test actions. --- .github/workflows/main.yml | 63 +++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 72e39fbc..01accb76 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,14 +33,17 @@ jobs: cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE cmake --build cbuild/ -# - name: Tar files to preserve file permissions -# run: tar -cvzf Archive_Crashpad_Linux_build.tar.gz cbuild/ -# -# - uses: actions/upload-artifact@v3 -# with: -# name: Archive_Crashpad_Linux_build_${{ github.sha }} -# path: Archive_Crashpad_Linux_build.tar.gz - + - 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_Linux_build.zip @@ -71,17 +74,16 @@ jobs: cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -G "Visual Studio 16 2019" cmake --build cbuild/ - #- name: Tar files to preserve file permissions - # run: tar -cvzf Archive_Crashpad_Windows_build_${{ github.sha }}.tar.gz cbuild/ - -# - uses: actions/upload-artifact@v3 -# with: -# name: Archive_Crashpad_Windows_build_${{ github.sha }} -# path: cbuild/ - - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.0' + 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: | @@ -114,13 +116,18 @@ jobs: cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} cmake --build cbuild/ -# - name: Tar files to preserve file permissions -# run: tar -cvzf Archive_Crashpad_MacOs_build_${{ matrix.arch }}.tar.gz cbuild/ - -# - uses: actions/upload-artifact@v3 -# with: -# name: Archive_Crashpad_MacOs_build_${{ matrix.arch }}_${{ github.sha }} -# path: Archive_Crashpad_MacOs_build_${{ matrix.arch }}.tar.gz + - uses: ruby/setup-ruby@v1 + with: + working-directory: ./backtrace/test + ruby-version: '3.1' + bundler-cache: true + + - name: Run tests + working-directory: ./backtrace/test + # temporary: running arm64 binaries on arm64 results in "Bad CPU type in executable" ¯\_(ツ)_/¯ + if: ${{ matrix.arch != 'arm64' }} + run: | + bundle exec ruby ./test.rb -v - name: Crashpad distribution ZIP run: | @@ -169,14 +176,6 @@ jobs: 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 -DBUILD_EXAMPLES=TRUE cmake --build cbuild/ -# - name: Tar files to preserve file permissions -# run: tar -cvzf Archive_Crashpad_Android_ndk${{ matrix.ndk }}_apiLevel${{ matrix.apiLevel }}_${{ matrix.abi }}_build.tar.gz cbuild/ - -# - uses: actions/upload-artifact@v3 -# with: -# name: Archive_Crashpad_Android_ndk${{ matrix.ndk }}_apiLevel${{ matrix.apiLevel }}_${{ matrix.abi }}_build_${{ github.sha }} -# path: Archive_Crashpad_Android_ndk${{ matrix.ndk }}_apiLevel${{ matrix.apiLevel }}_${{ matrix.abi }}_build.tar.gz - - name: Crashpad distribution ZIP run: | ruby backtrace/save_artifacts.rb --output Crashpad_Android_ndk${{ matrix.ndk }}_apiLevel${{ matrix.apiLevel }}_${{ matrix.abi }}_build.zip