Append sha1 commit to github CI build

This commit is contained in:
rock88 2020-06-08 23:03:04 +03:00
parent a42d89e569
commit bbe0c6d696
5 changed files with 16 additions and 7 deletions

View file

@ -33,9 +33,9 @@ jobs:
run: |
export DEVKITPRO=/opt/devkitpro
export DEVKITA64=/opt/devkitpro/devkitA64
make -j
make -j NIGHTLY_BUILD=`git rev-parse --short "$GITHUB_SHA"`
- name: Upload moonlight.nro
uses: actions/upload-artifact@v1
with:
name: moonlight
name: moonlight.zip
path: moonlight.nro

View file

@ -51,6 +51,12 @@ DATA := data
INCLUDES := include
#ROMFS := romfs
ifdef NIGHTLY_BUILD
MOONLIGHT_VERSION := "$(APP_VERSION)($(NIGHTLY_BUILD))"
else
MOONLIGHT_VERSION := "$(APP_VERSION)"
endif
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
@ -69,7 +75,7 @@ M_INCLUDES := \
-I$(TOPDIR)/third_party/nanogui/ext/nanovg/src
DEFINES := -DNANOGUI_USE_OPENGL -DNVG_STB_IMAGE_IMPLEMENTATION -DNANOGUI_NO_GLFW \
-DHAS_SOCKLEN_T -DHAS_POLL -DHAS_FCNTL -D_GNU_SOURCE -DUSE_MBEDTLS_CRYPTO
-DHAS_SOCKLEN_T -DHAS_POLL -DHAS_FCNTL -D_GNU_SOURCE -DUSE_MBEDTLS_CRYPTO -DMOONLIGHT_VERSION=\"$(MOONLIGHT_VERSION)\"
CFLAGS := -Wall -O3 -ffunction-sections $(ARCH) $(DEFINES) $(INCLUDE) $(M_INCLUDES) -D__SWITCH__
CXXFLAGS := $(CFLAGS) -std=gnu++17

View file

@ -283,6 +283,7 @@
367CD959245DE25F00A95738 /* StreamWindow.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = StreamWindow.hpp; sourceTree = "<group>"; };
367D2D7224829A0800A946F4 /* LogsWindow.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LogsWindow.cpp; sourceTree = "<group>"; };
367D2D7324829A0800A946F4 /* LogsWindow.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = LogsWindow.hpp; sourceTree = "<group>"; };
3689D6D0248EBEFA0008CB75 /* build.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; name = build.yml; path = .github/workflows/build.yml; sourceTree = "<group>"; };
36A0C0352461DBA30083289C /* AddHostButton.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AddHostButton.cpp; sourceTree = "<group>"; };
36A0C0362461DBA30083289C /* AddHostButton.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = AddHostButton.hpp; sourceTree = "<group>"; };
36A0C0382461E4C00083289C /* SettingsWindow.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SettingsWindow.cpp; sourceTree = "<group>"; };
@ -690,6 +691,7 @@
36DBDE852450BB7E0057C8D3 = {
isa = PBXGroup;
children = (
3689D6D0248EBEFA0008CB75 /* build.yml */,
3602C3C0245DC7E300368900 /* Makefile */,
36B406932459F41E005BD903 /* src */,
36DFDCF62459F80600FC51CE /* third_party */,
@ -1033,6 +1035,7 @@
"-DHAS_FCNTL",
"-DHAVE_PULSE",
"-DUSE_MBEDTLS_CRYPTO",
"-DMOONLIGHT_VERSION=\\\"1.0.9\\\"",
);
OTHER_LDFLAGS = (
"-lglfw3",
@ -1123,7 +1126,7 @@
"-DHAS_FCNTL",
"-DHAVE_PULSE",
"-DUSE_MBEDTLS_CRYPTO",
"-Dmemalign=calloc",
"-DMOONLIGHT_VERSION=\\\"1.0.9\\\"",
);
OTHER_LDFLAGS = (
"-lglfw3",

View file

@ -3,8 +3,6 @@
#include <vector>
#pragma once
#define MOONLIGHT_NX_VERSION "1.0.9"
enum VideoCodec: int {
H264,
H265

View file

@ -88,7 +88,9 @@ void MainWindow::draw(NVGcontext *ctx) {
nvgFillColor(ctx, Color(255, 255, 255, 200));
nvgFontSize(ctx, 20);
nvgFontFace(ctx, "sans");
nvgText(ctx, width() - 40, height() - 8, MOONLIGHT_NX_VERSION, NULL);
int text_width = nvgTextBounds(ctx, 0, 0, MOONLIGHT_VERSION, NULL, NULL);
nvgText(ctx, width() - text_width - 8, height() - 8, MOONLIGHT_VERSION, NULL);
nvgRestore(ctx);
}