Skip to content

#21 run java and csharp snippets #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 64 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
56aa899
#21 run java and chsarp snippets
kernelsam Feb 20, 2025
314e032
updates
kernelsam Feb 20, 2025
a20b104
add senzing dir
kernelsam Feb 20, 2025
05b428c
nuget updates
kernelsam Feb 20, 2025
b7dbe47
update package name
kernelsam Feb 20, 2025
c334aad
fix linting, update senzing java path
kernelsam Feb 20, 2025
52b8fa7
add data dir to snippet run
kernelsam Feb 20, 2025
2898442
fix support dir
kernelsam Feb 20, 2025
35f58a1
test
kernelsam Feb 20, 2025
22452a6
csharp updates
kernelsam Feb 20, 2025
99b9f01
fix formatting
kernelsam Feb 20, 2025
3fa95b9
fixes
kernelsam Feb 20, 2025
2483dd3
update paths
kernelsam Feb 20, 2025
4868eab
fix typo
kernelsam Feb 21, 2025
3fc8f22
update java paths
kernelsam Feb 21, 2025
f1f60d0
update lib path, fix windows var
kernelsam Feb 21, 2025
03b0f97
sanity check
kernelsam Feb 21, 2025
f27e1ad
fix typo
kernelsam Feb 21, 2025
a37dd7a
add senzing dir for windows
kernelsam Feb 21, 2025
1b5ee54
update windows path
kernelsam Feb 21, 2025
caccfae
update ld library path
kernelsam Feb 21, 2025
301f455
update path in separate step
kernelsam Feb 21, 2025
e097e7e
Merge branch 'main' into 21-skern
barrycaceres Feb 21, 2025
00f2e16
Updated finding of default support path
barrycaceres Feb 21, 2025
3f5595a
Formatted InstallLocations.cs and removed -D option from Java workflow
barrycaceres Feb 21, 2025
22561ae
Added LD_LIBRARY_PATH for Java runner
barrycaceres Feb 21, 2025
8de8f7c
Removed SENZING_DIR env variable since using the defaults
barrycaceres Feb 21, 2025
52ebfd3
turn off fail fast
kernelsam Feb 21, 2025
8a9d12f
Restored SENZING_DIR env variable as pom.xml uses it
barrycaceres Feb 21, 2025
32d93d2
Merge branch '21-skern' of github.com:Senzing/code-snippets-v4 into 2…
barrycaceres Feb 21, 2025
bb4067a
Tried fixing database URL file path separators
barrycaceres Feb 21, 2025
b896943
Debug Senzing settings on Windows
barrycaceres Feb 21, 2025
b3f17f5
Attempt to fix windows issues with init JSON
barrycaceres Feb 21, 2025
edb1eb2
Attempt to fix windows issues with init JSON
barrycaceres Feb 21, 2025
2ea806a
Debug windows failure to kill sub-process
barrycaceres Feb 21, 2025
9715930
Attempted fix for windows killing subprocess
barrycaceres Feb 21, 2025
b28a623
Attempted fix for windows killing subprocess
barrycaceres Feb 21, 2025
8fe573a
Increased auto-kill time for continuous snippets
barrycaceres Feb 21, 2025
7c8c3d9
Changed expected exit code on kill for Windows
barrycaceres Feb 21, 2025
d5fd01a
update homepath
kernelsam Feb 21, 2025
3c406cc
Attempt to fix csharp on Windows test
barrycaceres Feb 21, 2025
b1722b5
Attempt to debug csharp failure on windows
barrycaceres Feb 21, 2025
a31612b
Attempt to fix csharp failure on windows
barrycaceres Feb 21, 2025
86dec53
Attempt to fix csharp failure on windows
barrycaceres Feb 22, 2025
50075aa
Attempt to fix csharp failure on windows
barrycaceres Feb 22, 2025
0cc3ab0
Attempt to fix csharp failure on windows
barrycaceres Feb 22, 2025
ed3e806
Attempt to fix csharp failure on windows
barrycaceres Feb 22, 2025
38cfe67
Remove unused imports from SnippetRunner.java
barrycaceres Feb 22, 2025
051cfe9
update path
kernelsam Feb 22, 2025
b99ad3b
Merge branch '21-skern' of github.com:Senzing/code-snippets-v4 into 2…
barrycaceres Feb 22, 2025
da48254
Remove unused imports from SnippetRunner.java
barrycaceres Feb 22, 2025
fbb924a
Remove unused imports from SnippetRunner.java
barrycaceres Feb 22, 2025
ecedec1
Debug bad settings on C# SnippetRunner
barrycaceres Feb 22, 2025
26080bd
Debug bad settings on C# SnippetRunner
barrycaceres Feb 22, 2025
4f5e778
Added missing close on file stream to LoadViaLoop
barrycaceres Feb 22, 2025
fedd224
Empty-Commit
kernelsam Feb 24, 2025
6f3d507
Changed file opening access mode in C# and updated data directory sea…
barrycaceres Feb 24, 2025
6418cfc
Merge branch '21-skern' of github.com:Senzing/code-snippets-v4 into 2…
barrycaceres Feb 24, 2025
ed7eeae
update sdk filepath
kernelsam Feb 24, 2025
780cb73
Updated path to sz-sdk.jar in pom.xml
barrycaceres Feb 24, 2025
bcee1f3
Merge branch '21-skern' of github.com:Senzing/code-snippets-v4 into 2…
barrycaceres Feb 24, 2025
d0520a1
Updates to SnippetRunner for C# to properly kill subtasks
barrycaceres Feb 24, 2025
50e650c
Updated auto-kill timeouts for redo-continuous snippets
barrycaceres Feb 24, 2025
5b77c54
Updated exit code for windows forced-kill of sub-task
barrycaceres Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/linters/.jscpd.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"threshold": 32
"ignore": ["**/java/**","**/csharp/**","**/python/**"]
}
47 changes: 47 additions & 0 deletions .github/workflows/csharp-darwin-snippets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: csharp darwin snippets

