-
Notifications
You must be signed in to change notification settings - Fork 14
115 lines (103 loc) · 3.58 KB
/
dafny_interop_test_vector_net.yml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# This workflow performs tests in DotNet with MPL nightly latest.
name: Library DotNet Backwards Interop Test Vectors
on:
workflow_call:
inputs:
mpl-dafny:
description: "The Dafny version to compile the MPL with (4.2.0, dafny-nightly, etc..)"
required: true
type: string
mpl-commit:
description: "The MPL commit to use"
required: false
default: "main"
type: string
dbesdk-dafny:
description: "The Dafny version to compile the DBESDK with (4.2.0, dafny-nightly, etc..)"
required: true
type: string
jobs:
testDotNet:
strategy:
matrix:
library: [TestVectors]
dotnet-version: ["6.0.x"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
steps:
- name: Setup DynamoDB Local
uses: rrainn/[email protected]
with:
port: 8000
cors: "*"
- name: Support longpaths on Git checkout
run: |
git config --global core.longpaths true
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Setup MPL Dafny
uses: dafny-lang/[email protected]
with:
dafny-version: ${{ inputs.mpl-dafny }}
- name: Update MPL submodule
working-directory: submodules/MaterialProviders
run: |
git fetch
git checkout ${{inputs.mpl-commit}}
git pull
git submodule update --init --recursive
git rev-parse HEAD
- name: Download Dependencies
working-directory: ./${{ matrix.library }}
run: make setup_net
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-DDBEC-Dafny-Role-us-west-2
role-session-name: DDBEC-Dafny-Net-Tests
- name: Compile MPL with Dafny ${{inputs.mpl-dafny}}
shell: bash
working-directory: submodules/MaterialProviders/TestVectorsAwsCryptographicMaterialProviders
run: |
make setup_net
# This works because `node` is installed by default on GHA runners
CORES=$(node -e 'console.log(os.cpus().length)')
make transpile_net CORES=$CORES
- name: Setup DBESDK Dafny
uses: dafny-lang/[email protected]
with:
dafny-version: ${{ inputs.dbesdk-dafny}}
- name: Build DynamoDbEncryption implementation
shell: bash
working-directory: DynamoDbEncryption
run: |
# This works because `node` is installed by default on GHA runners
make transpile_implementation_net
make transpile_test_net
- name: Build TestVectors implementation
shell: bash
working-directory: ${{matrix.library}}
run: |
# This works because `node` is installed by default on GHA runners
make transpile_implementation_net
make transpile_test_net
- name: Test TestVectors on .NET 6.0
working-directory: ./${{matrix.library}}/runtimes/net
run: |
cp ../java/decrypt_java_*.json ../java/decrypt_dotnet_*.json .
dotnet run
cp ../java/*.json .
dotnet run --framework net6.0