Integrate Free Quests system CPP and refactor quest handling #84
This file contains hidden or 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
--- | |
name: CMake-format | |
on: | |
pull_request: | |
paths: | |
- "**/CMakeLists.txt" | |
- "**/*.cmake" | |
- "cmake/**" | |
merge_group: | |
push: | |
paths: | |
- "**/CMakeLists.txt" | |
- "**/*.cmake" | |
- "cmake/**" | |
- .github/workflows/cmake-lint.yml | |
jobs: | |
cancel-runs: | |
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git | |
if: ${{ github.ref != 'refs/heads/main' }} | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "GitHub Actions" | |
- name: Actions checkout | |
if: ${{ github.ref != 'refs/heads/main' }} | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Python | |
if: ${{ github.ref != 'refs/heads/main' }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install cmake-format and cmake-lint | |
if: ${{ github.ref != 'refs/heads/main' }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install cmakelang PyYAML | |
- name: Run cmake-format | |
if: ${{ github.ref != 'refs/heads/main' }} | |
run: | | |
find . -name "CMakeLists.txt" -o -name "*.cmake" | grep -v build/ | grep -v vcpkg_installed/ | xargs cmake-format -i | |
- name: Run cmake-lint | |
if: ${{ github.ref != 'refs/heads/main' }} | |
run: | | |
find . -name "CMakeLists.txt" -o -name "*.cmake" | grep -v build/ | grep -v vcpkg_installed/ | xargs cmake-lint || true | |
- name: Run add and commit | |
if: ${{ github.ref != 'refs/heads/main' }} | |
uses: EndBug/[email protected] | |
with: | |
author_name: GitHub Actions | |
author_email: github-actions[bot]@users.noreply.github.com | |
message: "Code format - (CMake-format)" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |