From 932e506df114bef25a1cc02980f7be4603edc248 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 28 Dec 2022 17:50:15 -0600 Subject: [PATCH] Adjustments to suggested configuration * Rebased to latest 7.0 * Check 7.0 branch and tags only * Ignore text files * Drop Python checks * Remove .lgtm.yml file, adjust skips --- .github/codeql.yml | 2 -- .github/workflows/ci-scripts-build.yml | 2 -- .github/workflows/codeql.yml | 43 ++++++++++++---------- .lgtm.yml | 50 -------------------------- 4 files changed, 24 insertions(+), 73 deletions(-) delete mode 100644 .github/codeql.yml delete mode 100644 .lgtm.yml diff --git a/.github/codeql.yml b/.github/codeql.yml deleted file mode 100644 index 00d9a7220..000000000 --- a/.github/codeql.yml +++ /dev/null @@ -1,2 +0,0 @@ -paths: - - src/tools diff --git a/.github/workflows/ci-scripts-build.yml b/.github/workflows/ci-scripts-build.yml index 62eb89eb7..0107d605d 100644 --- a/.github/workflows/ci-scripts-build.yml +++ b/.github/workflows/ci-scripts-build.yml @@ -15,7 +15,6 @@ on: - 'startup/*' - '.appveyor/*' - '.tools/*' - - '.lgtm.yml' - '.gitattributes' - '**/*.html' - '**/*.md' @@ -25,7 +24,6 @@ on: - 'startup/*' - '.appveyor/*' - '.tools/*' - - '.lgtm.yml' - '.gitattributes' - '**/*.html' - '**/*.md' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8c9a28176..cebeb0d37 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,32 +2,43 @@ name: "CodeQL" on: push: - branches: [ "7.0", "3.13", "3.14", "3.15", "3.16" ] + branches: 7.0 + tags: 'R7.0.*' pull_request: - branches: [ "7.0" ] - schedule: - - cron: "2 10 * * 0" + branches: 7.0 + paths-ignore: + - '.appveyor/*' + - '.tools/*' + - 'documentation/*' + - 'startup/*' + - '**/*.md' + - '**/*.html' jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: + - ubuntu-latest + # - windows-latest + # Supported by CodeQL which would check the Windows + # port, but needs more work here to set it up + permissions: - actions: read - contents: read + # Required for all workflows: security-events: write strategy: fail-fast: false matrix: - language: [ python, cpp ] + language: [ cpp ] steps: - - name: Checkout + - name: Checkout Repositories uses: actions/checkout@v3 + with: + submodules: true - - name: Install Packages (cpp) - if: ${{ matrix.language == 'cpp' }} + - name: Install Packages run: | sudo apt-get update sudo apt-get install --yes libreadline-dev @@ -36,20 +47,14 @@ jobs: uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - config-file: ./.github/codeql.yml queries: +security-and-quality - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - if: ${{ matrix.language == 'python' }} - - - name: Build cpp - if: ${{ matrix.language == 'cpp' }} + - name: Build C/C++ run: | g++ --version make --version perl --version - make -sj2 || echo '*** Build failed, ignored for lgtm ***' + make -sj2 || echo '*** Ignoring build failure for CodeQL ***' - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/.lgtm.yml b/.lgtm.yml deleted file mode 100644 index e3027329e..000000000 --- a/.lgtm.yml +++ /dev/null @@ -1,50 +0,0 @@ -# Configuration for lgtm.com -# - -path_classifiers: - test: - - exclude: / - - test - - "modules/*/test*" - library: - - modules/libcom/src/yacc - - modules/libcom/src/flex - template: - - src/template - - modules/ca/src/template - - modules/database/src/template - -extraction: - cpp: - prepare: - packages: - - "libreadline-dev" - index: - build_command: - - "g++ --version" - - "make --version" - - "perl --version" - - "make -sj2 || echo '*** Build failed, ignored for lgtm ***'" - - python: - index: - include: - - src/tools - - # Interpreted languages to be excluded - javascript: - index: - exclude: - - "*" - - # Compiled languages to be excluded - java: - index: - build_command: "echo No Java code in this project" - csharp: - index: - build_command: "echo No C# code in this project" - go: - index: - build_command: "echo No Go code in this project" -