From e04a571a8b498b35fa2e8f4872768618a1b47a78 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Thu, 3 Aug 2023 10:40:56 +0200 Subject: [PATCH] WIP --- .github/workflows/ci.yml | 13 +++---- .github/workflows/codecheck.yml | 66 ++++++++++++++++----------------- .gitlab-ci.yml | 2 - 3 files changed, 39 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e42248501..d074b26d52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ on: jobs: check-for-pr: runs-on: ubuntu-latest - if: endsWith(github.repository, 'java-profiler-library') outputs: skip: ${{ steps.check.outputs.skip }} steps: @@ -39,7 +38,7 @@ jobs: test-linux-glibc: needs: check-for-pr - if: endsWith(github.repository, 'java-profiler-library') && !needs.check-for-pr.outputs.skip + if: needs.check-for-pr.outputs.skip != 'true' strategy: matrix: java_version: [8u362+9, 11.0.18+10, 17.0.6+10, 20.0.1+10] @@ -95,7 +94,7 @@ jobs: test-ubuntu-jdk: needs: check-for-pr - if: endsWith(github.repository, 'java-profiler-library') && !needs.check-for-pr.outputs.skip + if: needs.check-for-pr.outputs.skip != 'true' strategy: matrix: java_version: [11, 17] @@ -152,7 +151,7 @@ jobs: test-linux-glibc-j9: needs: check-for-pr - if: endsWith(github.repository, 'java-profiler-library') && !needs.check-for-pr.outputs.skip + if: needs.check-for-pr.outputs.skip != 'true' strategy: matrix: java_version: [8, 11, 17] @@ -201,7 +200,7 @@ jobs: test-linux-glibc-oracle8: needs: check-for-pr - if: endsWith(github.repository, 'java-profiler-library') && !needs.check-for-pr.outputs.skip + if: needs.check-for-pr.outputs.skip != 'true' strategy: matrix: minfo_cache: [ 'none', 'transient', 'full' ] @@ -261,7 +260,7 @@ jobs: test-linux-musl: needs: check-for-pr - if: endsWith(github.repository, 'java-profiler-library') && !needs.check-for-pr.outputs.skip + if: needs.check-for-pr.outputs.skip != 'true' strategy: matrix: java_version: [8u362+9, 11.0.18+10, 17.0.6+10, 20.0.1+10] @@ -324,7 +323,7 @@ jobs: test-linux-glibc-zing: needs: check-for-pr - if: endsWith(github.repository, 'java-profiler-library') && !needs.check-for-pr.outputs.skip + if: needs.check-for-pr.outputs.skip != 'true' strategy: matrix: java_version: [ 8, 11, 17 ] diff --git a/.github/workflows/codecheck.yml b/.github/workflows/codecheck.yml index b5fb259b96..58cb590f11 100644 --- a/.github/workflows/codecheck.yml +++ b/.github/workflows/codecheck.yml @@ -9,7 +9,7 @@ on: jobs: scan-build: - if: endsWith(github.repository, 'java-profiler-library') && !needs.check-for-pr.outputs.skip + if: needs.check-for-pr.outputs.skip != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -48,7 +48,7 @@ jobs: comment-file: 'comment.html' cppcheck: - if: endsWith(github.repository, 'java-profiler-library') && !needs.check-for-pr.outputs.skip + if: needs.check-for-pr.outputs.skip != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -88,34 +88,34 @@ jobs: comment-id: "cppcheck" commenter: "pr-comment-cppcheck" comment-file: 'comment.html' -# codeql: -# if: endsWith(github.repository, 'java-profiler-library') && !needs.check-for-pr.outputs.skip -# runs-on: ubuntu-latest -# permissions: -# actions: read -# contents: read -# security-events: write -# -# strategy: -# fail-fast: false -# matrix: -# language: [ 'cpp', 'java' ] -# # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] -# # Learn more about CodeQL language support at https://git.io/codeql-language-support -# -# 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 }} -# # If you wish to specify custom queries, you can do so here or in a config file. -# # By default, queries listed here will override any specified in a config file. -# # Prefix the list here with "+" to use these queries and those in the config file. -# # queries: ./path/to/local/query, your-org/your-repo/queries@main -# - run: ./gradlew -x test assembleJar -# - name: Perform CodeQL Analysis -# uses: github/codeql-action/analyze@v2 + codeql: + if: needs.check-for-pr.outputs.skip != 'true' + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'cpp', 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + 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 }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + - run: ./gradlew -x test assembleJar + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2db4350432..6b64c3f00c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,6 @@ # Triggers a build within the Datadog infrastructure in the ddprof-build repository trigger_internal_build: rules: - - if: $CI_PROJECT_NAME =~ /java-profiler$/ - when: never - if: $CI_COMMIT_BRANCH =~ /release\/.*/ when: never - when: always