diff --git a/.github/workflows/performance-benchmarks-go.yml b/.github/workflows/performance-benchmarks-go.yml index 9776da029..894578563 100644 --- a/.github/workflows/performance-benchmarks-go.yml +++ b/.github/workflows/performance-benchmarks-go.yml @@ -2,11 +2,15 @@ name: Performance Benchmarks Go on: + pull_request: + paths: + - ".github/workflows/performance-benchmarks-go.yml" workflow_call: inputs: dafny: description: "The Dafny version to run" required: true + default: '4.9.0' type: string regenerate-code: description: "Regenerate code using smithy-dafny" diff --git a/.github/workflows/performance-benchmarks-java.yml b/.github/workflows/performance-benchmarks-java.yml index fb4082a4c..ba8d5bede 100644 --- a/.github/workflows/performance-benchmarks-java.yml +++ b/.github/workflows/performance-benchmarks-java.yml @@ -2,6 +2,9 @@ name: Performance Benchmarks Go on: + pull_request: + paths: + - ".github/workflows/performance-benchmarks-java.yml" workflow_call: jobs: diff --git a/.github/workflows/performance-benchmarks-net.yml b/.github/workflows/performance-benchmarks-net.yml index 2bafac594..8b2889618 100644 --- a/.github/workflows/performance-benchmarks-net.yml +++ b/.github/workflows/performance-benchmarks-net.yml @@ -2,11 +2,15 @@ name: Performance Benchmarks Net on: + pull_request: + paths: + - ".github/workflows/performance-benchmarks-net.yml" workflow_call: inputs: dafny: description: "The Dafny version to run" required: true + default: '4.9.0' type: string regenerate-code: description: "Regenerate code using smithy-dafny" @@ -59,7 +63,7 @@ jobs: - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny with: - dafny-version: ${{ inputs.dafny }} + dafny-version: ${{ inputs.dafny.default }} - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies diff --git a/.github/workflows/performance-benchmarks-python.yml b/.github/workflows/performance-benchmarks-python.yml index 0f141e6e7..a573e9ac4 100644 --- a/.github/workflows/performance-benchmarks-python.yml +++ b/.github/workflows/performance-benchmarks-python.yml @@ -2,6 +2,9 @@ name: Performance Benchmarks Go on: + pull_request: + paths: + - ".github/workflows/performance-benchmarks-python.yml" workflow_call: jobs: diff --git a/.github/workflows/performance-benchmarks-rust.yml b/.github/workflows/performance-benchmarks-rust.yml index 99c1943d5..28c1c4004 100644 --- a/.github/workflows/performance-benchmarks-rust.yml +++ b/.github/workflows/performance-benchmarks-rust.yml @@ -2,6 +2,9 @@ name: Performance Benchmarks Rust on: + pull_request: + paths: + - ".github/workflows/performance-benchmarks-rust.yml" workflow_call: inputs: dafny: @@ -21,12 +24,7 @@ jobs: matrix: library: [AwsEncryptionSDK] benchmark-dir: [esdk-performance-testing] - os: [ - ubuntu-22.04, - # TODO: Re-enable macOS after https://t.corp.amazon.com/P205755286 - # macos-15, - ] - runs-on: ${{ matrix.os }} + runs-on: codebuild-AWS-ESDK-Performance-${{ github.run_id }}-${{ github.run_attempt }} permissions: id-token: write contents: read @@ -53,46 +51,42 @@ jobs: with: components: rustfmt - - name: Setup Dafny - uses: ./mpl/.github/actions/setup_dafny - with: - dafny-version: 4.10.0 - - - name: Setup Java 17 for codegen - uses: actions/setup-java@v5 - with: - distribution: "corretto" - java-version: "17" - - - name: Setup NASM for Windows (aws-lc-sys) - if: matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 - - - name: Install Smithy-Dafny codegen dependencies - uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - - - name: Regenerate code using smithy-dafny if necessary - if: ${{ inputs.regenerate-code }} - uses: ./.github/actions/polymorph_codegen - with: - dafny: ${{ env.DAFNY_VERSION }} - library: ${{ matrix.library }} - diff-generated-code: false - update-and-regenerate-mpl: true - - - name: Run make polymorph_rust - shell: bash - working-directory: ${{ matrix.library }} - run: | - make polymorph_rust - - - name: Compile ${{ matrix.library }} implementation - shell: bash - working-directory: ${{ matrix.library }} - run: | - # This works because `node` is installed by default on GHA runners - CORES=$(node -e 'console.log(os.cpus().length)') - make transpile_rust CORES=$CORES + #- name: Setup Dafny + # uses: ./mpl/.github/actions/setup_dafny + # with: + # dafny-version: 4.10.0 + + #- name: Setup Java 17 for codegen + # uses: actions/setup-java@v5 + # with: + # distribution: "corretto" + # java-version: "17" + + #- name: Install Smithy-Dafny codegen dependencies + # uses: ./.github/actions/install_smithy_dafny_codegen_dependencies + + #- name: Regenerate code using smithy-dafny if necessary + # if: ${{ inputs.regenerate-code }} + # uses: ./.github/actions/polymorph_codegen + # with: + # dafny: ${{ env.DAFNY_VERSION }} + # library: ${{ matrix.library }} + # diff-generated-code: false + # update-and-regenerate-mpl: true + + #- name: Run make polymorph_rust + # shell: bash + # working-directory: ${{ matrix.library }} + # run: | + # make polymorph_rust + + #- name: Compile ${{ matrix.library }} implementation + # shell: bash + # working-directory: ${{ matrix.library }} + # run: | + # # This works because `node` is installed by default on GHA runners + # CORES=$(node -e 'console.log(os.cpus().length)') + # make transpile_rust CORES=$CORES - name: Run Performance Benchmarks - Quick Mode shell: bash diff --git a/esdk-performance-testing/benchmarks/rust/Cargo.toml b/esdk-performance-testing/benchmarks/rust/Cargo.toml index 517625021..be3f1fc97 100644 --- a/esdk-performance-testing/benchmarks/rust/Cargo.toml +++ b/esdk-performance-testing/benchmarks/rust/Cargo.toml @@ -9,8 +9,8 @@ path = "src/main.rs" [dependencies] # AWS Encryption SDK -# aws-esdk = { path = "/Users/ajewell/esdk_rust/esdk" } -aws-esdk = { path = "../../../AwsEncryptionSDK/runtimes/rust" } +#aws-esdk = { path = "../../../AwsEncryptionSDK/runtimes/rust" } +aws-esdk = "1.2.2" # Async runtime tokio = { version = "1.49", features = ["full"] }