Skip to content

Commit

Permalink
Get CI workflows working again
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbylight committed Nov 28, 2024
1 parent 33c6e0a commit 6c462be
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 45 deletions.
65 changes: 32 additions & 33 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,43 +34,42 @@ jobs:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
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
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
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

## 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@v1
## 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

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

- name: Build
#run: ./gradlew build --warning-mode all
uses: GabrielBB/xvfb-action@v1
with:
run: ./gradlew build --warning-mode all
working-directory: ./ #optional
# Note: Assumes we're running on Ubuntu
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Build with Gradle
run: xvfb-run ./gradlew build --warning-mode all

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
29 changes: 19 additions & 10 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,27 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
java: [ '21', '23' ]

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
- uses: actions/checkout@v4

- name: Verify gradle wrapper
uses: gradle/actions/wrapper-validation@v4
if: matrix.java == '21'

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
java-version: ${{ matrix.java }}
distribution: 'temurin'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Note: Assumes we're running on Ubuntu
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
- name: Build with Gradle
#run: ./gradlew build --warning-mode all
uses: GabrielBB/xvfb-action@v1
with:
run: ./gradlew build --warning-mode all
working-directory: ./ #optional
run: xvfb-run ./gradlew build --warning-mode all
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ all unit tests, and create the jar, and run:
./gradlew build installDist
java -jar build/install/rtext/RText.jar

Note that RText requires Java 17 or later to build.
Note that RText requires Java 21 or later to build.

### Building the Windows application and installer

Expand All @@ -40,7 +40,7 @@ and a starter `RText.exe` file is added into `build/install/rtext`:

./gradlew clean build installDist generateWindowsStarterExe

The `generateWindowsStarterExe` task uses a JDK 17 install and `launch4j` as defined in
The `generateWindowsStarterExe` task uses a JDK 21 install and `launch4j` as defined in
`gradle.properties`.

Note this gradle task runs `jlink` directly and uses `launch4j` rather than using
Expand Down

0 comments on commit 6c462be

Please sign in to comment.