From 4b0e16c1cdc99158bfcf2b5c04d17f47946cb925 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Wed, 25 Feb 2026 11:20:31 +0100 Subject: [PATCH] chore: ci restyled --- .github/workflows/ci.yml | 60 +++++++++++++++++----------- .github/workflows/codeql.yml | 62 ++++++++++++++--------------- .github/workflows/coverity-scan.yml | 28 ++++++------- .github/workflows/deploy.yml | 14 +++++-- .github/workflows/sonar-scan.yml | 2 +- 5 files changed, 92 insertions(+), 74 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3592e08d8..556ce90ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,23 @@ jobs: strategy: fail-fast: false matrix: - tool: [autotools, clang-tidy, compcert, cppcheck, doxygen, infer, misra, modules, pkgsrc, rpm, slimcc, sparse, tcc, tokstyle] + tool: + [ + autotools, + clang-tidy, + compcert, + cppcheck, + doxygen, + infer, + misra, + modules, + pkgsrc, + rpm, + slimcc, + sparse, + tcc, + tokstyle, + ] runs-on: ubuntu-22.04 steps: - name: Set up Docker Buildx @@ -108,16 +124,15 @@ jobs: with: usesh: true copyback: false - prepare: - /usr/sbin/pkg_add - cmake - googletest - libconfig - libopus - libsodium - libvpx - ninja-build - pkg-config + prepare: /usr/sbin/pkg_add + cmake + googletest + libconfig + libopus + libsodium + libvpx + ninja-build + pkg-config run: | # TODO(iphydf): Investigate NetBSD failures on these tests. @@ -145,18 +160,17 @@ jobs: with: usesh: true copyback: false - prepare: - PAGER=cat ASSUME_ALWAYS_YES=YES pkg install - cmake - git - gmake - googletest - libconfig - libsodium - libvpx - ninja - opus - pkgconf + prepare: PAGER=cat ASSUME_ALWAYS_YES=YES pkg install + cmake + git + gmake + googletest + libconfig + libsodium + libvpx + ninja + opus + pkgconf run: | # TODO(iphydf): Investigate FreeBSD failures on these tests. diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 53e938267..1fc9b1145 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,12 +2,12 @@ name: "CodeQL" on: push: - branches: [ "master" ] + branches: ["master"] pull_request: # The branches below must be a subset of the branches above - branches: [ "master" ] + branches: ["master"] schedule: - - cron: '39 10 * * 0' + - cron: "39 10 * * 0" jobs: analyze: @@ -21,37 +21,37 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'cpp' ] + language: ["cpp"] steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - submodules: recursive + - name: Checkout repository + uses: actions/checkout@v6 + with: + submodules: recursive - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends \ - libconfig-dev \ - libopus-dev \ - libsodium-dev \ - libvpx-dev \ - ninja-build \ - pkg-config + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + libconfig-dev \ + libopus-dev \ + libsodium-dev \ + libvpx-dev \ + ninja-build \ + pkg-config - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - queries: security-and-quality + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + queries: security-and-quality - - name: Build - run: | - cmake -GNinja -B _build -S . - cmake --build _build --parallel $(nproc) + - name: Build + run: | + cmake -GNinja -B _build -S . + cmake --build _build --parallel $(nproc) - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{ matrix.language }}" + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml index 641c9874a..69ba78c03 100644 --- a/.github/workflows/coverity-scan.yml +++ b/.github/workflows/coverity-scan.yml @@ -2,7 +2,7 @@ name: coverity-scan on: schedule: - - cron: '0 10 * * *' # Once a day + - cron: "0 10 * * *" # Once a day jobs: latest: @@ -12,12 +12,11 @@ jobs: with: submodules: recursive - name: Install libraries - run: - sudo apt-get update && + run: sudo apt-get update && sudo apt-get install -y --no-install-recommends - libopus-dev - libsodium-dev - libvpx-dev + libopus-dev + libsodium-dev + libvpx-dev - name: Download Coverity Build Tool run: | @@ -37,15 +36,14 @@ jobs: run: cov-analysis-linux64/bin/cov-build --dir cov-int make - name: Submit the result to Coverity Scan - run: - tar czvf c-toxcore.tgz cov-int && + run: tar czvf c-toxcore.tgz cov-int && curl - --form project=TokTok/c-toxcore - --form token=$TOKEN - --form email=iphydf@gmail.com - --form file=@c-toxcore.tgz - --form version="$(git rev-list --count HEAD)" - --form description="CI build of $(git rev-parse --abbrev-ref HEAD) branch" - https://scan.coverity.com/builds + --form project=TokTok/c-toxcore + --form token=$TOKEN + --form email=iphydf@gmail.com + --form file=@c-toxcore.tgz + --form version="$(git rev-list --count HEAD)" + --form description="CI build of $(git rev-parse --abbrev-ref HEAD) branch" + https://scan.coverity.com/builds env: TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 65c6cbfbe..7a2aa7d89 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,6 @@ concurrency: cancel-in-progress: true jobs: - ################################################################################################ # Preparation jobs ################################################################################################ @@ -118,8 +117,15 @@ jobs: needs: [prepare] strategy: matrix: - target: [ios-arm64, ios-armv7, ios-armv7s, iphonesimulator-arm64, iphonesimulator-x86_64] - runs-on: 'macos-14' + target: + [ + ios-arm64, + ios-armv7, + ios-armv7s, + iphonesimulator-arm64, + iphonesimulator-x86_64, + ] + runs-on: "macos-14" steps: - uses: actions/checkout@v6 with: @@ -141,7 +147,7 @@ jobs: build-xcode-framework: name: Xcode Framework needs: [build-ios, build-macos] - runs-on: 'macos-14' + runs-on: "macos-14" steps: - uses: actions/checkout@v6 with: diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml index acacb2a81..b82b3d111 100644 --- a/.github/workflows/sonar-scan.yml +++ b/.github/workflows/sonar-scan.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v6 with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis submodules: recursive - name: Install Build Wrapper uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v6