This commit is contained in:
Vladislav Nepogodin 2022-11-20 04:15:24 +04:00
parent 3391c0cb20
commit 615fa43590
No known key found for this signature in database
GPG Key ID: B62C3D10C54D5DA9
4 changed files with 106 additions and 1 deletions

View File

@ -13,6 +13,6 @@ PointerAlignment: Left
FixNamespaceComments: true FixNamespaceComments: true
SpaceBeforeCpp11BracedList: false SpaceBeforeCpp11BracedList: false
SpacesBeforeTrailingComments: 2 SpacesBeforeTrailingComments: 2
Standard: c++17 Standard: c++20
TabWidth: 4 TabWidth: 4
UseTab: Never UseTab: Never

41
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
BUILD_TYPE: Debug
CTEST_OUTPUT_ON_FAILURE: 1
jobs:
build:
name: Build
runs-on: ubuntu-latest
container: archlinux
steps:
- uses: actions/checkout@v3
- name: install deps
run: |
sudo pacman -Syu --noconfirm
shell: bash
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCOS_INSTALLER_BUILD_TESTS=ON
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
run: ./tests/test-initcpio

52
.github/workflows/checks.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: Checks
on:
push:
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- 'LICENSE'
branches:
- master
pull_request:
branches:
- master
concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: true
jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug
- uses: cpp-linter/cpp-linter-action@v2.2.4
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
version: '14'
database: ${{github.workspace}}/build
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: |
echo "Some files failed the linting checks!"
# for actual deployment
# run: exit 1
check_clang_format:
name: "Check C++ style"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@v4.9.0
with:
clang-format-version: '14'
check-path: 'src'

12
.github/workflows/labeler.yml vendored Normal file
View File

@ -0,0 +1,12 @@
name: "PR Labeler"
on:
- pull_request_target
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"