Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ci.yaml #446

Merged
merged 8 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 131 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
on:
on:
push:
tags:
- '*'
- '*'
pull_request:

name: CI

env:
Expand Down Expand Up @@ -135,14 +135,6 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v2
name: Cargo Cache
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
Expand All @@ -152,15 +144,138 @@ jobs:
java-version: ${{ env.java_version }}
- name: Generate the SDK
run: ./gradlew :aws:sdk:assemble
- name: Run tests, generate docs
run: ./gradlew :aws:sdk:build
- name: Get current date
id: date
run: echo "name=${GITHUB_REF##*/}-$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Generate the SDK...again?
run: ./gradlew :aws:sdk:assemble
- name: Generate a name for the SDK
id: gen-name
run: echo "name=${GITHUB_REF##*/}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
name: Upload SDK Artifact
with:
name: aws-sdk-${{ env.name }}-${{ github.sha }}
path: |
aws/sdk/build/aws-sdk/
!aws/sdk/build/aws-sdk/target

check-sdk:
name: cargo check AWS SDK
needs: generate-sdk
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargocheck
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
- name: Generate a name for the SDK
id: gen-name
run: echo "name=${GITHUB_REF##*/}" >> $GITHUB_ENV
- uses: actions/download-artifact@v2
name: Download SDK Artifact
with:
name: aws-sdk-${{ env.name }}-${{ github.sha }}
path: aws-sdk
- name: Cargo Check
run: cargo check
working-directory: aws-sdk
env:
RUSTFLAGS: -D warnings
test-sdk:
name: cargo test AWS SDK
needs: generate-sdk
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargotest
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
- name: Generate a name for the SDK
id: gen-name
run: echo "name=${GITHUB_REF##*/}" >> $GITHUB_ENV
- uses: actions/download-artifact@v2
name: Download SDK Artifact
with:
name: aws-sdk-${{ env.name }}-${{ github.sha }}
path: aws-sdk
- name: Cargo Test
run: cargo test
working-directory: aws-sdk
env:
RUSTFLAGS: -D warnings
docs-sdk:
name: cargo docs AWS SDK
needs: generate-sdk
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargodocs
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
- name: Generate a name for the SDK
id: gen-name
run: echo "name=${GITHUB_REF##*/}" >> $GITHUB_ENV
- uses: actions/download-artifact@v2
name: Download SDK Artifact
with:
name: aws-sdk-${{ env.name }}-${{ github.sha }}
path: aws-sdk
- name: Cargo Docs
run: cargo doc --no-deps
working-directory: aws-sdk
env:
RUSTFLAGS: -D warnings
clippy-sdk:
name: cargo clippy AWS SDK
needs: generate-sdk
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargoclippy
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
- name: Generate a name for the SDK
id: gen-name
run: echo "name=${GITHUB_REF##*/}" >> $GITHUB_ENV
- uses: actions/download-artifact@v2
name: Download SDK Artifact
with:
name: aws-sdk-${{ env.name }}-${{ github.sha }}
path: aws-sdk
- name: Cargo Clippy
run: cargo clippy -- -D warnings
working-directory: aws-sdk
2 changes: 2 additions & 0 deletions aws/sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ task("generateCargoWorkspace") {
}

task("finalizeSdk") {
dependsOn("assemble")
outputs.upToDateWhen { false }
finalizedBy(
"relocateServices",
"relocateRuntime",
Expand Down