fix test suite crashing on windows #234
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake | |
on: | |
push: | |
branches: [ master, asar_2_beta ] | |
pull_request: | |
branches: [ master, asar_2_beta ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
strategy: | |
matrix: | |
config: ['windows-msvc-2019'] | |
os: ['windows-2019'] | |
generator: ['-G "Visual Studio 16 2019"'] | |
toolset: ['-T v142'] | |
include: | |
- config: ubuntu-20 | |
os: ubuntu-20.04 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configure CMake | |
run: cmake -S ${{github.workspace}}/src -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.generator }} ${{ matrix.toolset }} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Create Test Directory | |
working-directory: ${{github.workspace}}/build | |
# Create temp directory that tests will use | |
run: mkdir temp | |
# Windows MSVC tests | |
- name: App Test | |
# Run app test | |
run: ${{github.workspace}}/build/asar-tests/${{env.BUILD_TYPE}}/asar-app-test.exe ${{github.workspace}}/build/asar/bin/${{env.BUILD_TYPE}}/asar.exe "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp | |
if: ${{ contains(matrix.config, 'msvc') }} | |
- name: DLL Test | |
# Run app test | |
run: ${{github.workspace}}/build/asar-tests/${{env.BUILD_TYPE}}/asar-dll-test.exe ${{github.workspace}}/build/asar/lib/${{env.BUILD_TYPE}}/asar.dll "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp | |
if: ${{ contains(matrix.config, 'msvc') }} | |
# Tests for other platforms | |
- name: App Test | |
# Run app test | |
run: ${{github.workspace}}/build/asar-tests/asar-app-test ${{github.workspace}}/build/asar/bin/asar "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp | |
if: ${{ !contains(matrix.config, 'msvc') }} | |
- name: DLL Test | |
# Run app test | |
run: ${{github.workspace}}/build/asar-tests/asar-dll-test ${{github.workspace}}/build/asar/lib/libasar.so "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp | |
if: ${{ !contains(matrix.config, 'msvc') }} | |