From 095dd1ce5f728e2aec9e06f0f21a2f3b940ff1d0 Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Sat, 9 Nov 2024 18:59:13 +0100 Subject: [PATCH] ci: add spdlog v1.15.0 Signed-off-by: Christoph Heiss --- .github/workflows/spdlog.yaml | 89 +++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 .github/workflows/spdlog.yaml diff --git a/.github/workflows/spdlog.yaml b/.github/workflows/spdlog.yaml new file mode 100644 index 0000000..4dbcdfe --- /dev/null +++ b/.github/workflows/spdlog.yaml @@ -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