Merge pull request #1 from F-WuTS/spdlog

add spdlog
This commit is contained in:
Christoph Heiss 2024-11-09 19:03:19 +01:00 committed by GitHub
commit c373be2c41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

89
.github/workflows/spdlog.yaml vendored Normal file
View file

@ -0,0 +1,89 @@
name: spdlog
on:
push:
branches:
- master
paths:
- .github/workflows/spdlog.yaml
pull_request:
paths:
- .github/workflows/spdlog.yaml
jobs:
build-deb:
strategy:
matrix:
platform:
- runner-group: arm64
dpkg: arm64
runs-on:
group: ${{ matrix.platform.runner-group }}
container:
image: node:22-bookworm
steps:
- name: Checkout spdlog
uses: actions/checkout@v4
with:
repository: gabime/spdlog
ref: v1.15.0
- name: Fix git safe.directory
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Install prerequisites
run: |
apt update
apt install -y build-essential cmake g++
- name: Build package
run: |
mkdir -p build
cd build
cmake -B . -S .. \
-DCMAKE_BUILD_TYPE=Release \
-DSPDLOG_BUILD_EXAMPLE=OFF \
-DCPACK_OUTPUT_FILE_PREFIX=../_packages \
-DCPACK_DEBIAN_PACKAGE_RELEASE=compair1
cmake --build . -- -j2
cpack -G DEB --build .
- name: Print packages contents
run: |
for f in _packages/*.deb; do
echo "$f:"
dpkg-deb -c "$f"
echo
done
- name: Print packages control info
run: |
for f in _packages/*.deb; do
echo "$f:"
dpkg-deb -e "$f"
cat DEBIAN/control
echo
done
- name: Upload deb as artifact
uses: actions/upload-artifact@v4
with:
name: spdlog_${{ matrix.platform.dpkg }}
path: _packages/*
if-no-files-found: error
overwrite: true
- name: Push deb to compREP
uses: cpina/github-action-push-to-another-repository@main
if: github.ref == 'refs/heads/master'
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: "_packages/"
target-directory: "debs/spdlog/"
destination-github-username: "F-WuTS"
destination-repository-name: "compREP"
target-branch: master