Compare commits
7 Commits
5f2098d55c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df759bc426 | ||
|
|
d0dc242b13 | ||
|
|
a9b27fe9b7 | ||
|
|
01c1992875 | ||
|
|
5cc1345852 | ||
|
|
23c462f311 | ||
|
|
c03a0f0f24 |
41
.github/workflows/cd.yml
vendored
41
.github/workflows/cd.yml
vendored
@@ -49,6 +49,46 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
${{github.workspace}}/${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu24.04-x86_64.tar.gz
|
${{github.workspace}}/${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu24.04-x86_64.tar.gz
|
||||||
|
|
||||||
|
linux-debian12:
|
||||||
|
timeout-minutes: 10
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: debian:12
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: apt update && apt -y install git build-essential pkg-config cmake ninja-build libsodium-dev libssl-dev
|
||||||
|
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Fix gitconfig
|
||||||
|
run: git config --system --add safe.directory ${GITHUB_WORKSPACE}
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-gz -DCMAKE_CXX_FLAGS=-gz -DCMAKE_EXE_LINKER_FLAGS=-gz
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4
|
||||||
|
|
||||||
|
- name: Determine tag name
|
||||||
|
id: tag
|
||||||
|
shell: bash
|
||||||
|
run: . .github/workflows/tag_version.bash
|
||||||
|
|
||||||
|
- name: Compress artifacts
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
tar -czvf ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-debian12-x86_64.tar.gz -C ${{github.workspace}}/build/bin/ .
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-debian12-x86_64
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-debian12-x86_64.tar.gz
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
@@ -124,6 +164,7 @@ jobs:
|
|||||||
|
|
||||||
needs:
|
needs:
|
||||||
- linux-ubuntu
|
- linux-ubuntu
|
||||||
|
- linux-debian12
|
||||||
- windows
|
- windows
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
52
.github/workflows/ci.yml
vendored
52
.github/workflows/ci.yml
vendored
@@ -10,13 +10,13 @@ env:
|
|||||||
BUILD_TYPE: Debug
|
BUILD_TYPE: Debug
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
linux-ubuntu-latest:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
@@ -30,8 +30,30 @@ jobs:
|
|||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
working-directory: ${{github.workspace}}/build
|
run: ctest --test-dir ${{github.workspace}}/build -C ${{env.BUILD_TYPE}}
|
||||||
run: ctest -C ${{env.BUILD_TYPE}}
|
|
||||||
|
linux-debian12:
|
||||||
|
timeout-minutes: 10
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: debian:12
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: apt update && apt -y install git build-essential pkg-config cmake ninja-build libsodium-dev libssl-dev
|
||||||
|
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSOLANACEAE_ECOSYSTEM_BUILD_TESTING=ON
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: ctest --test-dir ${{github.workspace}}/build -C ${{env.BUILD_TYPE}}
|
||||||
|
|
||||||
android:
|
android:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
@@ -46,15 +68,15 @@ jobs:
|
|||||||
ndk_abi: armeabi-v7a
|
ndk_abi: armeabi-v7a
|
||||||
- vcpkg_toolkit: arm64-android-23
|
- vcpkg_toolkit: arm64-android-23
|
||||||
ndk_abi: arm64-v8a
|
ndk_abi: arm64-v8a
|
||||||
- vcpkg_toolkit: x64-android-23
|
#- vcpkg_toolkit: x64-android-23
|
||||||
ndk_abi: x86_64
|
# ndk_abi: x86_64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
repository: 'Green-Sky/vcpkg_android_triplets'
|
repository: 'Green-Sky/vcpkg_android_triplets'
|
||||||
path: 'vcpkg_android_triplets'
|
path: 'vcpkg_android_triplets'
|
||||||
@@ -107,13 +129,13 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
${{github.workspace}}/${{github.event.repository.name}}-${{matrix.platform.vcpkg_toolkit}}.tar.gz
|
${{github.workspace}}/${{github.event.repository.name}}-${{matrix.platform.vcpkg_toolkit}}.tar.gz
|
||||||
|
|
||||||
macos:
|
macos-latest:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
@@ -127,16 +149,15 @@ jobs:
|
|||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 3
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 3
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
working-directory: ${{github.workspace}}/build
|
run: ctest --test-dir ${{github.workspace}}/build -C ${{env.BUILD_TYPE}}
|
||||||
run: ctest -C ${{env.BUILD_TYPE}}
|
|
||||||
|
|
||||||
windows:
|
windows-latest:
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
@@ -164,6 +185,5 @@ jobs:
|
|||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 3
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 3
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
working-directory: ${{github.workspace}}/build
|
run: ctest --test-dir ${{github.workspace}}/build -C ${{env.BUILD_TYPE}}
|
||||||
run: ctest -C ${{env.BUILD_TYPE}}
|
|
||||||
|
|
||||||
|
|||||||
2
external/solanaceae_ngc_ft1
vendored
2
external/solanaceae_ngc_ft1
vendored
Submodule external/solanaceae_ngc_ft1 updated: 254fe9c6d5...866d64c7d8
2
external/solanaceae_util
vendored
2
external/solanaceae_util
vendored
Submodule external/solanaceae_util updated: ba3b83af24...905605ef47
15
external/toxcore/CMakeLists.txt
vendored
15
external/toxcore/CMakeLists.txt
vendored
@@ -53,16 +53,21 @@ configure_file(
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/include/tox/tox_private.h
|
${CMAKE_CURRENT_BINARY_DIR}/include/tox/tox_private.h
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
|
configure_file(
|
||||||
|
./c-toxcore/toxcore/attributes.h # for tox_private.h
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/include/tox/attributes.h
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
configure_file(
|
configure_file(
|
||||||
./c-toxcore/toxencryptsave/toxencryptsave.h
|
./c-toxcore/toxencryptsave/toxencryptsave.h
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/include/tox/toxencryptsave.h
|
${CMAKE_CURRENT_BINARY_DIR}/include/tox/toxencryptsave.h
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
#configure_file(
|
configure_file(
|
||||||
# ./c-toxcore/toxav/toxav.h
|
./c-toxcore/toxav/toxav.h
|
||||||
# ${CMAKE_CURRENT_BINARY_DIR}/include/tox/toxav.h
|
${CMAKE_CURRENT_BINARY_DIR}/include/tox/toxav.h
|
||||||
# @ONLY
|
@ONLY
|
||||||
#)
|
)
|
||||||
|
|
||||||
target_include_directories(toxcore INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include/)
|
target_include_directories(toxcore INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||||
|
|
||||||
|
|||||||
2
external/toxcore/c-toxcore
vendored
2
external/toxcore/c-toxcore
vendored
Submodule external/toxcore/c-toxcore updated: e58eb27a84...4f6d4546b2
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <solanaceae/util/config_model.hpp>
|
#include <solanaceae/util/config_model.hpp>
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
TransferAutoAccept::TransferAutoAccept(ObjectStore2& os, RegistryMessageModelI& rmm, ConfigModelI& conf) : _os(os), _rmm(rmm), _conf(conf) {
|
TransferAutoAccept::TransferAutoAccept(ObjectStore2& os, RegistryMessageModelI& rmm, ConfigModelI& conf) : _os(os), _rmm(rmm), _conf(conf) {
|
||||||
@@ -77,17 +78,23 @@ void TransferAutoAccept::checkObj(ObjectHandle o) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::string save_dir_path = _conf.get_string("TransferAutoAccept", "save_path").value_or("tmp_save_dir");
|
||||||
uint64_t total_size {0u};
|
uint64_t total_size {0u};
|
||||||
if (const auto* si = o.try_get<ObjComp::F::SingleInfo>(); si != nullptr) {
|
if (const auto* si = o.try_get<ObjComp::F::SingleInfo>(); si != nullptr) {
|
||||||
if (si->file_name.empty()) {
|
if (si->file_name.empty()) {
|
||||||
return; // bad file
|
return; // bad file
|
||||||
}
|
}
|
||||||
total_size = si->file_size;
|
total_size = si->file_size;
|
||||||
|
if (std::filesystem::exists(std::filesystem::path(save_dir_path) / si->file_name)) {
|
||||||
|
return; // pre existing, dont auto
|
||||||
|
}
|
||||||
} else if (const auto* ci = o.try_get<ObjComp::F::CollectionInfo>(); ci != nullptr) {
|
} else if (const auto* ci = o.try_get<ObjComp::F::CollectionInfo>(); ci != nullptr) {
|
||||||
if (ci->file_list.empty() || ci->file_list.front().file_name.empty()) {
|
if (ci->file_list.empty() || ci->file_list.front().file_name.empty()) {
|
||||||
return; // bad file
|
return; // bad file
|
||||||
}
|
}
|
||||||
total_size = ci->total_size;
|
total_size = ci->total_size;
|
||||||
|
|
||||||
|
return; // TODO: figure out a collection strategy
|
||||||
}
|
}
|
||||||
|
|
||||||
//const auto& file_info = h.get<Message::Components::Transfer::FileInfo>();
|
//const auto& file_info = h.get<Message::Components::Transfer::FileInfo>();
|
||||||
|
|||||||
Reference in New Issue
Block a user