Skip to content

Commit

Permalink
fix: issues on ci.yml and style.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuelbert committed Nov 1, 2024
1 parent 6e02042 commit 95cb9be
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 99 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ jobs:
os: [ubuntu-latest, ubuntu-22.04]
generator:
- Ninja
compiler: g++-10
ccompiler: gcc-10
compiler:
- g++-10
ccompiler:

Check failure on line 151 in .github/workflows/ci.yml

View check run for this annotation

Trunk.io / Trunk Check

codespell(misspelled)

[new] ccompiler ==> compiler, c compiler
- gcc-10
build_type:
- Debug
qt_version: [6.7.2]
Expand Down Expand Up @@ -287,7 +289,7 @@ jobs:
compiler: clang++-14
ccompiler: clang-14
clang-tidy: ""
generator: Unix Makefiles
generator: Ninja
- name: windows-latest-cl.exe
os: windows-latest
build_type: Release
Expand Down Expand Up @@ -349,8 +351,8 @@ jobs:
ninja-build \
ccache
echo "CCACHE_DIR=${{github.workspace}}/ccache" >> "$GITHUB_ENV"
echo "CXX=clang++-12" >> "$GITHUB_ENV"
echo "CC=clang-12" >> "$GITHUB_ENV"
echo "CXX=${{matrix.compiler}}" >> "$GITHUB_ENV"
echo "CC=${{matrix.ccompiler}}" >> "$GITHUB_ENV"

Check failure on line 355 in .github/workflows/ci.yml

View check run for this annotation

Trunk.io / Trunk Check

codespell(misspelled)

[new] ccompiler ==> compiler, c compiler
- name: ⚙️ 🍎 Install macos dependencies
if: runner.os == 'macOS'
env:
Expand Down Expand Up @@ -399,8 +401,6 @@ jobs:
uses: jurplel/install-qt-action@f03f05556819ceb3781ee2f455ec44c339d683c0 # v4.0.0
with:
version: ${{ env.QT_VERSION }}
# host: ${{ runner.os }}

target: ${{ env.QT_TARGET }}
arch: ${{ matrix.qt_arch }}
dir: "${{ github.workspace }}/build/"
Expand Down
152 changes: 60 additions & 92 deletions .github/workflows/styles.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,53 @@
---
name: Style

on:
push:
branches: [main, develop, release]

paths-ignore:
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- 'docker/**'
- '**.md'
- '!docs/building-cmake.md'
- 'changelog.txt'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/styles.yml'
- 'snap/**'
- 'build/**'
- 'assets/**'
- 'Docker/**'
- 'report/**'
- 'resources/**'

- docs/**
- .github/ISSUE_TEMPLATE/**
- docker/**
- "**.md"
- "!docs/building-cmake.md"
- changelog.txt
- LICENSE
- .github/**
- "!.github/workflows/styles.yml"
- snap/**
- build/**
- assets/**
- Docker/**
- report/**
- resources/**
pull_request:
types: [opened, reopened]
paths-ignore:
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- 'docker/**'
- '**.md'
- '!docs/building-cmake.md'
- 'changelog.txt'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/styles.yml'
- 'snap/**'
- 'build/**'
- 'assets/**'
- 'Docker/**'
- 'report/**'
- 'resources/**'

- docs/**
- .github/ISSUE_TEMPLATE/**
- docker/**
- "**.md"
- "!docs/building-cmake.md"
- changelog.txt
- LICENSE
- .github/**
- "!.github/workflows/styles.yml"
- snap/**
- build/**
- assets/**
- Docker/**
- report/**
- resources/**
release:
types: [published]

env:
SOURCE_CACHE: ${{ github.workspace }}/src
QT_VERSION: 6.2.0
SOURCE_CACHE: ${{ github.workspace }}apps/
QT_VERSION: 6.7.2
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
PRODUCT: jmbde
targetName: jmbde

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
os: [ubuntu-latest]
Expand All @@ -67,45 +59,29 @@ jobs:
cc: [clang-12]
cxx: [clang-12]
fail-fast: true

steps:
- name: '🧰 Checkout Source Code'
if: github.event_name == 'push'
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: master

- name: '🧰 Checkout Source Code'
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: 🧰 Checkout Source Code
# Checkout the repository to the GitHub Actions runner

uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/cache@v2
with:
path: '**/src'
key: ${{ github.workflow }}-src-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake')
}}

