Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2552cfd
CMake: Add CTest support to match Autotools checks
val-ms Aug 26, 2020
4512798
CMake: Add fuzz support.
val-ms Nov 7, 2020
6b3b8b2
CMake: CPack generate Windows installer with WIX
val-ms Nov 12, 2020
840b559
Remove Visual Studio project files
val-ms Nov 13, 2020
034cc77
CMake: Fix static build w/ custom FindIconv.cmake
val-ms Nov 18, 2020
c81968d
GitHub Actions testing on Ubuntu, Mac, & Windows
val-ms Nov 19, 2020
93d4160
Autotools: Fix dist tarball CTest bugs
val-ms Dec 6, 2020
afbf0b6
Fix Windows text file EOL conversion issues
val-ms Dec 7, 2020
a8e8c34
Make new CMake Win32 install paths match old installer
val-ms Dec 8, 2020
4759e4b
ctest: Support Python 3.5
val-ms Jan 20, 2021
d782474
tests: limit # connections in test_connections
val-ms Feb 1, 2021
5bb8aa8
tests: test in a tmp-dir; w. relative clamd socket
val-ms Feb 1, 2021
c7181f9
cmake: fix libmspack 32-bit large-file
val-ms Feb 1, 2021
5d4d8b0
CMake: Define C_BSD for BSD variants
val-ms Feb 7, 2021
05a8d58
CMake: improve multiarch support
val-ms Feb 8, 2021
808a6af
CMake: Enable DNS (resolv) queries on FreeBSD
val-ms Feb 11, 2021
d1df6a7
Jenkins: Add parameter for custom appcheck branch
val-ms Feb 11, 2021
d26b71d
cmake: Fix vcpkg debug build issues
val-ms Feb 25, 2021
34285f0
NEWS: CMake is now preferred over Autotools
val-ms Feb 25, 2021
871ec97
Readme: Update Discord invite link
val-ms Mar 9, 2021
dc7f136
INSTALL.cmake.md: Fix copypaste typo
val-ms Mar 9, 2021
f4ef7b8
Mitigate ClamD test Valgrind error
val-ms Mar 18, 2021
b9ca6ea
Update copyright dates for 2021
val-ms Mar 19, 2021
3fdf035
clamonacc: Fix scan on file creation race condition
ragusaa Mar 20, 2021
5553a5e
Minor fuzz testbench improvements
recvfrom Nov 21, 2020
8dd9e9b
FreshClam: Deprecate SafeBrowsing config option
val-ms Mar 20, 2021
d6cbda5
FreshClam: Improved HTTP 304, 403, & 429 handling
val-ms Mar 21, 2021
6302616
FreshClam: mirrors.dat, User-Agent UUID, cool-down
val-ms Mar 22, 2021
427f98d
FreshClam mirror-sync issue: Keep & update again
val-ms Mar 22, 2021
1e4359d
Test: freshclam 429 and 403 behavior
val-ms Mar 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 16 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
ChangeLog merge=cl-merge
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

#
# The above will handle all files NOT found below
#

# Files that should be left untouched (binary is macro for -text -diff)
*.ref binary

