diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ddd3b18 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,69 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +defaults: + run: + shell: cmd + +env: + MSYS2_SHELL: "C:\\msys64\\usr\\bin\\bash.exe" + MSYSTEM: "MINGW64" + CHERE_INVOKING: "true" + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: windows-2019 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: "Install Environment" + run: | + %MSYS2_SHELL% -lc "pacman -Syu --noconfirm" + %MSYS2_SHELL% -lc "pacman -Syu --noconfirm" + %MSYS2_SHELL% -lc "pacman -S unzip mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake --noconfirm" + %MSYS2_SHELL% -lc "mkdir /c/build-lib" + + # Runs a single command using the runners shell + - name: "Install GLFW" + run: | + cd C:\\build-lib + %MSYS2_SHELL% -lc "curl -OL \"https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.bin.WIN64.zip\"" + %MSYS2_SHELL% -lc "unzip glfw-3.2.1.bin.WIN64.zip -d /c/build-lib/" + + - name: "Install SDL2" + run: | + %MSYS2_SHELL% -lc "cd /c/build-lib && curl -OL \"http://www.libsdl.org/release/SDL2-devel-2.0.8-mingw.tar.gz\"" + %MSYS2_SHELL% -lc "cd /c/build-lib && tar -xvf \"SDL2-devel-2.0.8-mingw.tar.gz\" -C /c/build-lib" + + # Runs a set of commands using the runners shell + - name: "Cmake" + run: | + %MSYS2_SHELL% -lc "mkdir build && cd build && cmake -DGLFW_ROOT_DIR=\"/c/build-lib/glfw-3.2.1.bin.WIN64\" -DSDL2_ROOT_DIR=\"/c/build-lib/SDL2-2.0.8/x86_64-w64-mingw32\" -G \"MinGW Makefiles\" .." + + - name: "Build" + run: | + %MSYS2_SHELL% -lc "cd build && mingw32-make" + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2.2.1 + with: + name: NesEmulator + path: ${{ github.workspace }}/build/NesEmulator.exe diff --git a/include/ui/JoinServerView.h b/include/ui/JoinServerView.h index aab25c4..3bf8c96 100644 --- a/include/ui/JoinServerView.h +++ b/include/ui/JoinServerView.h @@ -5,6 +5,7 @@ #include "ui/UIComponent.h" #include #include +#include class JoinServerView : public UIComponent { public: @@ -32,4 +33,4 @@ class JoinServerView : public UIComponent { std::vector mListeners; }; -#endif \ No newline at end of file +#endif