This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[linux] add CI for Linux, dxvk_native, safeclib and 1st version for s…
…torm_platform.h
- Loading branch information
Showing
12 changed files
with
181 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: CI Linux | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'tools/**' | ||
- '*.md' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'tools/**' | ||
- '*.md' | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
configuration: [Debug] | ||
name: 'build-linux [${{ matrix.configuration}}]' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
- name: Install libs | ||
run: sudo apt update && sudo apt install meson libstdc++-10-dev libvulkan-dev glslang-tools libsdl2-dev libgl-dev libegl-dev | ||
- name: Install Conan | ||
run: pip install conan | ||
- name: Configure with cmake | ||
run: | | ||
export CC=clang-11 | ||
export CXX=clang++-11 | ||
${CXX} --version | ||
mkdir build && cd build | ||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.configuration}} | ||
- name: Build dependencies | ||
run: ninja dependencies | ||
working-directory: build | ||
- name: Build project | ||
run: ninja | ||
working-directory: build |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
if (NOT WIN32) | ||
set(SYSTEM_DEPS "libsafec") | ||
endif() | ||
|
||
STORM_SETUP( | ||
TARGET_NAME common | ||
TYPE library | ||
DEPENDENCIES shared_headers util spdlog directx | ||
DEPENDENCIES shared_headers util spdlog directx ${SYSTEM_DEPS} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#ifndef _WIN32 | ||
|
||
#include "safe_str_lib.h" | ||
|
||
// use custom strcpy_s instead of safeclib: #define strcpy_s(dest, dmax, src) | ||
#undef strcpy_s | ||
|
||
inline int strcpy_s(char *dest, size_t size, const char *src) | ||
{ | ||
if (!dest) | ||
return EINVAL; | ||
|
||
if (0 == size) | ||
{ | ||
dest[0] = '\0'; | ||
return ERANGE; | ||
} | ||
|
||
if (!src) | ||
{ | ||
dest[0] = '\0'; | ||
return EINVAL; | ||
} | ||
|
||
size_t i; | ||
for (i = 0; i < size; i++) | ||
{ | ||
if ((dest[i] = src[i]) == '\0') | ||
return 0; | ||
} | ||
dest[0] = '\0'; | ||
return ERANGE; | ||
} | ||
|
||
template <std::size_t size> inline int strcpy_s(char (&dest)[size], const char *src) | ||
{ | ||
return strcpy_s(dest, size, src); | ||
} | ||
|
||
// use custom sprintf_s instead of safeclib: #define sprintf_s(dest, dmax, ...) | ||
#undef sprintf_s | ||
|
||
template <size_t size> inline int sprintf_s(char (&buffer)[size], const char *format, ...) | ||
{ | ||
va_list args; | ||
va_start(args, format); | ||
int result = vsnprintf(buffer, size, format, args); | ||
va_end(args); | ||
return result; | ||
} | ||
|
||
inline int sprintf_s(char *buffer, size_t size, const char *format, ...) | ||
{ | ||
va_list ap; | ||
va_start(ap, format); | ||
int result = vsnprintf(buffer, size, format, ap); | ||
va_end(ap); | ||
return result; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
if (WIN32) | ||
set(SYSTEM_DEPS "legacy_stdio_definitions") | ||
endif() | ||
|
||
STORM_SETUP( | ||
TARGET_NAME renderer | ||
TYPE storm_module | ||
DEPENDENCIES common core util legacy_stdio_definitions | ||
DEPENDENCIES common core util ${SYSTEM_DEPS} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
if (WIN32) | ||
set(SYSTEM_DEPS | ||
"ddraw" | ||
"amstrmid" | ||
) | ||
endif() | ||
|
||
STORM_SETUP( | ||
TARGET_NAME xinterface | ||
TYPE storm_module | ||
DEPENDENCIES common core ddraw amstrmid util | ||
DEPENDENCIES common core util ${SYSTEM_DEPS} | ||
TEST_DEPENDENCIES catch2 | ||
) |