Skip to content

Commit 3691edc

Browse files
committed
Fix merge conflits
2 parents 544a3aa + 12ad318 commit 3691edc

14 files changed

Lines changed: 908 additions & 122 deletions

.clang-tidy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ Checks: "-*,
5858
-cppcoreguidelines-pro-type-reinterpret-cast,
5959
6060
misc-*,
61-
-misc-include-cleaner,
6261
-misc-non-private-member-variables-in-classes,
6362
-misc-no-recursion,
6463

.github/workflows/build-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020

2121
- name: Checkout
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323
with:
2424
submodules: 'true'
2525
fetch-depth: 0

.github/workflows/build-mingw.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: MinGW
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [ master ]
7+
8+
env:
9+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
10+
BUILD_TYPE: Release
11+
INSTALL_PREFIX: _install
12+
PROJECT_NAME: fineftp-server
13+
14+
jobs:
15+
build-mingw:
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
library_type: [static, shared]
21+
22+
runs-on: windows-2025
23+
24+
defaults:
25+
run:
26+
shell: msys2 {0}
27+
28+
steps:
29+
30+
- name: Checkout
31+
uses: actions/checkout@v6
32+
with:
33+
submodules: 'true'
34+
fetch-depth: 0
35+
36+
- name: Setup MSYS2
37+
uses: msys2/setup-msys2@v2
38+
with:
39+
msystem: MINGW64
40+
update: true
41+
path-type: inherit
42+
install: >-
43+
git
44+
base-devel
45+
mingw-w64-x86_64-gcc
46+
mingw-w64-x86_64-cmake
47+
mingw-w64-x86_64-ninja
48+
49+
- name: Set Variables
50+
run: |
51+
if [[ '${{ matrix.library_type }}' == 'static' ]]; then
52+
echo "build_shared_libs=OFF" >> "$GITHUB_ENV"
53+
echo "package_postfix=static" >> "$GITHUB_ENV"
54+
else
55+
echo "build_shared_libs=ON" >> "$GITHUB_ENV"
56+
echo "package_postfix=shared" >> "$GITHUB_ENV"
57+
echo "${GITHUB_WORKSPACE}/_build/bin" >> "$GITHUB_PATH"
58+
echo "${GITHUB_WORKSPACE}/${INSTALL_PREFIX}/bin" >> "$GITHUB_PATH"
59+
fi
60+
61+
############################################
62+
# Test-compile the project
63+
############################################
64+
65+
- name: Configure CMake
66+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
67+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
68+
run: |
69+
cmake -B "${GITHUB_WORKSPACE}/_build" \
70+
-G Ninja \
71+
-DFINEFTP_SERVER_BUILD_TESTS=ON \
72+
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
73+
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/${INSTALL_PREFIX}" \
74+
-DBUILD_SHARED_LIBS=${build_shared_libs}
75+
76+
- name: Build
77+
# Build your program with the given configuration
78+
run: cmake --build "${GITHUB_WORKSPACE}/_build" --parallel
79+
80+
- name: Install
81+
run: cmake --install "${GITHUB_WORKSPACE}/_build"
82+
83+
- name: Run Tests
84+
run: ctest --test-dir "${GITHUB_WORKSPACE}/_build" -C Release -V
85+
86+
- name: Read Project Version from CMakeCache
87+
id: project-version
88+
run: |
89+
cmake_project_version_string=$(cat "${GITHUB_WORKSPACE}/_build/CMakeCache.txt" | grep "^CMAKE_PROJECT_VERSION:")
90+
arr=(${cmake_project_version_string//=/ })
91+
cmake_project_version=${arr[1]}
92+
echo "cmake_project_version=$cmake_project_version" >> "$GITHUB_OUTPUT"
93+
94+
- name: Upload binaries
95+
uses: actions/upload-artifact@v6
96+
with:
97+
name: ${{ env.PROJECT_NAME }}-${{ steps.project-version.outputs.cmake_project_version }}-windows-x64-mingw-${{ matrix.library_type }}
98+
path: ${{github.workspace}}/${{env.INSTALL_PREFIX}}
99+
100+
############################################
101+
# Test if our binary can be linked against
102+
############################################
103+
104+
- name: Compile integration test (Release)
105+
run: |
106+
cmake -B "${GITHUB_WORKSPACE}/samples/integration_test/_build/release" \
107+
-G Ninja \
108+
-DCMAKE_BUILD_TYPE=Release \
109+
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/${INSTALL_PREFIX}"
110+
cmake --build "${GITHUB_WORKSPACE}/samples/integration_test/_build/release" --parallel
111+
working-directory: ${{ github.workspace }}/samples/integration_test
112+
113+
- name: Run integration test (Release)
114+
run: ./integration_test.exe
115+
working-directory: ${{ github.workspace }}/samples/integration_test/_build/release
116+
117+
- name: Compile integration test (Debug)
118+
run: |
119+
cmake -B "${GITHUB_WORKSPACE}/samples/integration_test/_build/debug" \
120+
-G Ninja \
121+
-DCMAKE_BUILD_TYPE=Debug \
122+
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/${INSTALL_PREFIX}"
123+
cmake --build "${GITHUB_WORKSPACE}/samples/integration_test/_build/debug" --parallel
124+
working-directory: ${{ github.workspace }}/samples/integration_test
125+
126+
- name: Run integration test (Debug)
127+
run: ./integration_test.exe
128+
working-directory: ${{ github.workspace }}/samples/integration_test/_build/debug

.github/workflows/build-ubuntu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
library_type: [static, shared]
20-
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-24.04-arm, ubuntu-22.04-arm]
20+
os: [ubuntu-26.04, ubuntu-24.04, ubuntu-22.04, ubuntu-26.04-arm, ubuntu-24.04-arm, ubuntu-22.04-arm]
2121

2222
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
2323
# You can convert this to a matrix build if you need cross-platform coverage.
@@ -44,7 +44,7 @@ jobs:
4444
echo "cpu_architecture=$(dpkg --print-architecture)" >> "$GITHUB_ENV"
4545
4646
- name: Checkout
47-
uses: actions/checkout@v4
47+
uses: actions/checkout@v6
4848
with:
4949
submodules: 'true'
5050
fetch-depth: 0
@@ -89,7 +89,7 @@ jobs:
8989
working-directory: ${{github.workspace}}/_build/_package/
9090

9191
- name: Upload binaries
92-
uses: actions/upload-artifact@v4
92+
uses: actions/upload-artifact@v6
9393
with:
9494
name: ${{ env.PROJECT_NAME }}-${{ env.CMAKE_PROJECT_VERSION }}-${{ env.os_name }}_${{ env.cpu_architecture }}-${{ env.package_postfix }}
9595
path: ${{github.workspace}}/_build/_package/*.deb

.github/workflows/build-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
}
4242
4343
- name: Checkout
44-
uses: actions/checkout@v4
44+
uses: actions/checkout@v6
4545
with:
4646
submodules: 'true'
4747
fetch-depth: 0
@@ -85,7 +85,7 @@ jobs:
8585
echo "CMAKE_PROJECT_VERSION=$cmake_project_version" >> "$Env:GITHUB_ENV"
8686
8787
- name: Upload binaries
88-
uses: actions/upload-artifact@v4
88+
uses: actions/upload-artifact@v6
8989
with:
9090
name: ${{ env.PROJECT_NAME }}-${{ env.CMAKE_PROJECT_VERSION }}-windows-${{ matrix.build_arch }}-${{ env.VS_NAME }}-${{ matrix.library_type }}
9191
path: ${{github.workspace}}/${{env.INSTALL_PREFIX}}

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ option(FINEFTP_SERVER_BUILD_SAMPLES
1818
"Build project samples."
1919
ON)
2020
option(FINEFTP_SERVER_BUILD_TESTS
21-
"Build the the fineftp-server tests. Requires C++17. For executing the tests, curl must be available from the PATH."
21+
"Build the the fineftp-server tests. Requires C++17. For executing the tests, curl must be available from the PATH. For Windows, additionally Powershell and for Linux / macOS the ftp command or python3 with ftplib is used to test the STOU command, that is unsupported by curl."
2222
OFF)
2323

2424
option(FINEFTP_SERVER_USE_BUILTIN_ASIO

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Windows](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-windows.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-windows.yml) [![Ubuntu](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-ubuntu.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-ubuntu.yml) [![macOS](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-macos.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-macos.yml)
1+
[![Windows](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-windows.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-windows.yml) [![MinGW](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-mingw.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-mingw.yml) [![Ubuntu](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-ubuntu.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-ubuntu.yml) [![macOS](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-macos.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/build-macos.yml)
22

33
# fineFTP Server
44

@@ -85,7 +85,7 @@ You can set the following CMake Options to control how fineFTP Server is built:
8585
**Option** | **Type** | **Default** | **Explanation** |
8686
|--------------------------------|----------|-------------|-----------------------------------------------------------------------------------------------------------------|
8787
| `FINEFTP_SERVER_BUILD_SAMPLES` | `BOOL` | `ON` | Build the fineFTP Server sample project. |
88-
| `FINEFTP_SERVER_BUILD_TESTS` | `BOOL` | `OFF` | Build the the fineftp-server tests. Requires C++17. For executing the tests, `curl` must be available from the `PATH`. |
88+
| `FINEFTP_SERVER_BUILD_TESTS` | `BOOL` | `OFF` | Build the the fineftp-server tests. Requires C++17. For executing the tests, curl must be available from the `PATH`. For Windows, additionally Powershell and for Linux / macOS the ftp command or python3 with ftplib is used to test the `STOU` command, that is unsupported by `curl`. |
8989
| `FINEFTP_SERVER_USE_BUILTIN_ASIO`| `BOOL`| `ON` | Use the builtin asio submodule. If set to `OFF`, asio must be available from somewhere else (e.g. system libs). |
9090
| `FINEFTP_SERVER_USE_BUILTIN_GTEST`| `BOOL`| `ON` <br>_(when building tests)_ | Use the builtin GoogleTest submodule. Only needed if `FINEFTP_SERVER_BUILD_TESTS` is `ON`. If set to `OFF`, GoogleTest must be available from somewhere else (e.g. system libs). |
9191
| `BUILD_SHARED_LIBS` | `BOOL` | | Not a fineFTP Server option, but use this to control whether you want to have a static or shared library. |

0 commit comments

Comments
 (0)