Run unit tests in CI, some type portability fixes #4
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt-get install libsdl2-dev | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Run unit tests | |
run: ./build/Sound test | |
build-psx: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: wine | |
run: sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install wine32 libsdl2-dev | |
- name: psy-q | |
run: git clone https://github.com/sozud/psyq_sdk.git | |
- name: Build | |
run: cd psx_seq_player/build && pip3 install -r requirements.txt && python3 build.py --psyq_path ../../psyq_sdk | |
- name: Get mednafen | |
run: git clone https://github.com/sozud/mednafen-build.git | |
- name: Get bios | |
run: | | |
wget https://archive.org/download/PlayStationBIOSFilesNAEUJP/scph5500.bin | |
mkdir -p /home/runner/.mednafen/firmware/ | |
cp scph5500.bin /home/runner/.mednafen/firmware/ | |
- name: Run unit tests | |
run: xvfb-run ./mednafen-build/mednafen ./psx_seq_player/obj/psx_seq_player_test/sound.exe | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: | | |
mkdir C:\temp-sdl2 | |
powershell Invoke-WebRequest 'https://github.com/AliveTeam/SDL2_win32_dev_mirror/files/8710940/SDL2-devel-2.0.22-VC.zip' -OutFile C:\temp-sdl2\SDL2-devel-2.0.22-VC.zip | |
7z x C:\temp-sdl2\SDL2-devel-2.0.22-VC.zip -oC:\temp-sdl2 | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSDL2_DIR=C:\temp-sdl2\SDL2-2.0.22 | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} |