From 8a064a75e3b6e2b41e3fd8a099d81387043a7ee1 Mon Sep 17 00:00:00 2001 From: pit-ray Date: Mon, 12 Feb 2024 02:15:57 +0900 Subject: [PATCH] add cl --- .github/codeql/codeql-config.yml | 4 ++ .github/workflows/codeql.yml | 73 ++++++++++++++++++++++++++++ .github/workflows/coverity.yml | 82 ++++++++++++++++++++++++++++++++ .github/workflows/windows.yml | 64 +++++++++++++++++++++++++ README.md | 5 ++ 5 files changed, 228 insertions(+) create mode 100644 .github/codeql/codeql-config.yml create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/coverity.yml create mode 100644 .github/workflows/windows.yml diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 0000000..338064e --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,4 @@ +name: 'GitHub CodeQL config' +paths: + - 'include/fluent_tray.hpp' + - 'demo/demo.cpp' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..98babdd --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,73 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + schedule: + - cron: '0 18 * * 4' + + push: + tags: + - v*.*.* + + pull_request: + # The branches below must be a subset of the branches above + branches: + - main + paths: + - '!README.md' + - '!CONTRIBUTING.md' + - '!docs/**' + - 'include/**' + - 'demo/**' + - '.github/**' + - 'tests/**' + +jobs: + analyze: + name: Analyze + runs-on: windows-2019 + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'cpp' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + config-file: ./.github/codeql/codeql-config.yml + + - name: Setup for build + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + + - name: Configure CMake + run: | + cmake -B ${{github.workspace}}/codeql -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 16 2019" -A x64 demo + - name: Build Project + run: | + cmake --build ${{github.workspace}}/codeql --config Debug + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml new file mode 100644 index 0000000..b696757 --- /dev/null +++ b/.github/workflows/coverity.yml @@ -0,0 +1,82 @@ +name: cov-build + +on: + schedule: + - cron: '0 18 * * 3' + + push: + tags: + - v*.*.* + - coverity* + + pull_request: + branches: + - main + paths: + - '!README.md' + - '!CONTRIBUTING.md' + - '!docs/**' + - 'include/**' + - 'demo/**' + - '.github/**' + - 'tests/**' + +env: + TOKEN: ${{secrets.COVERITY_TOKEN}} + EMAIL: ${{secrets.COVERITY_EMAIL}} + +jobs: + x64: + runs-on: windows-2019 + + defaults: + run: + shell: powershell + + steps: + - uses: actions/checkout@v2 + + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + + - name: Install tools + run: | + choco install -y unzip + choco install -y wget + choco install -y curl + + - name: Cache Coverity scan tools + uses: actions/cache@v2 + with: + path: ${{github.workspace}}/cov_tools + key: x64-coverity-cache + + - name: Install Coverity scan tools + run: "tools/install_coverity_tools.bat ${{env.TOKEN}}" + + - name: Configure CMake + run: | + cov_tools/bin/cov-configure --config build/covtest/cov.xml --msvc --template + cmake -B build -G "Visual Studio 16 2019" -A x64 demo + + - name: Build with Coverity + run: | + cov_tools/bin/cov-build --config build/covtest/cov.xml --dir build/cov-int cmake --build build + cd build + tail cov-int/build-log.txt + tar -czvf cov-int.tgz cov-int + cd .. + + - name: Get short SHA + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: Submit tarball to Coverity + run: curl.exe \ + --form token="${{env.TOKEN}}" \ + --form email="${{env.EMAIL}}" \ + --form file="@build/cov-int.tgz" \ + --form version="${{steps.vars.outputs.sha_short}}" \ + --form description="Automatic submission with GitHub Actions" \ + "https://scan.coverity.com/builds?project=pit-ray%2Ffluent-tray" diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..9728ba3 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,64 @@ +name: Windows + +on: + push: + branches: [ main ] + tags: + - v*.*.* + paths: + - '!README.md' + - '!CONTRIBUTING.md' + - '!docs/**' + - 'include/**' + - 'demo/**' + - '.github/**' + - 'tests/**' + + pull_request: + branches: [ master ] + paths: + - '!README.md' + - '!CONTRIBUTING.md' + - '!docs/**' + - 'include/**' + - 'demo/**' + - '.github/**' + - 'tests/**' + +env: + BUILD_TYPE: Debug + +jobs: + x64: + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v2 + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + + - name: Configure CMake + run: | + cmake -B ${{github.workspace}}/build_msvc_x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "Visual Studio 16 2019" -A x64 demo + + - name: Build + run: | + cmake --build ${{github.workspace}}/build_msvc_x64 --config ${{env.BUILD_TYPE}} + + x86: + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v2 + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x86 + + - name: Configure CMake + run: | + cmake -B ${{github.workspace}}/build_msvc_x86 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "Visual Studio 16 2019" -A Win32 -DBIT_TYPE=32 demo + + - name: Build + run: | + cmake --build ${{github.workspace}}/build_msvc_x86 --config ${{env.BUILD_TYPE}} diff --git a/README.md b/README.md index beb23f1..ae28e40 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,11 @@

Fluent Design-based GUI Library for System Tray Applications

:fire:Warning: This project is still under development. Do not use it in a production environment.:fire:

+ + Coverity Scan Build Status + + ## Concept fluent-tray provides a simple system tray icon and menu to easily create resident applications that do not require complex windows. Since only the native API is used, all you have to do is include a single header file.