-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (67 loc) · 2.33 KB
/
csharp-linux-snippets.yaml
File metadata and controls
77 lines (67 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: csharp linux snippets
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "15 7 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
permissions: {}
jobs:
sdk-versions:
runs-on: ubuntu-latest
outputs:
senzingsdk-versions: ${{ steps.cfg.outputs.senzingsdk-versions }}
steps:
- id: cfg
uses: senzing-factory/build-resources/sdk-versions@v4
csharp-linux-snippets:
needs: sdk-versions
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
senzingsdk-version: ${{ fromJSON(needs.sdk-versions.outputs.senzingsdk-versions) }}
include:
- dotnet-version: "8"
steps:
- name: checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: install Senzing runtime
uses: senzing-factory/github-action-install-senzing-sdk@v4
with:
packages-to-install: "senzingsdk-runtime senzingsdk-setup"
senzingsdk-version: ${{ matrix.senzingsdk-version }}
- 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
- name: Notify Slack on failure
if: (failure() || cancelled()) && github.event_name == 'schedule'
uses: senzing-factory/build-resources/slack-failure-notification@v4
with:
job-status: ${{ job.status }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
additional-info: "SDK: ${{ matrix.senzingsdk-version }}"