Compare commits

10 Commits

Author SHA1 Message Date
67aec7aa01 Bump project version to 2.2.0
All checks were successful
Build Alpine Package / build-alpine (push) Successful in 1m49s
Build Debian Package / build-debian (push) Successful in 2m7s
- Update CMakeLists.txt project version from 20181130 to 2.2.0
- Align version number with current project development state
2025-02-01 07:22:08 +00:00
4ef3eec229 Add curl package for Gitea Alpine Package Registry upload
Some checks failed
Build Debian Package / build-debian (push) Successful in 2m3s
Build Alpine Package / build-alpine (push) Failing after 2m26s
- Install curl package in Alpine build workflow
- Ensure curl is available for package upload step
- Prepare for package registry upload with authentication
2025-02-01 07:11:38 +00:00
16d35c2a0e Add Gitea Alpine Package Registry upload step
Some checks failed
Build Debian Package / build-debian (push) Successful in 2m5s
Build Alpine Package / build-alpine (push) Failing after 2m14s
- Configure upload of Alpine package to personal Gitea package registry
- Add conditional upload step for master branch
- Use curl to upload package with authentication
2025-02-01 07:08:35 +00:00
372c43caea Add Alpine package build target and metadata generation
All checks were successful
Build Debian Package / build-debian (push) Successful in 2m3s
Build Alpine Package / build-alpine (push) Successful in 2m6s
- Create CMake target for generating Alpine package (apk)
- Add APKBUILD metadata generation in GitHub workflow
- Configure package details including version, description, and dependencies
- Streamline Alpine package creation process
2025-02-01 07:02:59 +00:00
06a0b682c0 Update system header includes in fvt_controller.cc
Some checks failed
Build Alpine Package / build-alpine (push) Failing after 1m53s
Build Debian Package / build-debian (push) Successful in 1m57s
- Remove deprecated <error.h> include
- Add <system_error> for std::system_error
- Add <cerrno> for errno handling
- Streamline and modernize system header includes
2025-02-01 06:59:33 +00:00
31077367bb Add musl-dev to Alpine build workflow dependencies
Some checks failed
Build Alpine Package / build-alpine (push) Failing after 1m46s
Build Debian Package / build-debian (push) Successful in 1m56s
- Include musl-dev package in Alpine build environment
- Ensure complete set of development dependencies for compilation
2025-02-01 06:54:52 +00:00
b9f6ef50af Add fallback for cache line size detection
Some checks failed
Build Alpine Package / build-alpine (push) Failing after 1m50s
Build Debian Package / build-debian (push) Successful in 1m58s
- Provide default cache line size for systems without _SC_LEVEL1_DCACHE_LINESIZE
- Set default to 64 bytes, which is common on x86_64 architectures
- Improve portability of cache line size detection
2025-02-01 06:52:15 +00:00
79c652cd7c Add OpenSSL development dependencies to Alpine build workflow
Some checks failed
Build Alpine Package / build-alpine (push) Failing after 1m59s
Build Debian Package / build-debian (push) Successful in 2m6s
- Include openssl-dev and openssl-libs-static packages
- Expand build environment dependencies for static library compilation
2025-02-01 06:48:24 +00:00
8c965a25e2 Add zlib development dependencies to Alpine build workflow
Some checks failed
Build Alpine Package / build-alpine (push) Failing after 1m51s
Build Debian Package / build-debian (push) Successful in 1m54s
- Include zlib-dev and zlib-static packages in build environment
- Ensure complete set of dependencies for static library compilation
2025-02-01 06:44:08 +00:00
b01131eaee Update Alpine package build workflow naming
- Clarify step names for cpu-check Alpine package build and upload
- Improve workflow readability without changing core functionality
2025-02-01 06:41:48 +00:00
4 changed files with 46 additions and 7 deletions

View File

