extra-packages/.github/workflows/spdlog.yaml
Christoph Heiss 5b5f9495cf
spdlog: compile with -fPIC
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2024-11-09 20:40:28 +01:00

90 lines
2.2 KiB
YAML

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 \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DSPDLOG_BUILD_EXAMPLE=OFF \
-DCPACK_OUTPUT_FILE_PREFIX=../_packages \
-DCPACK_DEBIAN_PACKAGE_RELEASE=compair2
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