diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index 89971fdf7..d7900e05f 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -8,14 +8,40 @@ description: "Install Java package dependencies required to run Smithy-Dafny cod runs: using: "composite" steps: - - name: Install smithy-dafny-codegen Rust dependencies locally - uses: gradle/gradle-build-action@v2 + - name: Setup Java 17 for codegen + uses: actions/setup-java@v3 with: - arguments: :codegen-client:pTML :codegen-core:pTML :rust-runtime:pTML - build-root-directory: mpl/smithy-dafny/smithy-dafny-codegen-modules/smithy-rs + distribution: "corretto" + java-version: "17" - - name: Install smithy-dafny-codegen Python dependencies locally - uses: gradle/gradle-build-action@v2 + - name: Install smithy-dafny-codegen dependencies locally + shell: bash + run: | + make -C mpl/smithy-dafny mvn_local_deploy_polymorph_dependencies + + - name: Setup Python, black, and docformatter for code formatting + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - shell: bash + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade black + python -m pip install --upgrade docformatter + + - name: Install Go + uses: actions/setup-go@v5 with: - arguments: :smithy-python-codegen:pTML - build-root-directory: mpl/smithy-dafny/codegen/smithy-dafny-codegen-modules/smithy-python/codegen + go-version: "1.23" + + - name: Install Go imports + shell: bash + run: | + go install golang.org/x/tools/cmd/goimports@latest + + # Without this the if-dafny-at-least command includes "Downloading ..." output + - name: Arbitrary makefile target to force downloading Gradle + shell: bash + run: | + make -C mpl/StandardLibrary setup_net diff --git a/.github/actions/polymorph_codegen/action.yml b/.github/actions/polymorph_codegen/action.yml index 4eed3a9c5..c43cc1b5c 100644 --- a/.github/actions/polymorph_codegen/action.yml +++ b/.github/actions/polymorph_codegen/action.yml @@ -57,6 +57,12 @@ inputs: runs: using: "composite" steps: + - name: Install smithy-dafny dependencies + shell: bash + working-directory: mpl/smithy-dafny + run: | + make mvn_local_deploy_polymorph_dependencies + - name: Update MPL submodule locally if requested if: inputs.update-and-regenerate-mpl == 'true' shell: bash diff --git a/.github/workflows/library_dafny_verification.yml b/.github/workflows/library_dafny_verification.yml index a90d5fa6a..6f94c7eb2 100644 --- a/.github/workflows/library_dafny_verification.yml +++ b/.github/workflows/library_dafny_verification.yml @@ -48,7 +48,6 @@ jobs: dafny-version: ${{ inputs.dafny }} - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/library_java_tests.yml b/.github/workflows/library_java_tests.yml index 4ab45937d..80c3b7d68 100644 --- a/.github/workflows/library_java_tests.yml +++ b/.github/workflows/library_java_tests.yml @@ -54,7 +54,6 @@ jobs: dafny-version: ${{ inputs.dafny }} - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary