Nightly 3rdparty update #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | |
# | |
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only | |
name: Nightly 3rdparty update | |
on: | |
schedule: | |
- cron: "0 3 * * *" | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Install dependencies on Ubuntu | |
run: | | |
sudo apt update -qq | |
sudo apt install rsync -y | |
- name: Checkout KDDW | |
uses: actions/checkout@v4 | |
- name: Checkout KDBindings | |
uses: actions/checkout@v4 | |
with: | |
repository: KDAB/KDBindings | |
path: KDBindings | |
ref: main | |
- name: Checkout ci-release-tools | |
uses: actions/checkout@v4 | |
with: | |
repository: KDABLabs/ci-release-tools | |
path: ci-release-tools | |
ref: main | |
- name: setup author | |
run: | | |
git config --global user.email "@" | |
git config --global user.name "update-3rdparty (via Github Actions)" | |
- name: sync KDBindings | |
run: | | |
rsync -av --delete --exclude sha1.txt ./KDBindings/src/kdbindings/ src/3rdparty/kdbindings/ | |
rm src/3rdparty/kdbindings/CMakeLists.txt | |
if git diff --quiet src/3rdparty/kdbindings ; then | |
exit 0 | |
fi | |
(cd KDBindings/ && git rev-parse HEAD) > src/3rdparty/kdbindings/sha1.txt | |
NEW_BRANCH_NAME=work/bump_kdbindings_`cat src/3rdparty/kdbindings/sha1.txt` | |
cat src/3rdparty/kdbindings/sha1.txt | |
git checkout -B ${NEW_BRANCH_NAME} | |
git add src/3rdparty/kdbindings/ | |
git commit -m "Bump 3rdparty/kdbindings" | |
git push origin ${NEW_BRANCH_NAME} | |
gh pr create --title "Bump 3rdparty/kdbindings" -R KDAB/KDDockWidgets -B main -b "Bump 3rdparty/kdbindings" | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: sync nlohmann | |
run: | | |
LATEST_NLOHMANN=`./ci-release-tools/src/gh_utils.py --get-latest-release=nlohmann/json` | |
NEW_BRANCH_NAME=work/bump_nlohmann_${LATEST_NLOHMANN} | |
wget https://github.com/nlohmann/json/releases/download/${LATEST_NLOHMANN}/json.hpp -O src/3rdparty/nlohmann/nlohmann/json.hpp | |
echo $LATEST_NLOHMANN > src/3rdparty/nlohmann/nlohmann/sha1.txt | |
git add src/3rdparty/nlohmann/nlohmann/ | |
! git diff --staged --quiet || exit 0 | |
git checkout -B ${NEW_BRANCH_NAME} | |
git add src/3rdparty/nlohmann/ | |
git commit -m "Bump 3rdparty/nlohmann" | |
git push origin ${NEW_BRANCH_NAME} | |
gh pr create --title "Bump 3rdparty/nlohmann" -R KDAB/KDDockWidgets -B main -b "Bump 3rdparty/nlohmann" | |
env: | |
GH_TOKEN: ${{ github.token }} |