mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[ion/simulator] Get rid of the headless target
This commit is contained in:
16
.github/workflows/ci-workflow.yml
vendored
16
.github/workflows/ci-workflow.yml
vendored
@@ -74,8 +74,8 @@ jobs:
|
|||||||
- run: pacman -S --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-freetype mingw-w64-x86_64-pkg-config make mingw-w64-x86_64-python3 mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-libpng
|
- run: pacman -S --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-freetype mingw-w64-x86_64-pkg-config make mingw-w64-x86_64-python3 mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-libpng
|
||||||
- run: make -j2 PLATFORM=simulator
|
- run: make -j2 PLATFORM=simulator
|
||||||
- run: make -j2 PLATFORM=simulator epsilon.official.exe
|
- run: make -j2 PLATFORM=simulator epsilon.official.exe
|
||||||
- run: make -j2 PLATFORM=simulator test.headless.exe
|
- run: make -j2 PLATFORM=simulator test.exe
|
||||||
- run: output/release/simulator/windows/test.headless.exe
|
- run: cmd /c output\release\simulator\windows\test.exe --headless
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: epsilon-windows.exe
|
name: epsilon-windows.exe
|
||||||
@@ -89,8 +89,8 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: make -j2 PLATFORM=simulator TARGET=web
|
- run: make -j2 PLATFORM=simulator TARGET=web
|
||||||
- run: make -j2 PLATFORM=simulator TARGET=web epsilon.official.zip
|
- run: make -j2 PLATFORM=simulator TARGET=web epsilon.official.zip
|
||||||
- run: make -j2 PLATFORM=simulator TARGET=web test.headless.js
|
- run: make -j2 PLATFORM=simulator TARGET=web test.js
|
||||||
- run: node output/release/simulator/web/test.headless.js
|
- run: node output/release/simulator/web/test.js --headless
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: epsilon-web.zip
|
name: epsilon-web.zip
|
||||||
@@ -102,8 +102,8 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: make -j2 PLATFORM=simulator
|
- run: make -j2 PLATFORM=simulator
|
||||||
- run: make -j2 PLATFORM=simulator epsilon.official.bin
|
- run: make -j2 PLATFORM=simulator epsilon.official.bin
|
||||||
- run: make -j2 PLATFORM=simulator test.headless.bin
|
- run: make -j2 PLATFORM=simulator test.bin
|
||||||
- run: output/release/simulator/linux/test.headless.bin
|
- run: output/release/simulator/linux/test.bin --headless
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: epsilon-linux.bin
|
name: epsilon-linux.bin
|
||||||
@@ -116,8 +116,8 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: make -j2 PLATFORM=simulator
|
- run: make -j2 PLATFORM=simulator
|
||||||
- run: make -j2 PLATFORM=simulator epsilon.official.app
|
- run: make -j2 PLATFORM=simulator epsilon.official.app
|
||||||
- run: make -j2 PLATFORM=simulator ARCH=x86_64 test.headless.bin
|
- run: make -j2 PLATFORM=simulator ARCH=x86_64 test.bin
|
||||||
- run: output/release/simulator/macos/x86_64/test.headless.bin
|
- run: output/release/simulator/macos/x86_64/test.bin --headless
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: epsilon-macos.zip
|
name: epsilon-macos.zip
|
||||||
|
|||||||
@@ -1,8 +1 @@
|
|||||||
# Headless targets
|
|
||||||
$(eval $(call rule_for_epsilon_flavor,headless))
|
|
||||||
HANDY_TARGETS += epsilon.headless
|
|
||||||
|
|
||||||
$(BUILD_DIR)/test.headless.$(EXE): $(call flavored_object_for,$(test_runner_src),headless)
|
|
||||||
HANDY_TARGETS += test.headless
|
|
||||||
|
|
||||||
-include build/targets.simulator.$(TARGET).mak
|
-include build/targets.simulator.$(TARGET).mak
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
$(BUILD_DIR)/test.headless.js: EMSCRIPTEN_MODULARIZE = 0
|
$(BUILD_DIR)/test.js: EMSCRIPTEN_MODULARIZE = 0
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
#include <ion/events.h>
|
|
||||||
|
|
||||||
namespace Ion {
|
|
||||||
namespace Events {
|
|
||||||
|
|
||||||
Event getPlatformEvent() {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#include <ion/keyboard.h>
|
|
||||||
|
|
||||||
namespace Ion {
|
|
||||||
namespace Keyboard {
|
|
||||||
|
|
||||||
State scan() {
|
|
||||||
return State();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#include <ion/timing.h>
|
|
||||||
|
|
||||||
void Ion::Timing::msleep(uint32_t ms) {
|
|
||||||
}
|
|
||||||
@@ -3,35 +3,28 @@ ion_src += $(addprefix ion/src/shared/dummy/, \
|
|||||||
battery.cpp \
|
battery.cpp \
|
||||||
display.cpp \
|
display.cpp \
|
||||||
exam_mode.cpp \
|
exam_mode.cpp \
|
||||||
events_platform.cpp:+headless \
|
|
||||||
fcc_id.cpp \
|
fcc_id.cpp \
|
||||||
keyboard.cpp:+headless \
|
|
||||||
led.cpp \
|
led.cpp \
|
||||||
power.cpp \
|
power.cpp \
|
||||||
serial_number.cpp \
|
serial_number.cpp \
|
||||||
stack.cpp \
|
stack.cpp \
|
||||||
timing_msleep.cpp:+headless \
|
|
||||||
usb.cpp \
|
usb.cpp \
|
||||||
)
|
)
|
||||||
|
|
||||||
ion_src += $(addprefix ion/src/simulator/shared/, \
|
ion_src += $(addprefix ion/src/simulator/shared/, \
|
||||||
dummy/keyboard.cpp:+headless \
|
|
||||||
dummy/window.cpp:+headless \
|
|
||||||
clipboard.cpp \
|
clipboard.cpp \
|
||||||
console_stdio.cpp:-consoledisplay \
|
console.cpp \
|
||||||
crc32.cpp \
|
crc32.cpp \
|
||||||
display.cpp:-headless \
|
display.cpp \
|
||||||
events.cpp \
|
events.cpp \
|
||||||
events_platform.cpp:-headless \
|
events_platform.cpp \
|
||||||
framebuffer.cpp \
|
framebuffer.cpp \
|
||||||
framebuffer_png.cpp:+headless \
|
keyboard.cpp \
|
||||||
keyboard.cpp:-headless \
|
layout.cpp \
|
||||||
layout.cpp:-headless \
|
|
||||||
main.cpp \
|
main.cpp \
|
||||||
random.cpp \
|
random.cpp \
|
||||||
timing.cpp \
|
timing.cpp \
|
||||||
timing_msleep.cpp:-headless \
|
window.cpp \
|
||||||
window.cpp:-headless \
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ion_simulator_assets = background.jpg horizontal_arrow.png vertical_arrow.png round.png small_squircle.png large_squircle.png
|
ion_simulator_assets = background.jpg horizontal_arrow.png vertical_arrow.png round.png small_squircle.png large_squircle.png
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
#include "../keyboard.h"
|
|
||||||
|
|
||||||
namespace Ion {
|
|
||||||
namespace Simulator {
|
|
||||||
namespace Keyboard {
|
|
||||||
|
|
||||||
void keyDown(Ion::Keyboard::Key k) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void keyUp(Ion::Keyboard::Key k) {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool scanHandlesSDLKey(SDL_Scancode key) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#include "../window.h"
|
|
||||||
|
|
||||||
namespace Ion {
|
|
||||||
namespace Simulator {
|
|
||||||
namespace Window {
|
|
||||||
|
|
||||||
void init() {
|
|
||||||
Ion::Simulator::Framebuffer::setActive(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void quit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
void setNeedsRefresh() {
|
|
||||||
}
|
|
||||||
|
|
||||||
void relayout() {
|
|
||||||
}
|
|
||||||
|
|
||||||
void refresh() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,24 @@
|
|||||||
#include <ion/timing.h>
|
#include <ion/timing.h>
|
||||||
|
#include "window.h"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
static auto start = std::chrono::steady_clock::now();
|
static auto start = std::chrono::steady_clock::now();
|
||||||
|
|
||||||
uint64_t Ion::Timing::millis() {
|
namespace Ion {
|
||||||
|
namespace Timing {
|
||||||
|
|
||||||
|
uint64_t millis() {
|
||||||
auto elapsed = std::chrono::steady_clock::now() - start;
|
auto elapsed = std::chrono::steady_clock::now() - start;
|
||||||
return std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
|
return std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void msleep(uint32_t ms) {
|
||||||
|
if (Simulator::Window::isHeadless()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SDL_Delay(ms);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
#include <ion/timing.h>
|
|
||||||
#include "window.h"
|
|
||||||
#include <SDL.h>
|
|
||||||
|
|
||||||
void Ion::Timing::msleep(uint32_t ms) {
|
|
||||||
if (Ion::Simulator::Window::isHeadless()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
SDL_Delay(ms);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user