Skip to content

Commit d56f9b4

Browse files
committed
[ci/cd] Upgrade maven dependencies
- Remove unused code - Fix GH workflow build versions Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>
1 parent 1cd5592 commit d56f9b4

File tree

9 files changed

+33
-30
lines changed

9 files changed

+33
-30
lines changed

.github/workflows/code-coverage.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818

1919
steps:
2020
- name: checkout repository code
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v4
2222

2323
- name: Set up JDK
24-
uses: actions/setup-java@v2
24+
uses: actions/setup-java@v4
2525
with:
2626
java-version: 16
2727
distribution: 'adopt'
@@ -38,6 +38,7 @@ jobs:
3838
with:
3939
generate-branches-badge: true
4040
generate-summary: true
41+
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv
4142
fail-on-coverage-decrease: true
4243
fail-on-branches-decrease: true
4344

@@ -54,7 +55,7 @@ jobs:
5455
add: '*.svg'
5556

5657
- name: Upload JaCoCo coverage report as a workflow artifact
57-
uses: actions/upload-artifact@v2
58+
uses: actions/upload-artifact@v4
5859
with:
5960
name: jacoco-report
6061
path: target/site/jacoco/

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424

2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@v2
27+
uses: actions/checkout@v4
2828

2929
# Initializes the CodeQL tools for scanning.
3030
- name: Initialize CodeQL
31-
uses: github/codeql-action/init@v1
31+
uses: github/codeql-action/init@v2
3232
with:
3333
languages: ${{ matrix.language }}
3434
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -39,7 +39,7 @@ jobs:
3939
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4040
# If this step fails, then you should remove it and run the build manually (see below)
4141
- name: Autobuild
42-
uses: github/codeql-action/autobuild@v1
42+
uses: github/codeql-action/autobuild@v2
4343

4444
- name: Perform CodeQL Analysis
45-
uses: github/codeql-action/analyze@v1
45+
uses: github/codeql-action/analyze@v2

.github/workflows/macos-build.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,28 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
os: [macos-latest]
21-
jdk: [11, 14, 16]
20+
os: [macos-14]
21+
jdk: [11, 16, 21, 24]
2222

2323
runs-on: ${{ matrix.os }}
2424
env:
2525
JDK_VERSION: ${{ matrix.jdk }}
2626

2727
steps:
2828
- name: checkout repository code
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v4
3030

3131
- name: Set up JDK
3232
uses: actions/setup-java@v2
3333
with:
3434
java-version: ${{ matrix.jdk }}
35-
distribution: 'adopt'
35+
distribution: 'temurin'
3636

3737
- name: Install botan
38-
run: brew install botan
38+
run: brew install botan@2
3939

4040
- name: Build with Maven
41-
run: mvn --batch-mode --update-snapshots verify
41+
run: |
42+
echo 'export PATH="/opt/homebrew/opt/botan@2/bin:$PATH"' >> /Users/runner/.bash_profile
43+
source /Users/runner/.bash_profile
44+
mvn --batch-mode --update-snapshots verify

.github/workflows/ubuntu-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
steps:
2828
- name: checkout repository code
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v4
3030

3131
- name: Set up JDK
3232
uses: actions/setup-java@v2

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
.classpath
88
.settings/
99

10+
# No VS Code settings
11+
.vscode/
12+
1013
# No derived resources
1114
target/
1215

pom.xml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919

2020
<maven.compiler.source>${java.version}</maven.compiler.source>
2121
<maven.compiler.target>${java.version}</maven.compiler.target>
22-
<maven-surefire-version>2.22.2</maven-surefire-version>
23-
<maven-checkstyle-version>3.1.1</maven-checkstyle-version>
24-
<jacoco.plugin.version>0.8.7</jacoco.plugin.version>
22+
<maven-surefire-version>3.5.3</maven-surefire-version>
23+
<maven-checkstyle-version>3.6.0</maven-checkstyle-version>
24+
<jacoco.plugin.version>0.8.13</jacoco.plugin.version>
2525

2626
<!-- lib dependencies version -->
27-
<jnr-ffi-version>2.1.12</jnr-ffi-version>
27+
<jnr-ffi-version>2.2.17</jnr-ffi-version>
2828

2929
<!-- test dependencies versions -->
30-
<junit-version>5.6.2</junit-version>
31-
<bouncy-castle-version>1.67</bouncy-castle-version>
32-
<log4j-version>2.17.1</log4j-version>
30+
<junit-version>5.8.2</junit-version>
31+
<bouncy-castle-version>1.70</bouncy-castle-version>
32+
<log4j-version>2.17.2</log4j-version>
3333
</properties>
3434

3535
<dependencies>
@@ -108,6 +108,9 @@
108108

109109
<plugin>
110110
<artifactId>maven-surefire-plugin</artifactId>
111+
<configuration>
112+
<argLine>-Djava.library.path=/opt/homebrew/Cellar/botan@2/2.19.5/lib</argLine>
113+
</configuration>
111114
<version>${maven-surefire-version}</version>
112115
</plugin>
113116

@@ -158,8 +161,8 @@
158161
</goals>
159162
</execution>
160163
<execution>
161-
<id>report</id>
162-
<phase>prepare-package</phase>
164+
<id>generate-code-coverage-report</id>
165+
<phase>test</phase>
163166
<goals>
164167
<goal>report</goal>
165168
</goals>

src/main/java/net/randombit/botan/codec/Base64Utils.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import static net.randombit.botan.Constants.EMPTY_BYTE_ARRAY;
1616

1717
import java.util.Arrays;
18-
import java.util.List;
1918

2019
import jnr.ffi.byref.NativeLongByReference;
2120

@@ -29,8 +28,6 @@ public final class Base64Utils {
2928
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '='
3029
};
3130

32-
private static final List<Character> ALLOWED_CHARS_LIST = Arrays.asList(ALLOWED_CHARS);
33-
3431
private Base64Utils() {
3532
// Not meant to be instantiated
3633
}

src/main/java/net/randombit/botan/codec/HexUtils.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import static net.randombit.botan.Constants.EMPTY_BYTE_ARRAY;
1616

1717
import java.util.Arrays;
18-
import java.util.List;
1918

2019
import jnr.ffi.byref.NativeLongByReference;
2120

@@ -28,8 +27,6 @@ public final class HexUtils {
2827
'6', '7', '8', '9', ' '
2928
};
3029

31-
private static final List<Character> ALLOWED_CHARS_LIST = Arrays.asList(ALLOWED_CHARS);
32-
3330
private HexUtils() {
3431
// Not meant to be instantiated
3532
}

src/main/java/net/randombit/botan/seckey/stream/BotanStreamCipher.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import static net.randombit.botan.Constants.BOTAN_DO_FINAL_FLAG;
1313
import static net.randombit.botan.Constants.BOTAN_UPDATE_FLAG;
1414
import static net.randombit.botan.Constants.EMPTY_BYTE_ARRAY;
15-
import static net.randombit.botan.util.BotanUtil.isNullOrEmpty;
1615

1716
import javax.crypto.NoSuchPaddingException;
1817
import java.util.Arrays;

0 commit comments

Comments
 (0)