Skip to content

Commit

Permalink
chore(ci): fix spdlog version + update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
EmixamPP committed Jun 14, 2024
1 parent 18f3e14 commit 2c7928d
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ jobs:
uses: actions/cache@v4
with:
path: .github/workflows/deps/install_dir
key: ${{ env.OPENCV_GIT_TAG }}-${{ env.YAML_GIT_TAG }}-${{ env.ARGPARSE_GIT_TAG }}
key: ${{ env.OPENCV_GIT_TAG }}-${{ env.YAML_GIT_TAG }}-${{ env.ARGPARSE_GIT_TAG }}-${{ env.SPDLOG_GIT_TAG }}

- name: Build lib dependencis
if: ${{ steps.deps-cache.outputs.cache-hit != 'true' }}
run: |
cd .github/workflows/deps
cmake . -B build -GNinja \
-DOPENCV_GIT_TAG=${{ env.OPENCV_GIT_TAG }} -DYAML_GIT_TAG=${{ env.YAML_GIT_TAG }} -DARGPARSE_GIT_TAG=${{ env.ARGPARSE_GIT_TAG }}
-DOPENCV_GIT_TAG=${{ env.OPENCV_GIT_TAG }} \
-DYAML_GIT_TAG=${{ env.YAML_GIT_TAG }} \
-DARGPARSE_GIT_TAG=${{ env.ARGPARSE_GIT_TAG }} \
-DSPDLOG_GIT_TAG=${{ env.SPDLOG_GIT_TAG }}
ninja -C build
cd -
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/depend-argparse.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update YAML
name: Update argparse
on:
workflow_dispatch:
schedule:
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:
branch: "argparse-${{ env.VERSION }}"
commit-message: "chore(ci): update argparse to ${{ env.VERSION }}"
body: |
Update YAML to ${{ env.VERSION }}.
Update argparse to ${{ env.VERSION }}.
This PR has been created automatically.
committer: github-actions[bot] <[email protected]>
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/depend-spdlog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update spdlog
on:
workflow_dispatch:
schedule:
- cron: '0 7 * * *'

jobs:
update-yaml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Fetch release version
env:
GITHUB_TOKEN: ${{ github.token }}
OWNER: gabine
REPO: spdlog
run: |
VERSION=$(gh api "/repos/$OWNER/$REPO/releases/latest" --jq ".tag_name")
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Modify file if new version
run: |
sed -E -i "s@(SPDLOG_GIT_TAG=\s+\")(v[0-9]+\.[0-9]+\.[0-9]+)(\")@\1$VERSION\3@" .github/workflows/deps/version.env
- name: Create PR if new version
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT }}
title: "chore(ci): update spdlog to ${{ env.VERSION }}"
branch: "spdlog-${{ env.VERSION }}"
commit-message: "chore(ci): update spdlog to ${{ env.VERSION }}"
body: |
Update spdlog to ${{ env.VERSION }}.
This PR has been created automatically.
committer: github-actions[bot] <[email protected]>
author: github-actions[bot] <[email protected]>
assignees: "EmixamPP"
labels: dependencies
delete-branch: true
2 changes: 1 addition & 1 deletion .github/workflows/deps/version.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OPENCV_GIT_TAG="4.9.0"
YAML_GIT_TAG="0.8.0"
ARGPARSE_GIT_TAG="v3.0"
SPDLOG_GIT_TAG="1.14.1"
SPDLOG_GIT_TAG="v1.14.1"

0 comments on commit 2c7928d

Please sign in to comment.