Skip to content

Commit

Permalink
feat: standardize format, to make examining diffs easier
Browse files Browse the repository at this point in the history
  • Loading branch information
ajewellamz committed Apr 12, 2024
1 parent f94b9a8 commit 0ba1f82
Show file tree
Hide file tree
Showing 214 changed files with 78,874 additions and 60,839 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This workflow runs for every pull request
name: Java Format Check

on:
pull_request:

jobs:
check-java:
- name: Check format of Java, md and yaml
shell: bash
run: |
make format_java_misc-check
4 changes: 2 additions & 2 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
inputs:
dafny:
description: 'The Dafny version to use'
description: "The Dafny version to use"
required: true
type: string

Expand All @@ -27,4 +27,4 @@ jobs:
manual-ci-rust:
uses: ./.github/workflows/test_models_rust_tests.yml
with:
dafny: ${{ inputs.dafny }}
dafny: ${{ inputs.dafny }}
16 changes: 11 additions & 5 deletions .github/workflows/nightly_dafny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,32 @@ jobs:
if: github.event_name != 'schedule' || github.repository_owner == 'smithy-lang'
uses: ./.github/workflows/test_models_dafny_verification.yml
with:
dafny: 'nightly-latest'
dafny: "nightly-latest"
dafny-nightly-java:
if: github.event_name != 'schedule' || github.repository_owner == 'smithy-lang'
uses: ./.github/workflows/test_models_java_tests.yml
with:
dafny: 'nightly-latest'
dafny: "nightly-latest"
dafny-nightly-net:
if: github.event_name != 'schedule' || github.repository_owner == 'smithy-lang'
uses: ./.github/workflows/test_models_net_tests.yml
with:
dafny: 'nightly-latest'
dafny: "nightly-latest"
dafny-nightly-rust:
if: github.event_name != 'schedule' || github.repository_owner == 'smithy-lang'
uses: ./.github/workflows/test_models_rust_tests.yml
with:
dafny: 'nightly-latest'
dafny: "nightly-latest"

