Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/aws-actions/stale-…
Browse files Browse the repository at this point in the history
…issue-cleanup-6
  • Loading branch information
bretambrose committed Dec 7, 2023
2 parents 79e88cc + e06d615 commit 153b4fd
Show file tree
Hide file tree
Showing 18 changed files with 164 additions and 101 deletions.
33 changes: 0 additions & 33 deletions .github/docker-images/debian-stretch-arm32v5/Dockerfile

This file was deleted.

33 changes: 0 additions & 33 deletions .github/docker-images/debian-stretch-arm32v7/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion .github/docker-images/manylinux2014-aarch64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN /opt/python/cp39-cp39/bin/python -m pip install --upgrade setuptools virtual
###############################################################################
# nodejs/npm
###############################################################################
RUN curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
RUN curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
RUN sudo yum -y install nodejs && node --version

###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion .github/docker-images/swift-5-al2-x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://hub.docker.com/_/swift
FROM swift:5.5.3-amazonlinux2
FROM swift:5.7.3-amazonlinux2

###############################################################################
# Install prereqs
Expand Down
2 changes: 1 addition & 1 deletion .github/docker-images/swift-5-centos-x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://hub.docker.com/_/swift
FROM swift:5.5.3-centos7
FROM swift:5.7.3-centos7

###############################################################################
# Install prereqs
Expand Down
2 changes: 1 addition & 1 deletion .github/docker-images/swift-5-ubuntu-x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://hub.docker.com/_/swift
FROM swift:5.5.3-focal
FROM swift:5.7.3-focal

###############################################################################
# Install prereqs
Expand Down
47 changes: 47 additions & 0 deletions .github/docker-images/ubuntu-22-x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

###############################################################################
# Install prereqs
###############################################################################
RUN apt-get update -qq \
&& apt-get -y install \
git \
curl \
sudo \
unzip \
python3-dev \
python3-pip \
build-essential \
# For PPAs
software-properties-common \
apt-transport-https \
ca-certificates \
&& apt-get clean

###############################################################################
# Python/AWS CLI
###############################################################################
WORKDIR /tmp

RUN python3 -m pip install setuptools \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip \
&& unzip awscliv2.zip \
&& sudo aws/install \
&& aws --version

###############################################################################
# Install pre-built CMake
###############################################################################
RUN curl -sSL https://d19elf31gohf1l.cloudfront.net/_binaries/cmake/cmake-3.13-manylinux1-x64.tar.gz -o cmake.tar.gz \
&& tar xvzf cmake.tar.gz -C /usr/local \
&& cmake --version \
&& rm -f /tmp/cmake.tar.gz

###############################################################################
# Install entrypoint
###############################################################################
ADD entrypoint.sh /usr/local/bin/builder
RUN chmod a+x /usr/local/bin/builder
ENTRYPOINT ["/usr/local/bin/builder"]
40 changes: 35 additions & 5 deletions .github/workflows/create-channel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout Source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get release tag
uses: ./.github/actions/release-tag
Expand Down Expand Up @@ -71,16 +71,14 @@ jobs:
- ubuntu-18-x64
- ubuntu-20-x64
- ubuntu-20-aarch64
- debian-stretch-arm32v5
- debian-stretch-arm32v7
- ubuntu-22-x64
- node-10-linux-x64
- swift-5-al2-x64
- swift-5-centos-x64
- swift-5-ubuntu-x64
- rhel8-x64
- opensuse-leap
- fedora-34-x64
- raspbian-bullseye
- alpine-3.16-x64
- alpine-3.16-x86
- alpine-3.16-arm64
Expand All @@ -90,7 +88,7 @@ jobs:

