Skip to content

Commit

Permalink
Add HTML CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Lecrapouille committed Nov 5, 2023
1 parent da41240 commit 4724bdc
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
45 changes: 40 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,64 @@ on:
workflow_dispatch:
branches:
- master
- dev-refactor
push:
branches:
- master
- dev-refactor
pull_request:
branches:
- master
- dev-refactor

jobs:
build_html5:
name: Build with Emscripten
runs-on: ubuntu-20.04
steps:
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install pkg-config libmosquitto-dev libx11-dev libxinerama-dev
sudo apt-get install libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev
- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v11
- name: Checkout TimedPetriNetEditor
uses: actions/checkout@v4
with:
submodules: true
- name: Compile TimedPetriNetEditor
run: |
make download-external-libs
make compile-external-libs
make -j`nproc --all`
- name: Deploy
run: |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git config --global user.name 'GitHub CI'
git config --global user.email 'github-ci@users.noreply.github.com'
git checkout gh-pages
git add build/TimedPetriNetEditor.*
git commit -m "Automated commit"
git push
non_regression_linux:
name: Non regression tests on Linux
runs-on: ubuntu-20.04
steps:
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install pkg-config lcov libdw-dev libsfml-dev libglew-dev
sudo apt-get install libmosquitto-dev
sudo apt-get install libdw-dev pkg-config libmosquitto-dev libx11-dev libxinerama-dev
sudo apt-get install libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev
- name: Checkout TimedPetriNetEditor
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Compile TimedPetriNetEditor
run: |
make download-external-libs
make compile-external-libs
make -j`nproc --all`
- name: Download, configure and install Google test
run: |
Expand All @@ -52,14 +86,15 @@ jobs:
steps:
- name: Install system packages
run: |
brew install pkg-config sfml mosquitto glew
brew install pkg-config mosquitto raylib glfw glew
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Compile TimedPetriNetEditor
run: |
make download-external-libs
make compile-external-libs
make -j`sysctl -n hw.logicalcpu`
- name: Download, configure and install Google test
run: |
Expand Down
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
PROJECT = TimedPetriNetEditor
TARGET = $(PROJECT)
DESCRIPTION = Test RayLib
DESCRIPTION = Timed Petri Net Editor
STANDARD = --std=c++14
BUILD_TYPE = debug

Expand Down Expand Up @@ -111,6 +111,17 @@ PKG_LIBS += libmosquitto
#
INCLUDES += -I$(THIRDPART)/json/include

###################################################
# OpenGL: glfw and glew libraries
#
ifeq ($(ARCHI),Darwin)
INCLUDES += -I/usr/local/include -I/opt/local/include
LINKER_FLAGS += -framework OpenGL -framework Cocoa
LINKER_FLAGS += -framework IOKit -framework CoreVideo
LINKER_FLAGS += -L/usr/local/lib -L/opt/local/lib
LINKER_FLAGS += -lGLEW -lglfw
endif

###################################################
# Make the list of compiled files for the application
#
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/PetriEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static void messagebox(Editor const& editor)
static void inputInteger(std::string const& title, size_t& tokens)
{
ImGui::AlignTextToFramePadding();
ImGui::Text("%d", tokens);
ImGui::Text("%zu", tokens);
ImGui::SameLine();

float spacing = ImGui::GetStyle().ItemInnerSpacing.x;
Expand Down

0 comments on commit 4724bdc

Please sign in to comment.