summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2021-06-26 15:01:06 +0200
committerGitHub <noreply@github.com>2021-06-26 15:01:06 +0200
commit687917cb52e36ad96a1164344f883315b616c233 (patch)
treecf45715f8bbf65a154045d9a6e249a6fcc735355
parentMerge pull request #59 from LaG1924/ftr/github-actions (diff)
parentMoved font downloading to CMake (diff)
downloadAltCraft-687917cb52e36ad96a1164344f883315b616c233.tar
AltCraft-687917cb52e36ad96a1164344f883315b616c233.tar.gz
AltCraft-687917cb52e36ad96a1164344f883315b616c233.tar.bz2
AltCraft-687917cb52e36ad96a1164344f883315b616c233.tar.lz
AltCraft-687917cb52e36ad96a1164344f883315b616c233.tar.xz
AltCraft-687917cb52e36ad96a1164344f883315b616c233.tar.zst
AltCraft-687917cb52e36ad96a1164344f883315b616c233.zip
-rw-r--r--.github/workflows/ci.yml9
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/Plugin.cpp1
4 files changed, 7 insertions, 6 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7404806..bbb377c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -48,9 +48,9 @@ jobs:
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }} --target AltCraft
- name: Upload debug symbols artifacts
uses: actions/upload-artifact@v2
- if: ${{ runner.os == 'Windows' }}
+ if: ${{ runner.os == 'Windows' && contains(matrix.build_type, 'Deb') }}
with:
- name: symbols-${{ matrix.platform.name }}-${{ matrix.build_type }}
+ name: symbols-nightly-b${{ github.run_number }}-${{ matrix.platform.name }}-${{ matrix.build_type }}
path: ${{ github.workspace }}/build/**/*.pdb
- name: Copy binaries for packaging
run: mkdir $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package && find $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/build -type f \( -name "*.exe" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" \) -exec cp {} $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package \;
@@ -64,12 +64,9 @@ jobs:
- name: Copy AC and MC assets
run: cp -r $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/mc-assets/assets $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package && cp -r $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/cwd/* $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package
shell: bash
- - name: Download and copy fonts
- run: mkdir $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package/assets/altcraft/fonts && curl -L https://github.com/google/fonts/raw/main/apache/opensans/OpenSans%5Bwdth%2Cwght%5D.ttf --output $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package/assets/altcraft/fonts/OpenSans-Regular.ttf
- shell: bash
- name: Upload package artifacts
uses: actions/upload-artifact@v2
with:
- name: AltCraft-${{ matrix.platform.name }}-${{ matrix.build_type }}
+ name: AltCraft-nightly-b${{ github.run_number }}-${{ matrix.platform.name }}-${{ matrix.build_type }}
path: ${{ github.workspace }}/package
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 7df2bc0..5dd5345 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
cwd/assets/minecraft
+cwd/assets/altcraft/fonts/
build/
#CLion
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7d166a..4ad24cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -212,3 +212,5 @@ endif()
if(MSVC AND CMAKE_BUILD_TYPE MATCHES Release)
set_target_properties(AltCraft PROPERTIES WIN32_EXECUTABLE ON)
endif()
+
+file(DOWNLOAD https://github.com/google/fonts/raw/main/apache/opensans/OpenSans%5Bwdth%2Cwght%5D.ttf ${CMAKE_SOURCE_DIR}/cwd/assets/altcraft/fonts/OpenSans-Regular.ttf)
diff --git a/src/Plugin.cpp b/src/Plugin.cpp
index 5134aa6..ce995fc 100644
--- a/src/Plugin.cpp
+++ b/src/Plugin.cpp
@@ -301,6 +301,7 @@ void PluginSystem::CallOnChangeState(std::string newState) {
void PluginSystem::CallOnTick(double deltaTime) {
OPTICK_EVENT();
+ lua.safe_script("collectgarbage('collect')");
for (Plugin& plugin : plugins) {
if (plugin.onTick && plugin.errors < 10)
try {