Skip to content

Commit

Permalink
chore(release): 1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skinny85 authored Aug 19, 2020
2 parents 27cfbed + c96e6d0 commit 1e9b8e1
Show file tree
Hide file tree
Showing 971 changed files with 71,498 additions and 65,104 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
extends: ./eslint-config.yaml
root: true
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@

# Github Linguist configuration (https://github.com/github/linguist)
yarn.lock linguidt-generated
*.snap linguist-generated
docs/** linguist-documentation
185 changes: 162 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Main

on:
pull_request:
branches: [main, master]
branches: [main, master, release]
push:
branches: [main, master]
branches: [main, master, release]

env:
DOTNET_NOLOGO: true
Expand All @@ -14,6 +14,7 @@ env:
# - build : Builds the source tree as-is
# - test : Runs all unit tests against the build result
# - create-release-package : Prepares a release package with the "real" version
# - integ-test : Runs integration tests against the release package

jobs:
build:
Expand Down Expand Up @@ -44,8 +45,11 @@ jobs:
- name: Locate Caches
id: cache-locations
run: |-
echo "::group::Upgrade pip"
# Need to have PIP >= 20.1 for "pip cache dir" to work
python3 -m pip install --upgrade pip
echo "::endgroup"
echo "::set-output name=pip-cache::$(python3 -m pip cache dir)"
echo "::set-output name=yarn-cache::$(yarn cache dir)"
- name: Cache
Expand All @@ -55,26 +59,36 @@ jobs:
${{ steps.cache-locations.outputs.pip-cache }}
${{ steps.cache-locations.outputs.yarn-cache }}
~/.m2/repository
!~/.m2/repository/software/amazon/jsii/
~/.nuget/packages
key: ${{ runner.os }}-node@12-python@3.6-${{ hashFiles('**/yarn.lock') }}
!~/.nuget/packages/amazon.jsii.*
key: ${{ runner.os }}-node@12-python@3.6-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }}
restore-keys: |-
${{ runner.os }}-node@12-python@3.6-
${{ runner.os }}-node@12-
${{ runner.os }}-
# Prepare dependencies and build
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: |-
yarn install --frozen-lockfile
- name: Full Build
run: yarn build
- name: "Upload Artifact: built-tree"
run: |-
yarn build
- name: Prepare Artifact
run: |-
tar Jcvf ${{ runner.temp }}/built-tree.tar.xz \
--exclude='**/.env' \
--exclude='**/node_modules' \
--exclude='**/project/.m2/repository' \
--exclude-tag-all='pyenv.cfg' \
--directory=${{ github.workspace }} \
.
# Upload artifact (we'll tar it up to save time)
- name: 'Upload Artifact: built-tree'
uses: actions/upload-artifact@v2
with:
name: built-tree
path: |-
${{ github.workspace }}
!**/.env/**
!**/node_modules/**
!**/project/.m2/**
path: ${{ runner.temp }}/built-tree.tar.xz

create-release-package:
name: Create Release Package
Expand Down Expand Up @@ -104,8 +118,11 @@ jobs:
- name: Locate Caches
id: cache-locations
run: |-
echo "::group::Upgrade pip"
# Need to have PIP >= 20.1 for "pip cache dir" to work
python3 -m pip install --upgrade pip
echo "::endgroup"
echo "::set-output name=pip-cache::$(python3 -m pip cache dir)"
echo "::set-output name=yarn-cache::$(yarn cache dir)"
- name: Cache
Expand All @@ -115,8 +132,10 @@ jobs:
${{ steps.cache-locations.outputs.pip-cache }}
${{ steps.cache-locations.outputs.yarn-cache }}
~/.m2/repository
!~/.m2/repository/software/amazon/jsii/
~/.nuget/packages
key: ${{ runner.os }}-node@12-python@3.6-${{ hashFiles('**/yarn.lock') }}
!~/.nuget/packages/amazon.jsii.*
key: ${{ runner.os }}-node@12-python@3.6-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }}
restore-keys: |-
${{ runner.os }}-node@12-python@3.6-
${{ runner.os }}-node@12-
Expand All @@ -140,17 +159,22 @@ jobs:
--prerelease=nightly.$(date -u +'%Y%m%d') \
--skip.commit
# Now we'll be preparing a release package (with the "real" version)
- name: Align Versions
run: ./scripts/align-version.sh
- name: Run "align-version.sh"
run: |-
./scripts/align-version.sh
- name: Full Build
run: yarn build
- name: Package Libraries
run: yarn package
- name: "Upload Artifact: release-package"
run: |-
yarn build
- name: Package
run: |-
yarn package
# Upload artifacts
- name: 'Upload Artifact: release-package'
uses: actions/upload-artifact@v2
with:
name: release-package
path: ${{ github.workspace }}/dist/

