From 7735cbac22a314e32216140906b91809ba3a6cdc Mon Sep 17 00:00:00 2001 From: "Andrew J.Swan" Date: Thu, 19 Sep 2024 13:44:45 +0300 Subject: [PATCH] Yaml lint (#334) * Create .yamlignore * Create .yamllint * Create workflow_yaml_lint.yml * Yaml Lint in AppVeyour * Yaml Lint in Freetype2 * Yaml Lint in Mediaportal * Yaml Lint in Mediaportal Jira * Yaml Lint in Mediaportal Release * Yaml Lint in Mediaportal Test Build * Yaml Lint in Pull Request Labeler * Yaml Lint in Workflow Milestone * Yaml Lint in Workflow Code Scanning - CodeQL * Yaml Lint in Workflow Size and Stability labels --- .github/labeler.yml | 17 ++-- .github/workflows/mediaportal.yml | 94 +++++++++---------- .github/workflows/mediaportal_jira.yml | 4 +- .github/workflows/mediaportal_release.yml | 8 +- .github/workflows/mediaportal_test_build.yml | 2 +- .github/workflows/workflow_codeql.yml | 82 ++++++++-------- .github/workflows/workflow_labeler.yml | 16 ++-- .github/workflows/workflow_milestone.yml | 2 +- .github/workflows/workflow_size_labels.yml | 4 +- .github/workflows/workflow_yaml_lint.yml | 23 +++++ .yamlignore | 2 + .yamllint | 19 ++++ .../freetype2/freetype2/.gitlab-ci.yml | 5 +- 13 files changed, 162 insertions(+), 116 deletions(-) create mode 100644 .github/workflows/workflow_yaml_lint.yml create mode 100644 .yamlignore create mode 100644 .yamllint diff --git a/.github/labeler.yml b/.github/labeler.yml index eb98f52bb45..52f0aff7cd1 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,12 +1,17 @@ critical: - - '(Critical|critical|Urgent|urgent)' + - '(Critical|critical|Urgent|urgent)' + enhancement: - - '(Enhancement|enhancement)' + - '(Enhancement|enhancement)' + Engine: - - '(Core|core)' + - '(Core|core)' + TV: - - '(TV|TVE)' + - '(TV|TVE)' + Tuning: - - '(Tuning|tuning)' + - '(Tuning|tuning)' + MPE: - - 'MPE' + - 'MPE' diff --git a/.github/workflows/mediaportal.yml b/.github/workflows/mediaportal.yml index 13952fe160e..59451437d47 100644 --- a/.github/workflows/mediaportal.yml +++ b/.github/workflows/mediaportal.yml @@ -3,7 +3,7 @@ name: Mediaportal on: push: # On Push to Master branch - branches: + branches: - master # Ignore all Tags / Release tags-ignore: @@ -26,62 +26,62 @@ jobs: build: strategy: matrix: - architecture: [x86, x64] + architecture: [x86, x64] name: Build Mediaportal runs-on: windows-2019 - + steps: - - name: Setup Visual Studio 2019 - uses: microsoft/setup-msbuild@v2 - with: - vs-version: 16.11 + - name: Setup Visual Studio 2019 + uses: microsoft/setup-msbuild@v2 + with: + vs-version: 16.11 - - name: Link to Visual Studio 2019 Community - run: | - mklink /J "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" - shell: cmd + - name: Link to Visual Studio 2019 Community + run: | + mklink /J "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" + shell: cmd - - name: Setup Java JDK - uses: actions/setup-java@v4 - with: - java-version: 8 - architecture: x86 - distribution: temurin + - name: Setup Java JDK + uses: actions/setup-java@v4 + with: + java-version: 8 + architecture: x86 + distribution: temurin - - name: Setup NSIS - run: | - choco install --yes nsis --version=3.09 --force + - name: Setup NSIS + run: | + choco install --yes nsis --version=3.09 --force - - name: Git Checkout - uses: actions/checkout@v4 + - name: Git Checkout + uses: actions/checkout@v4 - - name: Git Submodule Update - run: | - git submodule update --init --recursive + - name: Git Submodule Update + run: | + git submodule update --init --recursive - - name: Build - run: | - BuildFullinstaller.cmd LOG ${{ matrix.architecture }} - working-directory: ${{ github.workspace }}\Build - shell: cmd + - name: Build + run: | + BuildFullinstaller.cmd LOG ${{ matrix.architecture }} + working-directory: ${{ github.workspace }}\Build + shell: cmd - - name: Upload Artifact / Build result file - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: Build result file ${{ matrix.architecture }} - path: | - ${{ github.workspace }}\Build\BuildFullInstaller.log - retention-days: ${{ inputs.retention-logs || 3 }} + - name: Upload Artifact / Build result file + uses: actions/upload-artifact@v4 + if: ${{ always() }} + with: + name: Build result file ${{ matrix.architecture }} + path: | + ${{ github.workspace }}\Build\BuildFullInstaller.log + retention-days: ${{ inputs.retention-logs || 3 }} - - name: Upload Artifact / Mediaportal setup file - uses: actions/upload-artifact@v4 - if: ${{ success() }} - with: - name: Mediaportal setup file ${{ matrix.architecture }} - path: | - ${{ github.workspace }}\Release\MediaPortalSetup_*.exe - retention-days: ${{ inputs.retention-build || 90 }} - if-no-files-found: error + - name: Upload Artifact / Mediaportal setup file + uses: actions/upload-artifact@v4 + if: ${{ success() }} + with: + name: Mediaportal setup file ${{ matrix.architecture }} + path: | + ${{ github.workspace }}\Release\MediaPortalSetup_*.exe + retention-days: ${{ inputs.retention-build || 90 }} + if-no-files-found: error diff --git a/.github/workflows/mediaportal_jira.yml b/.github/workflows/mediaportal_jira.yml index 503ffab9207..56cb0bad0e7 100644 --- a/.github/workflows/mediaportal_jira.yml +++ b/.github/workflows/mediaportal_jira.yml @@ -3,11 +3,11 @@ name: Mediaportal / Jira on: push: # On Push to Master branch - branches: + branches: - 'MP1-**' # Ignore all Tags / Release tags-ignore: - - '**' + - '**' workflow_call: inputs: diff --git a/.github/workflows/mediaportal_release.yml b/.github/workflows/mediaportal_release.yml index cab8caf9ae1..9e61e6f4a96 100644 --- a/.github/workflows/mediaportal_release.yml +++ b/.github/workflows/mediaportal_release.yml @@ -10,15 +10,15 @@ jobs: build: name: Mediaportal Build uses: ./.github/workflows/mediaportal.yml - + release: name: Release Mediaportal needs: build permissions: contents: write - + runs-on: ubuntu-latest - + steps: - name: Download x86 Artifacts uses: actions/download-artifact@v4 @@ -53,7 +53,7 @@ jobs: needs: [build, release] permissions: security-events: write - + ci-status: name: Status runs-on: ubuntu-latest diff --git a/.github/workflows/mediaportal_test_build.yml b/.github/workflows/mediaportal_test_build.yml index 511199a3bd6..53d30c079a1 100644 --- a/.github/workflows/mediaportal_test_build.yml +++ b/.github/workflows/mediaportal_test_build.yml @@ -3,7 +3,7 @@ name: Mediaportal / Test Build on: push: # On Push to Pre Release / Final Test branch - branches: + branches: - 'MP1.**_Test**' # Ignore all Tags / Release tags-ignore: diff --git a/.github/workflows/workflow_codeql.yml b/.github/workflows/workflow_codeql.yml index d83b50e8065..8d0adacb788 100644 --- a/.github/workflows/workflow_codeql.yml +++ b/.github/workflows/workflow_codeql.yml @@ -14,44 +14,44 @@ jobs: security-events: write steps: - - name: Setup Visual Studio 2019 - uses: microsoft/setup-msbuild@v2 - with: - vs-version: 16.11 - - - name: Link to Visual Studio 2019 Community - run: | - mklink /J "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" - shell: cmd - - - name: Setup Java JDK - uses: actions/setup-java@v4 - with: - java-version: 8 - architecture: x86 - distribution: temurin - - - name: Setup NSIS - run: | - choco install --yes nsis --version=3.09 --force - - - name: Git Checkout - uses: actions/checkout@v4 - - - name: Git Submodule Update - run: | - git submodule update --init --recursive - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: csharp - - - name: Build - run: | - BuildFullinstaller.cmd - working-directory: ${{ github.workspace }}\Build - shell: cmd - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + - name: Setup Visual Studio 2019 + uses: microsoft/setup-msbuild@v2 + with: + vs-version: 16.11 + + - name: Link to Visual Studio 2019 Community + run: | + mklink /J "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" + shell: cmd + + - name: Setup Java JDK + uses: actions/setup-java@v4 + with: + java-version: 8 + architecture: x86 + distribution: temurin + + - name: Setup NSIS + run: | + choco install --yes nsis --version=3.09 --force + + - name: Git Checkout + uses: actions/checkout@v4 + + - name: Git Submodule Update + run: | + git submodule update --init --recursive + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: csharp + + - name: Build + run: | + BuildFullinstaller.cmd + working-directory: ${{ github.workspace }}\Build + shell: cmd + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/workflow_labeler.yml b/.github/workflows/workflow_labeler.yml index 484872bf635..b5719e47641 100644 --- a/.github/workflows/workflow_labeler.yml +++ b/.github/workflows/workflow_labeler.yml @@ -3,7 +3,7 @@ name: "Workflow / Pull Request Labeler" on: pull_request_target: types: [opened, edited] - + jobs: labeler: name: Add labels to Pull Request @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Add labels to Pull Request - uses: github/issue-labeler@v3.4 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler.yml - enable-versioned-regex: 0 - include-title: 1 + - name: Add labels to Pull Request + uses: github/issue-labeler@v3.4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeler.yml + enable-versioned-regex: 0 + include-title: 1 diff --git a/.github/workflows/workflow_milestone.yml b/.github/workflows/workflow_milestone.yml index 538c3138b50..988d7f09bac 100644 --- a/.github/workflows/workflow_milestone.yml +++ b/.github/workflows/workflow_milestone.yml @@ -2,7 +2,7 @@ name: "Workflow / Milestone" on: pull_request_target: - types: + types: - opened - closed diff --git a/.github/workflows/workflow_size_labels.yml b/.github/workflows/workflow_size_labels.yml index bc6dc82e851..ff798de7860 100644 --- a/.github/workflows/workflow_size_labels.yml +++ b/.github/workflows/workflow_size_labels.yml @@ -9,9 +9,9 @@ on: jobs: add-labels: name: Add labels - + runs-on: ubuntu-latest - + permissions: contents: read pull-requests: write diff --git a/.github/workflows/workflow_yaml_lint.yml b/.github/workflows/workflow_yaml_lint.yml new file mode 100644 index 00000000000..647c56aa043 --- /dev/null +++ b/.github/workflows/workflow_yaml_lint.yml @@ -0,0 +1,23 @@ +name: Workflow / YAML lint + +on: + push: + branches: [main] + paths: + - "**.yaml" + - "**.yml" + pull_request: + paths: + - "**.yaml" + - "**.yml" + workflow_dispatch: + +jobs: + yamllint: + name: 🧹 Yaml Lint + runs-on: ubuntu-latest + steps: + - name: ⤵️ Check out configuration from GitHub + uses: actions/checkout@v4 + - name: 🚀 Run yamllint + run: yamllint --strict . diff --git a/.yamlignore b/.yamlignore new file mode 100644 index 00000000000..37745be01bc --- /dev/null +++ b/.yamlignore @@ -0,0 +1,2 @@ +/libbluray/*.yaml +/libbluray/*.yml diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000000..9842fe0dcc7 --- /dev/null +++ b/.yamllint @@ -0,0 +1,19 @@ +--- +extends: default + +ignore-from-file: [.gitignore, .yamlignore] + +rules: + document-start: disable + empty-lines: + level: error + max: 1 + max-start: 0 + max-end: 1 + indentation: + level: error + spaces: 2 + indent-sequences: true + check-multi-line-strings: false + line-length: disable + truthy: disable diff --git a/DirectShowFilters/mpc-hc_subs/src/thirdparty/freetype2/freetype2/.gitlab-ci.yml b/DirectShowFilters/mpc-hc_subs/src/thirdparty/freetype2/freetype2/.gitlab-ci.yml index bb078e244aa..9059cfa8987 100644 --- a/DirectShowFilters/mpc-hc_subs/src/thirdparty/freetype2/freetype2/.gitlab-ci.yml +++ b/DirectShowFilters/mpc-hc_subs/src/thirdparty/freetype2/freetype2/.gitlab-ci.yml @@ -1,7 +1,7 @@ # CI setup for FreeType. stages: - - build + - build # FIXME: Use --werror once warnings are fixed. variables: @@ -74,11 +74,9 @@ variables: meson compile --verbose -C build $env:MESON_WINDOWS_TESTS" - # Format of job names: # - # Windows jobs. windows meson vs2019 amd64: @@ -192,7 +190,6 @@ linux cmake libs: cmake --build build --target install - # MacOS jobs. macos autotools: