-
Notifications
You must be signed in to change notification settings - Fork 20
69 lines (62 loc) · 2.09 KB
/
library_codegen.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
# This workflow regenerates code using smithy-dafny and checks that the output matches what's checked in.
name: Library Code Generation
on:
workflow_call:
inputs:
dafny:
description: "The Dafny version to run"
required: true
type: string
jobs:
code-generation:
strategy:
fail-fast: false
matrix:
library:
[
AwsEncryptionSDK,
]
# Note dotnet is only used for formatting generated code
# in this workflow
dotnet-version: ["6.0.x"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
steps:
- name: Support longpaths
run: |
git config --global core.longpaths true
- uses: actions/checkout@v4
# The specification submodule is private so we don't have access, but we don't need
# it to verify the Dafny code. Instead we manually pull the submodules we DO need.
- run: git submodule update --init libraries
- run: git submodule update --init --recursive mpl
- run: git submodule update --init --recursive smithy-dafny
# Only used to format generated code
# and to translate version strings such as "nightly-latest"
# to an actual DAFNY_VERSION.
- name: Setup Dafny
uses: dafny-lang/[email protected]
with:
dafny-version: ${{ inputs.dafny }}
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Setup Java 17 for codegen
uses: actions/setup-java@v3
with:
distribution: "corretto"
java-version: "17"
- name: Install Smithy-Dafny codegen dependencies
uses: ./.github/actions/install_smithy_dafny_codegen_dependencies
- uses: ./.github/actions/polymorph_codegen
with:
dafny: ${{ env.DAFNY_VERSION }}
library: ${{ matrix.library }}
diff-generated-code: true