Skip to content

Commit

Permalink
add cl
Browse files Browse the repository at this point in the history
  • Loading branch information
pit-ray committed Feb 11, 2024
1 parent 130ee62 commit 8a064a7
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: 'GitHub CodeQL config'
paths:
- 'include/fluent_tray.hpp'
- 'demo/demo.cpp'
73 changes: 73 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -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
82 changes: 82 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -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"
64 changes: 64 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -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}}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
<p align="center"><b>Fluent Design-based GUI Library for System Tray Applications</b></p>
<p align="center"><b>:fire:Warning: This project is still under development. Do not use it in a production environment.:fire:</b></p>

<a href="https://scan.coverity.com/projects/pit-ray-fluent-tray">
<img alt="Coverity Scan Build Status"
src="https://img.shields.io/coverity/scan/29752.svg"/>
</a>

## 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.
Expand Down

0 comments on commit 8a064a7

Please sign in to comment.