test:
name: Test (${{ matrix.os }} / java ${{ matrix.java }} / node ${{ matrix.node }} / python ${{ matrix.python }})
needs: build
Expand Down Expand Up @@ -226,11 +250,27 @@ jobs:
uses: actions/download-artifact@v2
with:
name: built-tree
# Put GitBash ahead of $PATH, so we avoid surprises due to bad tar, etc...
# (technically a hack around https://github.com/actions/virtual-environments/issues/282)
- name: 'Windows: Put GitBash ahead of $PATH'
if: runner.os == 'Windows'
run: |-
echo "::add-path::C:\Program Files\Git\usr\bin"
- name: Extract Artifact
run: |-
echo "::group::Untar Archive"
tar Jxvf built-tree.tar.xz
echo "::endgroup"
rm built-tree.tar.xz
- name: Locate Caches
id: cache-locations
run: |-
echo "::group::Upgrade pip"
# Need to have PIP >= 20.1 for "pip cache dir" to work
python3 -m pip install --upgrade pip
echo "::endgroup"
echo "::set-output name=pip-cache::$(python3 -m pip cache dir)"
echo "::set-output name=yarn-cache::$(yarn cache dir)"
- name: Cache
Expand All @@ -240,16 +280,115 @@ jobs:
${{ steps.cache-locations.outputs.pip-cache }}
${{ steps.cache-locations.outputs.yarn-cache }}
~/.m2/repository
!~/.m2/repository/software/amazon/jsii/
~/.nuget/packages
!~/.nuget/packages/amazon.jsii.*
# Not including .NET / Java in the cache keys, those artifacts are SDK-version-independent
key: ${{ runner.os }}-node@${{ matrix.node }}-python@${{ matrix.python }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node@${{ matrix.node }}-python@${{ matrix.python }}-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }}
restore-keys: |-
${{ runner.os }}-node@${{ matrix.node }}-python@${{ matrix.python }}-
${{ runner.os }}-node@${{ matrix.node }}-
${{ runner.os }}-
# Install dependencies (ensures arch/os specific packages are re-built)
# Run the tests
- name: Install Dependencies
run: yarn install --frozen-lockfile
# Run all tests
run: |-
yarn install --frozen-lockfile
- name: Test
run: yarn test
run: |-
yarn test
integ-test:
name: Integration Test
needs: create-release-package
runs-on: ubuntu-latest

