Update compile_test.yml #18
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: C++ Compile Test | |
on: | |
push: | |
branches: [ "main" ] | |
paths: [ ".github/workflows/compile_test.yml", "main.cpp", "config.cpp" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
compile_app: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev libvlc-dev | |
- name: Compile | |
run: g++ main.cpp -std=c++17 -I/usr/include/SDL2 -D_REENTRANT -lSDL2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lvlc -o ASAPCabinetFE | |
- name: Check Compilation | |
run: | | |
if [ -f ASAPCabinetFE ]; then | |
echo "Compilation successful!" | |
else | |
echo "Compilation failed!" | |
exit 1 | |
fi | |
compile_config: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential git libsdl2-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libfreetype6-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev | |
git clone https://github.com/ocornut/imgui.git | |
- name: Compile | |
run: g++ config.cpp -std=c++17 imgui/*.cpp imgui/backends/imgui_impl_sdl2.cpp imgui/backends/imgui_impl_opengl3.cpp -std=c++17 -I/usr/include/SDL2 -D_REENTRANT -Iimgui -Iimgui/backends -lSDL2 -lGL -o config | |
- name: Check Compilation | |
run: | | |
if [ -f config ]; then | |
echo "Compilation successful!" | |
else | |
echo "Compilation failed!" | |
exit 1 | |
fi |