feat: handle SDL_QUIT event to exit the application gracefully #276
This file contains hidden or 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: C/C++ CI | |
| on: [push] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: install_dependencies | |
| shell: bash | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" | |
| sudo apt-get update -y -qq | |
| sudo apt-get update && sudo apt-get install xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libsdl2-dev | |
| fi | |
| if [ "$RUNNER_OS" == "macOS" ]; then | |
| brew install SDL2 | |
| brew install SDL2_image | |
| fi | |
| if [ "$RUNNER_OS" == "Windows" ]; then | |
| curl -L -O https://www.libsdl.org/release/SDL2-devel-2.28.4-VC.zip | |
| 7z x SDL2-devel-2.28.4-VC.zip -oSDL2 | |
| fi | |
| - name: build | |
| shell: bash | |
| run: | | |
| if [ "$RUNNER_OS" == "Windows" ]; then | |
| export SDL2_DIR=D:\\a\\gbemu\\gbemu\\SDL2\\SDL2-2.28.4\\cmake | |
| fi | |
| mkdir build | |
| cd build | |
| cmake .. | |
| cmake --build . -j8 |