Skip to content

Commit

Permalink
github: add test actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzaQ committed Nov 24, 2022
1 parent 071c4fa commit 8fa7b60
Showing 1 changed file with 31 additions and 32 deletions.
63 changes: 31 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8fa7b60

Please sign in to comment.