Compare commits

..

5 Commits

Author SHA1 Message Date
Green Sky
a9b27fe9b7 prevent the auto accept when file already exists
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / linux-debian12 (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
ContinuousIntegration / linux-ubuntu-latest (push) Has been cancelled
ContinuousIntegration / linux-debian12 (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / macos-latest (push) Has been cancelled
ContinuousIntegration / windows-latest (push) Has been cancelled
2026-01-10 17:13:21 +01:00
Green Sky
01c1992875 try fix container git 2026-01-09 17:18:07 +01:00
Green Sky
5cc1345852 add debain11 to cd
update checkout actions to v5 in ci
2026-01-09 16:42:51 +01:00
Green Sky
23c462f311 disable the x86 android build
vcpkg's openssl broke some time back
2026-01-08 15:14:52 +01:00
Green Sky
c03a0f0f24 add docker debian:12 to ci 2026-01-08 15:14:18 +01:00
3 changed files with 84 additions and 16 deletions

View File

@@ -49,6 +49,46 @@ jobs:
path: |
${{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:
timeout-minutes: 15
@@ -124,6 +164,7 @@ jobs:
needs:
- linux-ubuntu
- linux-debian12
- windows
permissions:

View File

@@ -10,13 +10,13 @@ env:
BUILD_TYPE: Debug
jobs:
linux:
linux-ubuntu-latest:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive
@@ -30,8 +30,30 @@ jobs:
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
run: ctest --test-dir ${{github.workspace}}/build -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:
timeout-minutes: 30
@@ -46,15 +68,15 @@ jobs:
ndk_abi: armeabi-v7a
- vcpkg_toolkit: arm64-android-23
ndk_abi: arm64-v8a
- vcpkg_toolkit: x64-android-23
ndk_abi: x86_64
#- vcpkg_toolkit: x64-android-23
# ndk_abi: x86_64
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
repository: 'Green-Sky/vcpkg_android_triplets'
path: 'vcpkg_android_triplets'
@@ -107,13 +129,13 @@ jobs:
path: |
${{github.workspace}}/${{github.event.repository.name}}-${{matrix.platform.vcpkg_toolkit}}.tar.gz
macos:
macos-latest:
timeout-minutes: 10
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive
@@ -127,16 +149,15 @@ jobs:
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 3
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
run: ctest --test-dir ${{github.workspace}}/build -C ${{env.BUILD_TYPE}}
windows:
windows-latest:
timeout-minutes: 15
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive
@@ -164,6 +185,5 @@ jobs:
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 3
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
run: ctest --test-dir ${{github.workspace}}/build -C ${{env.BUILD_TYPE}}

View File

@@ -8,6 +8,7 @@
#include <solanaceae/util/config_model.hpp>
#include <filesystem>
#include <iostream>
TransferAutoAccept::TransferAutoAccept(ObjectStore2& os, RegistryMessageModelI& rmm, ConfigModelI& conf) : _os(os), _rmm(rmm), _conf(conf) {
@@ -77,17 +78,23 @@ void TransferAutoAccept::checkObj(ObjectHandle o) {
return;
}
const auto save_dir_path = _conf.get_string("TransferAutoAccept", "save_path").value_or("tmp_save_dir");
uint64_t total_size {0u};
if (const auto* si = o.try_get<ObjComp::F::SingleInfo>(); si != nullptr) {
if (si->file_name.empty()) {
return; // bad file
}
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) {
if (ci->file_list.empty() || ci->file_list.front().file_name.empty()) {
return; // bad file
}
total_size = ci->total_size;
return; // TODO: figure out a collection strategy
}
//const auto& file_info = h.get<Message::Components::Transfer::FileInfo>();