on: [pull_request, workflow_dispatch]

permissions:
contents: read
pull-requests: write

jobs:
csharp-darwin-snippets:
runs-on: macos-latest
strategy:
matrix:
include:
- dotnet-version: "8"

steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: install Senzing SDK
uses: senzing-factory/github-action-install-senzing-sdk@v2
with:
senzingsdk-repository-path: ${{ secrets.SENZING_OSX_BETA_REPOSITORY }}

- name: configure local nuget repo
run: |
find /opt/senzing/er/sdk/dotnet/ -name "Senzing.Sdk*" | xargs -0 -L 1 basename
sdk_package=$(find /opt/senzing/er/sdk/dotnet/ -name "Senzing.Sdk*" | xargs -0 -L 1 basename)
mkdir -p ~/dev/nuget/packages
dotnet nuget add source ~/dev/nuget/packages -n dev
dotnet nuget push /opt/senzing/er/sdk/dotnet/"${sdk_package}" --source dev

- name: run csharp snippets
env:
DYLD_LIBRARY_PATH: "/opt/senzing/er/lib"
SENZING_DATA_DIR: "/opt/senzing/er/data"
run: |
cd "${GITHUB_WORKSPACE}"/csharp/runner
dotnet add SnippetRunner package Senzing.Sdk --version 4.0.0-beta
dotnet run --project SnippetRunner all
51 changes: 51 additions & 0 deletions .github/workflows/csharp-linux-snippets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: csharp linux snippets

on:
push:
branches-ignore: [main]
pull_request:
branches: [main]

permissions:
contents: read
pull-requests: write

jobs:
csharp-linux-snippets:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dotnet-version: "8"

steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: install Senzing runtime
uses: senzing-factory/github-action-install-senzing-sdk@v2
with:
packages-to-install: "senzingsdk-runtime senzingsdk-setup"
senzingsdk-repository-package: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_PACKAGE }}
senzingsdk-repository-path: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_URL }}

- name: configure local nuget repo
run: |
sdk_package=$(grep -Rl "Senzing.Sdk" /opt/senzing/er/sdk/dotnet/ | xargs -L 1 basename)
mkdir -p ~/dev/nuget/packages
dotnet nuget add source ~/dev/nuget/packages -n dev
dotnet nuget push /opt/senzing/er/sdk/dotnet/"${sdk_package}" --source dev

- name: run csharp snippets
env:
LD_LIBRARY_PATH: "/opt/senzing/er/lib"
run: |
cd "${GITHUB_WORKSPACE}"/csharp/runner
dotnet add SnippetRunner package Senzing.Sdk --version 4.0.0-beta
dotnet run --project SnippetRunner all
50 changes: 50 additions & 0 deletions .github/workflows/csharp-windows-snippets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: csharp windows snippets

on: [pull_request, workflow_dispatch]

permissions:
contents: read
pull-requests: write

