diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4e39df0d..6372c303 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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 @@ -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 @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f312c302..d6107a2e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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