-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b395e0
commit 768014f
Showing
650 changed files
with
38,626 additions
and
205 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
.github/actions/install_smithy_dafny_codegen_dependencies/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# This local action sets up code dependencies | ||
# to run Smithy-Dafny CI in GitHub Actions workflows. | ||
# | ||
|
||
name: "Install Smithy-Dafny codegen dependencies" | ||
description: "Install Java package dependencies required to run Smithy-Dafny codegen" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install smithy-dafny-codegen Rust dependencies locally | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: :codegen-client:pTML :codegen-core:pTML :rust-runtime:pTML | ||
build-root-directory: smithy-dafny-codegen-modules/smithy-rs | ||
|
||
- name: Install smithy-dafny-codegen Python dependencies locally | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: :smithy-python-codegen:pTML | ||
build-root-directory: codegen/smithy-dafny-codegen-modules/smithy-python/codegen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# This workflow performs tests in Python. | ||
name: Library Python tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
dafny: | ||
description: "The Dafny version to run" | ||
required: true | ||
type: string | ||
num_shards: | ||
required: false | ||
type: number | ||
default: 5 | ||
|
||
jobs: | ||
populate-matrix-dimensions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Populate shard list | ||
id: populate-shard-list | ||
run: echo "shard-list=[`seq -s , 1 ${{ inputs.num_shards }}`]" >> $GITHUB_OUTPUT | ||
outputs: | ||
shard-list: ${{ steps.populate-shard-list.outputs.shard-list }} | ||
|
||
testPython: | ||
needs: populate-matrix-dimensions | ||
strategy: | ||
fail-fast: false # at least for development; see all errors | ||
matrix: | ||
shard: ${{ fromJson(needs.populate-matrix-dimensions.outputs.shard-list) }} | ||
runs-on: "ubuntu-latest" | ||
permissions: | ||
id-token: write | ||
contents: read | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_NOLOGO: 1 | ||
steps: | ||
- name: Support longpaths on Git checkout | ||
run: | | ||
git config --global core.longpaths true | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-PolymorphTestModels-Role-us-west-2 | ||
role-session-name: PythonTests | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Dafny | ||
uses: dafny-lang/[email protected] | ||
with: | ||
dafny-version: ${{ inputs.dafny }} | ||
|
||
- name: Setup Python for running tests | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
architecture: x64 | ||
- run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade tox | ||
pip install poetry | ||
- name: Setup Java 17 for codegen | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "corretto" | ||
java-version: 17 | ||
|
||
- name: Setup smithy-dafny-conversion | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: publishToMavenLocal | ||
build-root-directory: smithy-dafny-conversion | ||
|
||
- name: Install Smithy-Dafny codegen dependencies | ||
uses: ./.github/actions/install_smithy_dafny_codegen_dependencies | ||
|
||
- name: Install smithy-dafny-codegen locally | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: :smithy-dafny-codegen:pTML | ||
build-root-directory: codegen | ||
|
||
- name: Execute smithy-dafny-codegen-test tests | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
JUNIT_SHARD: ${{ matrix.shard }} | ||
JUNIT_SHARD_COUNT: ${{ inputs.num_shards }} | ||
with: | ||
arguments: :smithy-dafny-codegen-test:test --tests '*smithypython*' --info | ||
build-root-directory: codegen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,16 @@ format_java_misc-check: setup_prettier | |
setup_prettier: | ||
npm i --no-save prettier@3 [email protected] | ||
|
||
mvn_local_deploy_polymorph_dependencies: | ||
mvn_local_deploy_polymorph_dependencies: mvn_local_deploy_polymorph_rust_dependencies mvn_local_deploy_polymorph_python_dependencies | ||
|
||
mvn_local_deploy_polymorph_rust_dependencies: | ||
cd smithy-dafny-codegen-modules/smithy-rs; \ | ||
./gradlew :codegen-client:pTML :codegen-core:pTML :rust-runtime:pTML | ||
|
||
mvn_local_deploy_polymorph_python_dependencies: | ||
cd codegen/smithy-dafny-codegen-modules/smithy-python/codegen; \ | ||
./gradlew :smithy-python-codegen:pTML | ||
|
||
mvn_local_deploy_polymorph: | ||
cd codegen; \ | ||
./gradlew :smithy-dafny-codegen:pTML |
Oops, something went wrong.