@@ -29,7 +29,7 @@ jobs:
- name: Install Alpine Packaging Dependencies
run: |
apk update
apk add alpine-sdk cmake clang llvm linux-headers
apk add alpine-sdk cmake clang llvm linux-headers zlib-dev zlib-static openssl-dev openssl-libs-static musl-dev
- name: Build Static Abseil
run: |
@@ -46,7 +46,7 @@ jobs:
make -j$(nproc)
make install
- name: Build Alpine Package
- name: Build cpu-check Alpine Package
run: |
mkdir -p alpine_build && cd alpine_build
cmake -DCMAKE_BUILD_TYPE=Release \
@@ -54,11 +54,35 @@ jobs:
-DBUILD_STATIC=ON \
..
make
# Example packaging command; adjust according to your packaging scripts
# Create package metadata
mkdir -p pkg/APKBUILD
cat > pkg/APKBUILD/APKBUILD << EOF
# Contributor: Maintainer <maintainer@example.com>
# Maintainer: Maintainer <maintainer@example.com>
pkgname=cpu-check
pkgver=${{ env.PKG_VERSION }}
pkgrel=${{ env.PKG_RELEASE }}
pkgdesc="CPU validation and stress testing tool"
url="https://github.com/google/cpu-check"
arch="x86_64"
license="Apache-2.0"
depends=""
makedepends="cmake clang llvm linux-headers zlib-dev zlib-static openssl-dev openssl-libs-static musl-dev"
source=""
options="!check"
EOF
make apk
- name: Upload Alpine Package
- name: Upload cpu-check Alpine Package
uses: actions/upload-artifact@v3
with:
name: cpu-check-alpine
path: alpine_build/*.apk
path: alpine_build/*.apk
- name: Upload to Gitea Alpine Package Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
apk add --no-cache curl
curl --user "eric:df299a6e592a8bd829d018b7816e76d03756408d" \
--upload-file alpine_build/cpu-check-${{ env.PKG_VERSION }}-r${{ env.PKG_RELEASE }}.apk \
"https://git.ericxliu.me/api/packages/eric/alpine/v3.17/main"

View File

@@ -13,7 +13,7 @@
# limitations under the License.
cmake_minimum_required (VERSION 3.2)
project (cpu_check VERSION 20181130 LANGUAGES C CXX)
project (cpu_check VERSION 2.2.0 LANGUAGES C CXX)
# Options
# Use clang/llvm by default.
@@ -136,3 +136,12 @@ target_link_libraries(silkscreen utils)
target_link_libraries(cpu_check avx compressor crc32c crypto fvt_controller hasher malign_buffer pattern_generator silkscreen utils)
install (TARGETS cpu_check DESTINATION bin)
# Alpine package target
add_custom_target(apk
COMMAND mkdir -p "${CMAKE_BINARY_DIR}/pkg/usr/bin"
COMMAND cp "${CMAKE_BINARY_DIR}/cpu_check" "${CMAKE_BINARY_DIR}/pkg/usr/bin/"
COMMAND cd "${CMAKE_BINARY_DIR}" && tar -czf "cpu-check-${PROJECT_VERSION}-r$ENV{PKG_RELEASE}.apk" -C pkg .
DEPENDS cpu_check
COMMENT "Creating Alpine package"
)

View File

@@ -15,12 +15,13 @@
#include "config.h"
#include "fvt_controller.h"
#include <error.h>
#include <fcntl.h>
#include <math.h>
#include <stdint.h>
#include <atomic>
#include <system_error> // for std::system_error
#include <cerrno> // for errno
#undef NDEBUG
#include <cassert>
#include <cstring>

View File

@@ -127,7 +127,12 @@ void MalignBuffer::InitializeMemoryForSanitizer(char *addr, size_t size) {
}
const size_t MalignBuffer::kPageSize = sysconf(_SC_PAGESIZE);
#ifdef _SC_LEVEL1_DCACHE_LINESIZE
const size_t MalignBuffer::kCacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
#else
// Default to 64 bytes which is common on x86_64
const size_t MalignBuffer::kCacheLineSize = 64;
#endif
std::string MalignBuffer::ToString(CopyMethod m) {
switch (m) {