key: ${{ github.workflow }}-src-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: '⚙️ Install dependencies'
run: |
sudo apt-get -y -qq update
sudo apt-get -y --no-install-recommends install \
ninja-build
- name: '⚙️ install python dependencies'
run: |
pipx install conan
- name: '⚙️ Cache Qt'
id: cache-qt
uses: actions/cache@v1 # not v2!
with:
path: '${{ github.workspace }}/Qt'
key: QtCache-${{ matrix.platform }}-{{ matrix.arch }}-${{ env.QT_VERSION }}

- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v2
with:
Expand All @@ -114,20 +90,18 @@ jobs:
arch: ${{ matrix.qt_arch }}
# modules: 'qtscript'
cached: ${{ steps.cache-qt.outputs.cache-hit }}

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build

run: cmake -E make_directory ${{githubt.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx}}
working-directory: ${{runner.workspace}}/build
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
Expand All @@ -136,22 +110,19 @@ jobs:
-G ${{matrix.config.generator}} \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DENABLE_CLANG_FORMAT=ON
- name: Build
working-directory: ${{runner.workspace}}/build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build . \
--config ${{ env.BUILD_TYPE }} \
-j$(nproc)
# Run only on linux
- name: Validate QML and JavaScript files
uses: liri-infra/qmllint-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: SQL Check
uses: yokawasa/action-sqlcheck@v1.3.0
id: sqlcheck
Expand All @@ -166,18 +137,15 @@ jobs:
schema
directories: |
src/models
- name: Get SQL CHECK output
if: steps.sqlcheck.outputs.issue-found
run: echo "Issues found in previous step"

- name: Clang Format
uses: DoozyX/clang-format-lint-action@v0.13
with:
source: './src'
clangFormatVersion: 12
inplace: True

- uses: EndBug/add-and-commit@v9
with:
author_name: Clang Robot
Expand All @@ -186,24 +154,24 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: PMD Code Analyzer Action
# uses: billyan2018/setup-pmd@PMDAnalyzer1.0
# run: pmd -d ./src -R category/apex/design.xml -f text

# - name: Check_for_duplicate_code
# uses: platisd/duplicate-code-detection-tool@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# directories: 'src'
# # Ignore the specified directories
# ignore_directories: 'src/3rd-party'
# # Only examine .h and .cpp files
# file_extensions: 'h, cpp'
# # Only report similarities above 5%
# ignore_below: 5
# # If a file is more than 70% similar to another, then the job fails
# fail_above: 70
# # If a file is more than 15% similar to another, show a warning symbol in the report
# warn_above: 15
# # Remove `src/` from the file paths when reporting similarities
# project_root_dir: 'src'
# - name: PMD Code Analyzer Action
# uses: billyan2018/setup-pmd@PMDAnalyzer1.0
# run: pmd -d ./src -R category/apex/design.xml -f text

# - name: Check_for_duplicate_code
# uses: platisd/duplicate-code-detection-tool@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# directories: 'src'
# # Ignore the specified directories
# ignore_directories: 'src/3rd-party'
# # Only examine .h and .cpp files
# file_extensions: 'h, cpp'
# # Only report similarities above 5%
# ignore_below: 5
# # If a file is more than 70% similar to another, then the job fails
# fail_above: 70
# # If a file is more than 15% similar to another, show a warning symbol in the report
# warn_above: 15
# # Remove `src/` from the file paths when reporting similarities
# project_root_dir: 'src'

0 comments on commit 95cb9be

Please sign in to comment.