Build with GA

This commit is contained in:
Infactum
2020-08-19 00:39:24 +03:00
committed by GitHub
parent 414faaf959
commit 84a79d86a3
4 changed files with 46 additions and 1 deletions
+36
View File
@@ -0,0 +1,36 @@
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
arch: [x86, x64]
include:
- os: windows-latest
arch: x64
generator: VS16Win64
- os: windows-latest
arch: x86
generator: VS16Win32
- os: ubuntu-latest
generator: Ninja
exclude:
- os: ubuntu-latest
arch: x86
steps:
- uses: actions/checkout@v2
- run: sudo apt install uuid-dev
if: matrix.os == 'ubuntu-latest'
- uses: lukka/run-cmake@v2
id: runcmake_cmd
with:
buildDirectory: ${{ runner.workspace }}/build
cmakeGenerator: ${{ matrix.generator }}
cmakeBuildType: Release
+5 -1
View File
@@ -33,7 +33,11 @@ endif ()
target_include_directories(${TARGET} PRIVATE
include)
if (MSVC)
if (WIN32 AND NOT MSVC)
message(FATAL_ERROR "Must be compiled with MSVC on Windows")
endif ()
if (WIN32)
if (STATIC_CRT)
string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
+1
View File
@@ -20,6 +20,7 @@
#ifndef COMPONENT_H
#define COMPONENT_H
#include <ctime>
#include <functional>
#include <map>
#include <memory>
+4
View File
@@ -116,6 +116,10 @@ variant_t SampleAddIn::currentDate() {
using namespace std;
tm current{};
time_t t = time(nullptr);
#ifdef _WINDOWS
localtime_s(&current, &t);
#else
localtime_r(&t, &current);
#endif
return current;
}