steps:
- name: Checkout Sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get release tag
uses: ./.github/actions/release-tag
Expand Down Expand Up @@ -126,3 +124,35 @@ jobs:
run: |
export IMAGE_TAG=${{ steps.tag.outputs.release_tag }}
docker push ${{ secrets.AWS_ECR_REPO }}/aws-crt-${{ matrix.variant }}:$IMAGE_TAG
# The job will directly pull the image from the latest, and push to the new tag.
# This job is only for a temporary fix. The cheated image would not get updated.
passthrough-images:
name: ${{ matrix.variant }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant:
- raspbian-bullseye

steps:
- name: Checkout Sources
uses: actions/checkout@v4

- name: Get release tag
uses: ./.github/actions/release-tag
id: tag

- name: Login to docker repo
run: aws ecr get-login-password --region us-east-1 | docker login ${{ secrets.AWS_ECR_REPO }} -u AWS --password-stdin

- name: Pull latest image and push
run: |
if ! aws --region us-east-1 ecr describe-repositories --repository-names aws-crt-${{ matrix.variant }} > /dev/null 2>&1; then \
exit 1
fi
export IMAGE_TAG=${{ steps.tag.outputs.release_tag }}
docker pull ${{ secrets.AWS_ECR_REPO }}/aws-crt-${{ matrix.variant }}:latest
docker tag ${{ secrets.AWS_ECR_REPO }}/aws-crt-${{ matrix.variant }}:latest ${{ secrets.AWS_ECR_REPO }}/aws-crt-${{ matrix.variant }}:$IMAGE_TAG
docker push ${{ secrets.AWS_ECR_REPO }}/aws-crt-${{ matrix.variant }}:$IMAGE_TAG
41 changes: 35 additions & 6 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout Source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get release tag
uses: ./.github/actions/release-tag
Expand Down Expand Up @@ -65,16 +65,13 @@ jobs:
- ubuntu-18-x64
- ubuntu-20-x64
- ubuntu-20-aarch64
- debian-stretch-arm32v5
- debian-stretch-arm32v7
- node-10-linux-x64
- swift-5-al2-x64
- swift-5-centos-x64
- swift-5-ubuntu-x64
- rhel8-x64
- opensuse-leap
- fedora-34-x64
- raspbian-bullseye
- alpine-3.16-x64
- alpine-3.16-x86
- alpine-3.16-arm64
Expand All @@ -84,7 +81,7 @@ jobs:

steps:
- name: Checkout Sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get release tag
uses: ./.github/actions/release-tag
Expand Down Expand Up @@ -132,13 +129,45 @@ jobs:
| aws s3 cp - s3://${{env.AWS_S3_BUCKET}}/releases/$IMAGE_TAG/aws-crt-${{ matrix.variant }}.tar.gz
aws s3 cp s3://${{env.AWS_S3_BUCKET}}/releases/$IMAGE_TAG/aws-crt-${{ matrix.variant }}.tar.gz s3://${{env.AWS_S3_BUCKET}}/LATEST/aws-crt-${{ matrix.variant }}.tar.gz
# The job will directly pull the image from the latest, and push to the new tag.
# This job is only for a temporary fix. The image would not get updated.
passthrough-images:
name: ${{ matrix.variant }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant:
- raspbian-bullseye

steps:
- name: Checkout Sources
uses: actions/checkout@v4

- name: Get release tag
uses: ./.github/actions/release-tag
id: tag

- name: Login to docker repo
run: aws ecr get-login-password --region us-east-1 | docker login ${{ secrets.AWS_ECR_REPO }} -u AWS --password-stdin

- name: Pull latest image and push
run: |
if ! aws --region us-east-1 ecr describe-repositories --repository-names aws-crt-${{ matrix.variant }} > /dev/null 2>&1; then \
exit 1
fi
export IMAGE_TAG=${{ steps.tag.outputs.release_tag }}
docker pull ${{ secrets.AWS_ECR_REPO }}/aws-crt-${{ matrix.variant }}:latest
docker tag ${{ secrets.AWS_ECR_REPO }}/aws-crt-${{ matrix.variant }}:latest ${{ secrets.AWS_ECR_REPO }}/aws-crt-${{ matrix.variant }}:$IMAGE_TAG
docker push ${{ secrets.AWS_ECR_REPO }}/aws-crt-${{ matrix.variant }}:$IMAGE_TAG
upload-ci-script:
name: Upload container ci script
runs-on: ubuntu-latest

steps:
- name: Checkout Source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get release tag
uses: ./.github/actions/release-tag
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/handle-stale-discussions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: HandleStaleDiscussions
on:
schedule:
- cron: '0 */4 * * *'
discussion_comment:
types: [created]

jobs:
handle-stale-discussions:
name: Handle stale discussions
runs-on: ubuntu-latest
permissions:
discussions: write
steps:
- name: Stale discussions action
uses: aws-github-ops/handle-stale-discussions@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout Source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build and Test
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-container-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ shift

aws ecr get-login-password | docker login 123124136734.dkr.ecr.us-east-1.amazonaws.com -u AWS --password-stdin
export DOCKER_IMAGE=123124136734.dkr.ecr.us-east-1.amazonaws.com/${IMAGE_NAME}:${BUILDER_VERSION}
docker run --env GITHUB_REF --env GITHUB_HEAD_REF --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION --env CXXFLAGS --env AWS_CRT_ARCH $DOCKER_IMAGE --version=${BUILDER_VERSION} $@
docker run --env GITHUB_REF --env GITHUB_HEAD_REF --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION --env CXXFLAGS --env AWS_CRT_ARCH --env CTEST_PARALLEL_LEVEL $DOCKER_IMAGE --version=${BUILDER_VERSION} $@
Loading

0 comments on commit 153b4fd

Please sign in to comment.