Fixed freebsd build + added some ci basic checks, fixes #717
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
name: Basic Build (FreeBSD)
|
||||||
|
on: [pull_request]
|
||||||
|
jobs:
|
||||||
|
Build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build
|
||||||
|
uses: vmactions/freebsd-vm@v1.2.1
|
||||||
|
with:
|
||||||
|
usesh: true
|
||||||
|
prepare: |
|
||||||
|
pkg install -y cmake pkgconf boost-libs ffmpeg stb libconfig taglib libarchive xxhash wt googletest
|
||||||
|
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DBUILD_BENCHMARKS=OFF
|
||||||
|
make -j$(nproc)
|
||||||
|
make test
|
||||||
@@ -127,10 +127,12 @@ namespace lms::scanner
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
FileToScan fileToScan;
|
FileToScan fileToScan;
|
||||||
|
|
||||||
fileToScan.filePath = file.path();
|
fileToScan.filePath = file.path();
|
||||||
fileToScan.mediaLibrary = _mediaLibrary;
|
fileToScan.mediaLibrary = _mediaLibrary;
|
||||||
fileToScan.lastWriteTime.setTime_t(Wt::WDateTime{ std::chrono::file_clock::to_sys(file.last_write_time()) }.toTime_t()); // sec resolution, as stored in the database
|
{
|
||||||
|
const std::chrono::system_clock::time_point lastWriteTime{ std::chrono::time_point_cast<std::chrono::system_clock::duration>(std::chrono::file_clock::to_sys(file.last_write_time())) };
|
||||||
|
fileToScan.lastWriteTime.setTime_t(std::chrono::system_clock::to_time_t(lastWriteTime)); // sec resolution, as stored in the database
|
||||||
|
}
|
||||||
fileToScan.fileSize = file.file_size();
|
fileToScan.fileSize = file.file_size();
|
||||||
|
|
||||||
if (_fullScan || scanner->needsScan(fileToScan))
|
if (_fullScan || scanner->needsScan(fileToScan))
|
||||||
|
|||||||
Reference in New Issue
Block a user