#
# Exclude files from exporting
#
.gitattributes export-ignore
.gitignore export-ignore
173 changes: 173 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
name: CMake Build

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- rel/*
- dev/*
- main
pull_request:
branches:
- rel/*
- dev/*
- main

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
VCPKG_GIT_REF: 8a9a97315aefb3f8bc5d81bf66ca0025938b9c91

jobs:
build-windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v1

- name: Install Build Tools
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install wixtoolset

- uses: lukka/get-cmake@latest

# Restore from cache the previously built ports. If cache-miss, download, build vcpkg ports.
- name: Restore vcpkg ports from cache or install vcpkg
# Download and build vcpkg, without installing any port. If content is cached already, it is a no-op.
uses: lukka/run-vcpkg@v5
id: runvcpkg
with:
vcpkgArguments: "curl[openssl] json-c libxml2 pcre2 check pthreads zlib pdcurses bzip2"
vcpkgGitCommitId: "${{ env.VCPKG_GIT_REF }}"
vcpkgTriplet: "x64-windows"

- name: Print the VCPKG_ROOT & VCPKG_TRIPLET (for debugging)
shell: bash
run: echo "'${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}' '${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_TRIPLET_OUT }}' "

- name: dir the VCPKG_ROOT
run: dir ${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}

- name: Create Build Directory
shell: bash
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Run CMake+Ninja with triplet (cmd)
uses: lukka/run-cmake@main
id: runcmake_cmd
with:
cmakeGenerator: "Ninja" # Visual Studio 15 2017
cmakeListsOrSettingsJson: "CMakeListsTxtBasic"
cmakeListsTxtPath: "${{runner.workspace}}/clamav-devel/CMakeLists.txt"
useVcpkgToolchainFile: true
cmakeAppendedArgs: '-A x64 -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DENABLE_EXAMPLES=ON -DENABLE_STATIC_LIB=ON -- -v'
cmakeBuildType: "${{ env.BUILD_TYPE }}"
vcpkgTriplet: ${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_TRIPLET_OUT }}
buildDirectory: "${{runner.workspace}}/build"

- name: Test
working-directory: ${{runner.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{ env.BUILD_TYPE }} -V

- name: Create Installer
working-directory: ${{runner.workspace}}/build
run: cpack -C ${{ env.BUILD_TYPE }}

build-macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v1

- name: Install Build Tools
run: brew install bison flex

- name: Install Dependencies
run: brew install bzip2 check curl-openssl json-c libxml2 ncurses [email protected] pcre2 zlib

- uses: lukka/get-cmake@latest

- name: Create Build Directory
shell: bash
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run:
cmake ${{runner.workspace}}/clamav-devel -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DOPENSSL_ROOT_DIR=/usr/local/opt/[email protected]/
-DOPENSSL_CRYPTO_LIBRARY=/usr/local/opt/[email protected]/lib/libcrypto.1.1.dylib
-DOPENSSL_SSL_LIBRARY=/usr/local/opt/[email protected]/lib/libssl.1.1.dylib
-DENABLE_STATIC_LIB=ON
-DENABLE_EXAMPLES=ON

- name: Build
shell: bash
working-directory: ${{runner.workspace}}/build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config ${{ env.BUILD_TYPE }}

- name: Test
shell: bash
working-directory: ${{runner.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{ env.BUILD_TYPE }} -V

build-ubuntu:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Install Build Tools
run: sudo apt-get install -y bison flex valgrind

- name: Install Dependencies
run: sudo apt-get install -y check libbz2-dev libcurl4-openssl-dev libjson-c-dev libmilter-dev libncurses5-dev libpcre3-dev libssl-dev libxml2-dev zlib1g-dev

- uses: lukka/get-cmake@latest

- name: Create Build Directory
shell: bash
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run:
cmake ${{runner.workspace}}/clamav-devel -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DENABLE_STATIC_LIB=ON
-DENABLE_EXAMPLES=ON

- name: Build
shell: bash
working-directory: ${{runner.workspace}}/build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config ${{ env.BUILD_TYPE }}

- name: Test
shell: bash
working-directory: ${{runner.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{ env.BUILD_TYPE }} -V
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ install_manifest.txt
compile_commands.json
CTestTestfile.cmake

# Python
__pycache__/
*.py[cod]
*$py.class

# Ninja
.ninja_deps
.ninja_log
Expand Down Expand Up @@ -238,9 +243,7 @@ ipch/
ClamAV.VC.db
libclamav.pc
clamav-config.h
!win32/clamav-config.h
platform.h
!win32/platform.h
/target.h
libclamav/c++/FileCheck
libclamav/c++/count
Expand Down
Loading