jobs:
csharp-windows-snippets:
runs-on: windows-latest
strategy:
matrix:
include:
- dotnet-version: "8"

steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: install Senzing SDK
uses: senzing-factory/github-action-install-senzing-sdk@v2
with:
senzingsdk-repository-path: ${{ secrets.SENZING_WIN_BETA_REPOSITORY }}

- name: configure local nuget repo
run: |
$Env:sdk_package = Get-ChildItem -Path "C:\Program Files\Senzing\er\sdk\dotnet\" -Recurse | Where-Object {$_.Name -match "^Senzing.SDK*"} | Select-Object -ExpandProperty Name
mkdir $Env:USERPROFILE\dev\nuget\packages
cd $Env:USERPROFILE\dev\nuget\packages
dir
dotnet nuget add source $Env:USERPROFILE\dev\nuget\packages -n senzing
dotnet nuget push "C:\Program Files\Senzing\er\sdk\dotnet\${Env:sdk_package}" --source senzing
dotnet nuget list source

- name: Add to "Path" environment variable
run: |
Add-Content $env:GITHUB_PATH "C:\Program Files\Senzing\er\lib"

- name: run csharp snippets
run: |
echo $Env:Path
cd ${Env:GITHUB_WORKSPACE}/csharp/runner
dotnet run --project SnippetRunner all
46 changes: 46 additions & 0 deletions .github/workflows/java-darwin-snippets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: java darwin snippets

on: [pull_request, workflow_dispatch]

permissions:
contents: read
pull-requests: write

jobs:
java-darwin-snippets:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
java-version: ["17", "21"]
java-distribution: ["temurin"]

steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: ${{ matrix.java-distribution }}
java-version: ${{ matrix.java-version }}

- name: install Senzing SDK
uses: senzing-factory/github-action-install-senzing-sdk@v2
with:
senzingsdk-repository-path: ${{ secrets.SENZING_OSX_BETA_REPOSITORY }}

- name: build with Maven
env:
SENZING_DIR: "/opt/senzing/er"
run: |
cd "${GITHUB_WORKSPACE}"/java
mvn clean install

- name: run java snippets
env:
DYLD_LIBRARY_PATH: "/opt/senzing/er/lib"
run: |
cd "${GITHUB_WORKSPACE}"/java
java -jar target/sz-sdk-snippets.jar all
52 changes: 52 additions & 0 deletions .github/workflows/java-linux-snippets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: java linux snippets

on:
push:
branches-ignore: [main]
pull_request:
branches: [main]

permissions:
contents: read
pull-requests: write

jobs:
java-linux-snippets:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java-version: ["17", "21"]
java-distribution: ["temurin"]

steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.java-distribution }}

- name: install Senzing runtime
uses: senzing-factory/github-action-install-senzing-sdk@v2
with:
packages-to-install: "senzingsdk-runtime senzingsdk-setup"
senzingsdk-repository-package: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_PACKAGE }}
senzingsdk-repository-path: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_URL }}

- name: build with Maven
env:
SENZING_DIR: "/opt/senzing/er"
run: |
cd "${GITHUB_WORKSPACE}"/java
mvn clean package

- name: run java snippets
env:
LD_LIBRARY_PATH: "/opt/senzing/er/lib:${LD_LIBRARY_PATH}"
run: |
cd "${GITHUB_WORKSPACE}"/java
java -jar target/sz-sdk-snippets.jar all
48 changes: 48 additions & 0 deletions .github/workflows/java-windows-snippets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: java windows snippets

on: [pull_request, workflow_dispatch]

permissions:
contents: read
pull-requests: write

jobs:
java-windows-snippets:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
java-version: ["17", "21"]
java-distribution: ["temurin"]

steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.java-distribution }}

- name: install Senzing SDK
uses: senzing-factory/github-action-install-senzing-sdk@v2
with:
senzingsdk-repository-path: ${{ secrets.SENZING_WIN_BETA_REPOSITORY }}

- name: build with Maven
env:
SENZING_DIR: 'C:\Program Files\Senzing\er'
run: |
cd "${Env:GITHUB_WORKSPACE}/java"
mvn clean install

- name: Add to "Path" environment variable
run: |
Add-Content $env:GITHUB_PATH "C:\Program Files\Senzing\er\lib"

- name: run java snippets
run: |
cd "${Env:GITHUB_WORKSPACE}/java"
java -jar target/sz-sdk-snippets.jar all
Loading
Loading