steps:
# Set up all of our standard runtimes
- name: Set up .NET 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Set up Java 8
uses: actions/setup-java@v1
with:
java-version: '8'
- name: Set up Node 12
uses: actions/setup-node@v2.1.1
with:
node-version: '12'
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: Install python3-venv
run: sudo apt install -y python3-venv
- name: Checkout aws/aws-cdk
uses: actions/checkout@v2
with:
path: aws-cdk
ref: release
repository: aws/aws-cdk
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: release-package
path: ${{ runner.temp }}
- name: Locate Caches
id: cache-locations
run: |-
echo "::group::Upgrade pip"
# Need to have PIP >= 20.1 for "pip cache dir" to work
python3 -m pip install --upgrade pip
echo "::endgroup"
echo "::set-output name=pip-cache::$(python3 -m pip cache dir)"
echo "::set-output name=yarn-cache::$(yarn cache dir)"
- name: Cache
uses: actions/cache@v2
with:
path: |-
${{ steps.cache-locations.outputs.pip-cache }}
${{ steps.cache-locations.outputs.yarn-cache }}
~/.m2/repository
~/.nuget/packages
key: ${{ runner.os }}-node@12-python@3.6-${{ hashFiles('**/yarn.lock', '${{ runner.temp }}/build.json') }}
restore-keys: |-
${{ runner.os }}-node@12-python@3.6-
${{ runner.os }}-node@12-
${{ runner.os }}-
# Run the integration test
- name: Install Dependencies
run: |-
# Python tools used during packaging
python3 -m pip install --upgrade pipx setuptools twine wheel
# TypeScript project dependencies
yarn install --frozen-lockfile
working-directory: aws-cdk
- name: Align Versions
run: |-
# Align versions so we don't build 0.0.0 (it'd fail pack.sh's validation)
./scripts/align-version.sh
working-directory: aws-cdk
- name: Install Tested Packages
run: |-
npm install --no-save ${{ runner.temp }}/js/*.tgz
npm install --no-save ${{ runner.temp }}/private/*.tgz --only=prod
- name: Integration Test
run: |-
npx lerna run build
./pack.sh
env:
CDK_BUILD_JSII: ${{ github.workspace }}/node_modules/.bin/jsii
CDK_PACKAGE_JSII_PACMAK: ${{ github.workspace }}/node_modules/.bin/jsii-pacmak
CDK_PACKAGE_JSII_ROSETTA: ${{ github.workspace }}/node_modules/.bin/jsii-rosetta
# Alternative environment variables:
JSII: ${{ github.workspace }}/node_modules/.bin/jsii
PACMAK: ${{ github.workspace }}/node_modules/.bin/jsii-pacmak
ROSETTA: ${{ github.workspace }}/node_modules/.bin/jsii-rosetta
working-directory: aws-cdk
- name: Upload Result
uses: actions/upload-artifact@v2
with:
name: integ-test-result
path: ${{ github.workspace }}/aws-cdk/dist/
45 changes: 45 additions & 0 deletions .github/workflows/superchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Workflows pertaining to the jsii/superchain Docker image
name: Docker Images

on:
pull_request:
branches: [main, master, release]
# For PRs, only run if there are changes around the Dockerfile
paths: ['superchain/**']
push:
branches: [main, master, release]

jobs:
superchain:
name: jsii/superchain
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Build Image
run: |-
docker build \
--pull \
--build-arg BUILD_TIMESTAMP="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--build-arg COMMIT_ID='${{ github.sha }}' \
--tag 'jsii/superchain:nightly' \
./superchain
- name: Test Image
run: |-
docker run \
--rm \
--tty \
--network=host \
-v${{ github.workspace }}:${{ github.workspace }} \
-w${{ github.workspace }} \
'jsii/superchain:nightly' \
bash -c "yarn install --frozen-lockfile && yarn build && yarn test"
- name: Dump Image
run: |-
docker image save 'jsii/superchain:nightly' \
> ${{ runner.temp }}/jsii-superchain.nightly.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: 'jsii-superchain.nightly'
path: ${{ runner.temp }}/jsii-superchain.nightly.tar
31 changes: 24 additions & 7 deletions .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,32 @@ jobs:
restore-keys: |-
${{ runner.os }}-yarn-
- name: Run "ncu -u" in root
run: npx -p npm-check-updates ncu -u
- name: Install Tools
run: |-
npm -g install lerna npm-check-updates
# If "ncu -u" changed something... we must first invoke "yarn install"
- name: Run "yarn install"
run: yarn install
- name: List Mono-Repo Packages
id: list-packages
# These need to be ignored from the `ncu` runs!
run: |-
echo -n "::set-output name=list::"
node -p "$(lerna ls --all --json 2>/dev/null).map(item => item.name).join(',')"
- name: Run "yarn upgrade"
run: yarn upgrade
- name: Run "ncu -u"
# We special-case @types/node because we want to stay on the current major (minimum supported node release)
# We special-case @types/fs-extra because the current major (9.x) is broken with @types/node@10
run: |-
# Upgrade dependencies at repository root
ncu --upgrade --filter=@types/node,@types/fs-extra --semverLevel=major
ncu --upgrade --reject=@types/node,@types/fs-extra
# Upgrade all the packages
lerna exec --parallel ncu -- --upgrade --filter=@types/node,@types/fs-extra --semverLevel=major
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/fs-extra,${{ steps.list-packages.outputs.list }}'
# This will create a brand new `yarn.lock` file (this is more efficient than `yarn install && yarn upgrade`)
- name: Run "yarn install --force"
run: yarn install --force

- name: Make Pull Request
uses: peter-evans/create-pull-request@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
lerna-debug.log
pip-wheel-metadata/
tsconfig.tsbuildinfo
.DS_Store
.idea
Expand Down
Loading

0 comments on commit 1e9b8e1

Please sign in to comment.