Update README.md #9
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: compile | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
ubuntu_build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies(Ubuntu) | |
run: | | |
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" -y | |
sudo apt-get install libsdl2-dev -y | |
sudo apt-get install gcc cmake -y | |
- name: Build & Install(Ubuntu) | |
run: | | |
sudo mkdir cmake-build-release | |
cd cmake-build-release | |
sudo cmake -DCMAKE_BUILD_TYPE=Release .. | |
sudo cmake --install . | |
- name: Build all examples(Ubuntu) | |
run: | | |
cd cmake-build-release | |
sudo cmake -DCMAKE_BUILD_TYPE=Release .. | |
sudo cmake --build . | |
windows_build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies(Windows) | |
shell: powershell | |
run: | | |
vcpkg install sdl2:x64-windows | |
vcpkg integrate install | |
- name: Build & Install(Windows) | |
shell: powershell | |
run: | | |
mkdir cmake-build-release | |
cd cmake-build-release | |
cmake -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake | |
cmake --install . | |
- name: Build all examples(Windows) | |
shell: powershell | |
run: | | |
cd cmake-build-release | |
cmake -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake | |
cmake --build . | |
macos_build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies(MacOS) | |
run: | | |
brew install cmake sdl2 | |
- name: Build & Install(MacOS) | |
run: | | |
sudo mkdir cmake-build-release | |
cd cmake-build-release | |
sudo cmake -DCMAKE_BUILD_TYPE=Release .. | |
sudo cmake --install . | |
- name: Build all examples(MacOS) | |
run: | | |
cd cmake-build-release | |
sudo cmake -DCMAKE_BUILD_TYPE=Release .. | |
sudo cmake --build . |