Skip to content

Commit

Permalink
Attempt to Fix codeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
karianna committed Dec 28, 2023
1 parent b9e03c0 commit 80abf7a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
fail-fast: false
matrix:
language: [ 'java' ]
java: [11, 17]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

Expand All @@ -52,8 +53,8 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -66,5 +67,15 @@ jobs:
# make bootstrap
# make release

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
cache: 'maven'

- name: Build with Maven
run: ./mvnw -B verify -Dmaven.compiler.release=${{ matrix.java }} --file pom.xml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ if you wish to contribute to GCToolKit we would kindly ask that you submit an is
The build requires JDK 11 (you can also use JDK 17 or 21), and uses the Maven wrapper (`mvnw`) to help ensure reproducible builds and so we don't force you to change your system Maven install. If you prefer to build with your local Maven installation, make sure the version matches the one in the project's [.mvn/wrapper/maven-wrapper.properties](https://github.com/microsoft/gctoolkit/blob/main/.mvn/wrapper/maven-wrapper.properties) file.

* `./mvnw clean` - remove build artifacts
* `./mvnw compile |17>` - compile the source code. WARN you must set `11` or `17` for the release version.
* `./mvnw compile <11|17|21>` - compile the source code. WARN you must set `11`, `17` or `21` for the release version.

## Test

You can execute test cases with following command.

* `./mvnw test -Dmaven.compiler.release=<11|17>` - run unit tests (this project uses JUnit 5)
* `./mvnw test -Dmaven.compiler.release=<11|17|21>` - run unit tests (this project uses JUnit 5)

## Package

The packaging is vanilla Maven.

* `mvnw package -Dmaven.compiler.release=<11|17>` - create the binaries.
* `mvnw package -Dmaven.compiler.release=<11|17|21>` - create the binaries.

## Deploy / Publish

Expand Down

0 comments on commit 80abf7a

Please sign in to comment.