Skip to content

Commit af81dc1

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 af81dc1

File tree

9 files changed

+35
-24
lines changed

9 files changed

+35
-24
lines changed

.github/workflows/code-coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ 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
2424
uses: actions/setup-java@v2
@@ -54,7 +54,7 @@ jobs:
5454
add: '*.svg'
5555

5656
- name: Upload JaCoCo coverage report as a workflow artifact
57-
uses: actions/upload-artifact@v2
57+
uses: actions/upload-artifact@v4
5858
with:
5959
name: jacoco-report
6060
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: 18 additions & 3 deletions
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
@@ -35,7 +35,22 @@ jobs:
3535
distribution: 'adopt'
3636

3737
- name: Install botan
38-
run: brew install botan
38+
run: brew install botan@2
39+
40+
- name: Link Botan
41+
run: |
42+
brew link --force --overwrite botan@2
43+
brew info botan@2
44+
(ls /usr/lib/libbotan-2.dylib && echo yes) || echo no
45+
(ls /opt/homebrew/Cellar/botan@2/2.19.5/lib/libbotan-2.dylib && echo yes) || echo no
3946
4047
- name: Build with Maven
41-
run: mvn --batch-mode --update-snapshots verify
48+
run: |
49+
export PATH="/opt/homebrew/opt/botan@2/bin:$PATH"
50+
export LDFLAGS="-L/opt/homebrew/opt/botan@2/lib"
51+
export CPPFLAGS="-I/opt/homebrew/opt/botan@2/include"
52+
export PKG_CONFIG_PATH="/opt/homebrew/opt/botan@2/lib/pkgconfig"
53+
botan config prefix
54+
botan config ldflags
55+
echo "$PATH"
56+
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: 7 additions & 7 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.4.0</maven-surefire-version>
23+
<maven-checkstyle-version>3.2.0</maven-checkstyle-version>
24+
<jacoco.plugin.version>0.8.12</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>

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)