[ci] Add dependency between changelog and build-conan ci #6
Workflow file for this run
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
name: Style | |
on: | |
pull_request: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
check_pr_commits: | |
name: Check commit messages | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: GS Commit Message Checker | |
# You may pin to the exact commit or the version. | |
# uses: GsActions/commit-message-checker@9d8708beab99f811c5fe3a4f98acc4b2f2ba8496 | |
uses: GsActions/commit-message-checker@v2 | |
with: | |
# A regex pattern to check if a commit message is valid. | |
pattern: "((\\[(changelog|ci|doc|docs|docker|test|tests|scp|review|refactor|scripts|git|cmake|build)\\])+(.)+)|(Review fixes)$" | |
# Expression flags change how the expression is interpreted. | |
flags: # optional, default is gm | |
# A error message which will be returned in case of an error. | |
error: "One of commit messages or PR title have incorrect formatting. Please read the documentation: https://github.com/ostis-ai/scp-machine/blob/main/CONTRIBUTING.md" | |
# Setting this input to true will exclude the Pull Request title from the check. | |
excludeTitle: true # optional, default is false | |
# Setting this input to true will exclude the Pull Request description from the check. | |
excludeDescription: true # optional, default is false | |
# Setting this input to true will check all Pull Request commits | |
checkAllCommitMessages: true # optional, default is false | |
# you must provide GITHUB_TOKEN to this input if checkAllCommitMessages is true | |
accessToken: ${{ secrets.GITHUB_TOKEN }} | |
check_formatting: | |
name: Check formatting | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Restore ccache caches | |
uses: hendrikmuhs/ccache-action@v1.2 | |
with: | |
key: ${{ github.job }} | |
- name: Conan cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.conan/data | |
key: conan-${{ runner.os }}-${{ hashFiles('**/conanfile.py') }} | |
- name: apt cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
/var/cache/apt/ | |
/var/lib/apt/ | |
key: apt-${{ runner.os }}-${{ github.job }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Set up pipx | |
run: | | |
python -m pip install --user pipx | |
python -m pipx ensurepath | |
- name: Set up Conan | |
run: | | |
pipx install cmake | |
pipx install conan | |
- name: Install compilers | |
run: sudo apt install build-essential ninja-build ccache | |
- name: Set Conan remote | |
run: | | |
conan profile detect | |
conan remote add ostis-ai https://conan.ostis.net/artifactory/api/conan/ostis-ai-sc-machine/ | |
- name: Install sc-machine | |
run: conan install . --build=missing | |
- name: Checking the code with clang | |
run: | | |
./scripts/clang/check_formatting.sh |