Skip to content

feat: Client-side rate limiting #2283

feat: Client-side rate limiting

feat: Client-side rate limiting #2283

name: CI
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
env:
BUILDER_VERSION: v0.9.11
BUILDER_SOURCE: releases
# host owned by CRT team to host aws-crt-builder releases. Contact their on-call with any issues
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: smithy-swift
LINUX_BASE_IMAGE: ubuntu-16-x64
RUN: ${{ github.run_id }}-${{ github.run_number }}
AWS_SDK_SWIFT_CI_DIR: /Users/runner/work/smithy-swift/smithy-swift/target/build/deps/aws-sdk-swift
AWS_CRT_SWIFT_CI_DIR: /Users/runner/work/smithy-swift/smithy-swift/target/build/deps/aws-crt-swift
SMITHY_SWIFT_CI_DIR: /Users/runner/work/smithy-swift/smithy-swift
jobs:
downstream:
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
${{ runner.os }}-gradle-
- uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 17
- name: Build and Test ${{ env.PACKAGE_NAME }} Downstream Consumers
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
AWS_CRT_SWIFT_CI_DIR="${{ env.AWS_CRT_SWIFT_CI_DIR }}" AWS_SDK_SWIFT_CI_DIR="${{ env.AWS_SDK_SWIFT_CI_DIR }}" SMITHY_SWIFT_CI_DIR="${{ env.SMITHY_SWIFT_CI_DIR }}" AWS_SWIFT_SDK_USE_LOCAL_DEPS=1 ./builder build -p ${{ env.PACKAGE_NAME }} --spec downstream
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
swift:
- 5.5-amazonlinux2
- 5.6-focal
- 5.7-amazonlinux2
- 5.8-jammy
container:
image: swift:${{ matrix.swift }}
steps:
- name: Install openssl
run: |
if [ -x "$(command -v apt)" ]; then
apt-get update && apt-get install -y libssl-dev
else
yum install -y openssl-devel
fi
- name: Checkout Sources
uses: actions/checkout@v3
- name: Build and Test
run: swift test