Files
cpu-check/.github/workflows/build.yml
Eric Liu eb3c9ac653
Some checks failed
Build / build (push) Has been cancelled
Modify build workflow to disable static build and update Abseil library dependency
Change CMake configuration to build dynamic libraries and update the required Abseil library package to libabsl20220623t64
2025-01-28 06:51:29 +00:00

68 lines
2.0 KiB
YAML

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
PKG_VERSION: "2.0.0"
PKG_RELEASE: "1"
jobs:
build:
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 libabsl-dev clang checkinstall
- name: Create build directory
run: mkdir build
- name: Configure the project
run: |
cd build
CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DUSE_CLANG=ON -DBUILD_STATIC=OFF ..
- 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="libabsl20220623t64" \
--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"