Compare commits
38 Commits
size-t-mac
...
dc63b5bb59
| Author | SHA1 | Date | |
|---|---|---|---|
| dc63b5bb59 | |||
| 65a2de7025 | |||
| b01f0d9807 | |||
| ebed40b93d | |||
| 1e4c5b630c | |||
| 827c44ba88 | |||
| 7fbd3fb29a | |||
| 2fbc59be7f | |||
| 9fce46386b | |||
| 5235205167 | |||
| 2be3544cd2 | |||
| 7448e23bb0 | |||
| a933bcfd7a | |||
| cb7f03cfaf | |||
| e8d9fc284d | |||
| f777317406 | |||
| 496d558574 | |||
| d8fcced921 | |||
| 5bfc44d46c | |||
| eb3c9ac653 | |||
| eda1dcc4be | |||
| d56772a8c0 | |||
| acd19b5467 | |||
| c7e76a7945 | |||
| 97b76dce3f | |||
| 22740f3841 | |||
| 49305e089f | |||
| 0c3f21f16b | |||
| d48053750c | |||
| 59a05063a8 | |||
| 0f5768f436 | |||
| 39f2fc317e | |||
| 69e26738f3 | |||
| 0cbeece3ef | |||
| d0b8138dc9 | |||
| 26ee290c24 | |||
| 1dfefb70c7 | |||
| 74baee0ef7 |
64
.github/workflows/build-alpine.yml
vendored
Normal file
64
.github/workflows/build-alpine.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
name: Build Alpine Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
PKG_VERSION: "2.2.0"
|
||||||
|
PKG_RELEASE: "1"
|
||||||
|
ABSEIL_VERSION: "20230125.3"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-alpine:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: node:current-alpine
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Git
|
||||||
|
run: |
|
||||||
|
apk add --no-cache git
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install Alpine Packaging Dependencies
|
||||||
|
run: |
|
||||||
|
apk update
|
||||||
|
apk add alpine-sdk cmake clang llvm linux-headers
|
||||||
|
|
||||||
|
- name: Build Static Abseil
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/abseil/abseil-cpp.git
|
||||||
|
cd abseil-cpp
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
|
-DABSL_BUILD_TESTING=OFF \
|
||||||
|
-DABSL_USE_GOOGLETEST_HEAD=OFF \
|
||||||
|
-DCMAKE_CXX_STANDARD=17 \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
..
|
||||||
|
make -j$(nproc)
|
||||||
|
make install
|
||||||
|
|
||||||
|
- name: Build Alpine Package
|
||||||
|
run: |
|
||||||
|
mkdir -p alpine_build && cd alpine_build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DUSE_CLANG=ON \
|
||||||
|
-DBUILD_STATIC=ON \
|
||||||
|
..
|
||||||
|
make
|
||||||
|
# Example packaging command; adjust according to your packaging scripts
|
||||||
|
make apk
|
||||||
|
|
||||||
|
- name: Upload Alpine Package
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cpu-check-alpine
|
||||||
|
path: alpine_build/*.apk
|
||||||
85
.github/workflows/build-debian.yml
vendored
Normal file
85
.github/workflows/build-debian.yml
vendored
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
name: Build Debian Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
PKG_VERSION: "2.2.0"
|
||||||
|
PKG_RELEASE: "1"
|
||||||
|
ABSEIL_VERSION: "20230125.3"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-debian:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y build-essential cmake clang checkinstall zlib1g-dev musl-tools libstdc++-11-dev libgcc-11-dev libc6-dev
|
||||||
|
|
||||||
|
- name: Build Static Abseil
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/abseil/abseil-cpp.git
|
||||||
|
cd abseil-cpp
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
|
-DABSL_BUILD_TESTING=OFF \
|
||||||
|
-DABSL_USE_GOOGLETEST_HEAD=OFF \
|
||||||
|
-DCMAKE_CXX_STANDARD=17 \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
..
|
||||||
|
make -j$(nproc)
|
||||||
|
make install
|
||||||
|
ldconfig
|
||||||
|
|
||||||
|
- name: Configure the project
|
||||||
|
run: |
|
||||||
|
mkdir build; cd build
|
||||||
|
CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DUSE_CLANG=ON \
|
||||||
|
-DBUILD_STATIC=ON \
|
||||||
|
..
|
||||||
|
|
||||||
|
- name: Build the project
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
make
|
||||||
|
|
||||||
|
- name: Create Debian Package
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
sudo checkinstall --pkgname=cpu-check \
|
||||||
|
--pkgversion=${{ env.PKG_VERSION }} \
|
||||||
|
--pkgrelease=${{ env.PKG_RELEASE }} \
|
||||||
|
--maintainer="maintainer@example.com" \
|
||||||
|
--requires="" \
|
||||||
|
--default \
|
||||||
|
--pakdir=. \
|
||||||
|
--backup=no \
|
||||||
|
--deldoc=yes \
|
||||||
|
--deldesc=yes \
|
||||||
|
--delspec=yes \
|
||||||
|
make install
|
||||||
|
|
||||||
|
- name: Upload Debian Package
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cpu-check-deb
|
||||||
|
path: build/*.deb
|
||||||
|
|
||||||
|
- name: Upload to Gitea Package Registry
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||||
|
run: |
|
||||||
|
curl --user "eric:df299a6e592a8bd829d018b7816e76d03756408d" \
|
||||||
|
--upload-file build/cpu-check_${{ env.PKG_VERSION }}-${{ env.PKG_RELEASE }}_amd64.deb \
|
||||||
|
"https://git.ericxliu.me/api/packages/eric/debian/pool/bionic/main/upload"
|
||||||
43
.gitignore
vendored
Normal file
43
.gitignore
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# CMake build directories
|
||||||
|
build/
|
||||||
|
CMakeFiles/
|
||||||
|
CMakeCache.txt
|
||||||
|
cmake_install.cmake
|
||||||
|
compile_commands.json
|
||||||
|
CTestTestfile.cmake
|
||||||
|
Testing/
|
||||||
|
_deps/
|
||||||
|
|
||||||
|
# Compiled files
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
*.exe
|
||||||
|
*.out
|
||||||
|
*.app
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# IDE specific files
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
Makefile
|
||||||
|
*.make
|
||||||
|
*.cmake
|
||||||
|
!CMakeLists.txt
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
_deps/
|
||||||
|
vcpkg_installed/
|
||||||
|
|
||||||
|
# Debug symbols
|
||||||
|
*.pdb
|
||||||
|
*.dSYM/
|
||||||
|
|
||||||
|
# Generated documentation
|
||||||
|
docs/_build/
|
||||||
Reference in New Issue
Block a user