cut-issue-on-failure:
runs-on: ubuntu-latest
needs: [dafny-nightly-verification, dafny-nightly-java, dafny-nightly-net, dafny-nightly-rust]
needs:
[
dafny-nightly-verification,
dafny-nightly-java,
dafny-nightly-net,
dafny-nightly-rust,
]
if: ${{ always() && contains(needs.*.result, 'failure') }}
env:
GH_TOKEN: ${{ secrets.CI_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
pr-populate-dafny-versions:
runs-on: ubuntu-latest
steps:
- name: Populate Dafny versions list
id: populate-dafny-versions-list
run: echo "dafny-versions-list=['4.2.0', '4.4.0']" >> $GITHUB_OUTPUT
- name: Populate Dafny versions list
id: populate-dafny-versions-list
run: echo "dafny-versions-list=['4.2.0', '4.4.0']" >> $GITHUB_OUTPUT
outputs:
dafny-version-list: ${{ steps.populate-dafny-versions-list.outputs.dafny-versions-list }}

pr-ci-verification:
needs: pr-populate-dafny-versions
strategy:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ name: Push CI
on:
push:
branches:
- main-1.x
- main-1.x

jobs:
pr-populate-dafny-versions:
runs-on: ubuntu-latest
steps:
- name: Populate Dafny versions list
id: populate-dafny-versions-list
run: echo "dafny-versions-list=['4.2.0', '4.4.0']" >> $GITHUB_OUTPUT
- name: Populate Dafny versions list
id: populate-dafny-versions-list
run: echo "dafny-versions-list=['4.2.0', '4.4.0']" >> $GITHUB_OUTPUT
outputs:
dafny-version-list: ${{ steps.populate-dafny-versions-list.outputs.dafny-versions-list }}

push-ci-verification:
needs: pr-populate-dafny-versions
strategy:
Expand Down Expand Up @@ -54,4 +54,4 @@ jobs:
- dafny-version: 4.2.0
uses: ./.github/workflows/test_models_rust_tests.yml
with:
dafny: ${{ matrix.dafny-version }}
dafny: ${{ matrix.dafny-version }}
6 changes: 3 additions & 3 deletions .github/workflows/smithy-dafny-conversion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: smithy-dafny-conversion workflows

on:
on:
pull_request:
push:
branches:
Expand All @@ -13,8 +13,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '8'
distribution: "corretto"
java-version: "8"

- name: Setup Dafny
uses: dafny-lang/[email protected]
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/smithy-polymorph.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: smithy-dafny-codegen-cli workflows

on:
on:
pull_request:
push:
branches:
Expand All @@ -13,18 +13,18 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
distribution: "corretto"
java-version: "17"
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
distribution: "corretto"
java-version: "17"
- name: Setup Dafny
uses: dafny-lang/[email protected]
with:
# Matching the hard-coded version for the "2023" edition for now
dafny-version: 4.1.0

- name: Execute smithy-dafny-codegen-cli tests
uses: gradle/gradle-build-action@v2
with:
Expand Down
74 changes: 37 additions & 37 deletions .github/workflows/test_models_dafny_verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_call:
inputs:
dafny:
description: 'The Dafny version to run'
description: "The Dafny version to run"
required: true
type: string

Expand All @@ -14,44 +14,44 @@ jobs:
strategy:
fail-fast: false
matrix:
dafny-version:
dafny-version:
- ${{ inputs.dafny }}
library: [
TestModels/dafny-dependencies/StandardLibrary, # This stores current Polymorph dependencies that all TestModels depend on
TestModels/Aggregate,
TestModels/AggregateReferences,
TestModels/CodegenPatches,
TestModels/Constraints,
TestModels/Constructor,
TestModels/Dependencies,
TestModels/Errors,
TestModels/Extendable,
TestModels/Extern,
# TestModels/LanguageSpecificLogic, # requires >4.4.0
TestModels/LocalService,
TestModels/MultipleModels,
TestModels/Refinement,
TestModels/Resource,
# TestModels/SimpleTypes/BigDecimal,
# TestModels/SimpleTypes/BigInteger,
TestModels/SimpleTypes/SimpleBlob,
TestModels/SimpleTypes/SimpleBoolean,
# TestModels/SimpleTypes/SimpleByte,
TestModels/SimpleTypes/SimpleDouble,
TestModels/SimpleTypes/SimpleEnum,
# TestModels/SimpleTypes/SimpleEnumV2,
# TestModels/SimpleTypes/SimpleFloat,
TestModels/SimpleTypes/SimpleInteger,
TestModels/SimpleTypes/SimpleLong,
# TestModels/SimpleTypes/SimpleShort,
TestModels/SimpleTypes/SimpleString,
# TestModels/SimpleTypes/SimpleTimestamp,
TestModels/Union,
TestModels/aws-sdks/ddb,
TestModels/aws-sdks/kms,
TestModels/aws-sdks/sqs-via-cli,
]
os: [ ubuntu-latest ]
TestModels/dafny-dependencies/StandardLibrary, # This stores current Polymorph dependencies that all TestModels depend on
TestModels/Aggregate,
TestModels/AggregateReferences,
TestModels/CodegenPatches,
TestModels/Constraints,
TestModels/Constructor,
TestModels/Dependencies,
TestModels/Errors,
TestModels/Extendable,
TestModels/Extern,
# TestModels/LanguageSpecificLogic, # requires >4.4.0
TestModels/LocalService,
TestModels/MultipleModels,
TestModels/Refinement,
TestModels/Resource,
# TestModels/SimpleTypes/BigDecimal,
# TestModels/SimpleTypes/BigInteger,
TestModels/SimpleTypes/SimpleBlob,
TestModels/SimpleTypes/SimpleBoolean,
# TestModels/SimpleTypes/SimpleByte,
TestModels/SimpleTypes/SimpleDouble,
TestModels/SimpleTypes/SimpleEnum,
# TestModels/SimpleTypes/SimpleEnumV2,
# TestModels/SimpleTypes/SimpleFloat,
TestModels/SimpleTypes/SimpleInteger,
TestModels/SimpleTypes/SimpleLong,
# TestModels/SimpleTypes/SimpleShort,
TestModels/SimpleTypes/SimpleString,
# TestModels/SimpleTypes/SimpleTimestamp,
TestModels/Union,
TestModels/aws-sdks/ddb,
TestModels/aws-sdks/kms,
TestModels/aws-sdks/sqs-via-cli,
]
os: [ubuntu-latest]
include:
# One-offs until TestModels migrate to 4.4.0
- library: TestModels/LanguageSpecificLogic
Expand Down
82 changes: 41 additions & 41 deletions .github/workflows/test_models_java_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_call:
inputs:
dafny:
description: 'The Dafny version to run'
description: "The Dafny version to run"
required: true
type: string

Expand All @@ -15,39 +15,39 @@ jobs:
fail-fast: false
matrix:
library: [
TestModels/dafny-dependencies/StandardLibrary, # This stores current Polymorph dependencies that all TestModels depend on
# TestModels/Aggregate,
# TestModels/AggregateReferences,
TestModels/CodegenPatches,
TestModels/Constraints,
# TestModels/Constructor,
# TestModels/Dependencies,
TestModels/Errors,
TestModels/Extendable,
# TestModels/Extern,
# TestModels/LanguageSpecificLogic,
TestModels/LocalService,
TestModels/MultipleModels,
# TestModels/Refinement,
TestModels/Resource,
# TestModels/SimpleTypes/BigDecimal,
# TestModels/SimpleTypes/BigInteger,
# TestModels/SimpleTypes/SimpleBlob,
# TestModels/SimpleTypes/SimpleBoolean,
# TestModels/SimpleTypes/SimpleByte,
# TestModels/SimpleTypes/SimpleDouble,
# TestModels/SimpleTypes/SimpleEnum,
# TestModels/SimpleTypes/SimpleEnumV2,
# TestModels/SimpleTypes/SimpleFloat,
# TestModels/SimpleTypes/SimpleInteger,
# TestModels/SimpleTypes/SimpleLong,
# TestModels/SimpleTypes/SimpleShort,
# TestModels/SimpleTypes/SimpleString,
# TestModels/SimpleTypes/SimpleTimestamp,
# TestModels/Union,
TestModels/aws-sdks/ddb,
TestModels/aws-sdks/kms,
]
TestModels/dafny-dependencies/StandardLibrary, # This stores current Polymorph dependencies that all TestModels depend on
# TestModels/Aggregate,
# TestModels/AggregateReferences,
TestModels/CodegenPatches,
TestModels/Constraints,
# TestModels/Constructor,
# TestModels/Dependencies,
TestModels/Errors,
TestModels/Extendable,
# TestModels/Extern,
# TestModels/LanguageSpecificLogic,
TestModels/LocalService,
TestModels/MultipleModels,
# TestModels/Refinement,
TestModels/Resource,
# TestModels/SimpleTypes/BigDecimal,
# TestModels/SimpleTypes/BigInteger,
# TestModels/SimpleTypes/SimpleBlob,
# TestModels/SimpleTypes/SimpleBoolean,
# TestModels/SimpleTypes/SimpleByte,
# TestModels/SimpleTypes/SimpleDouble,
# TestModels/SimpleTypes/SimpleEnum,
# TestModels/SimpleTypes/SimpleEnumV2,
# TestModels/SimpleTypes/SimpleFloat,
# TestModels/SimpleTypes/SimpleInteger,
# TestModels/SimpleTypes/SimpleLong,
# TestModels/SimpleTypes/SimpleShort,
# TestModels/SimpleTypes/SimpleString,
# TestModels/SimpleTypes/SimpleTimestamp,
# TestModels/Union,
TestModels/aws-sdks/ddb,
TestModels/aws-sdks/kms,
]
runs-on: "ubuntu-latest"
permissions:
id-token: write
Expand All @@ -74,10 +74,10 @@ jobs:
with:
dafny-version: ${{ inputs.dafny }}

- name: Setup Java
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'corretto'
distribution: "corretto"
java-version: 17

- name: Setup smithy-dafny-conversion
Expand All @@ -89,14 +89,14 @@ jobs:
- name: Setup Java 17 for codegen
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
distribution: "corretto"
java-version: "17"

- name: Setup dependencies
working-directory: ./${{ matrix.library }}
run: |
make setup_prettier
- name: Generate Polymorph Dafny and Java code
shell: bash
working-directory: ./${{ matrix.library }}
Expand All @@ -108,8 +108,8 @@ jobs:
- name: Setup Java 8 for running tests
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '8'
distribution: "corretto"
java-version: "8"

- name: Compile ${{ matrix.library }} implementation
shell: bash
Expand Down
Loading

0 comments on commit 0ba1f82

Please sign in to comment.