-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (41 loc) · 1.6 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
on:
push:
branches-ignore:
- 'main'
env:
BUILDER_VERSION: v0.8.12
BUILDER_SOURCE: releases
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: smithy-iot-device-sdk-greengrass-ipc
LINUX_BASE_IMAGE: ubuntu-18-x64
HEAD_REF: ${{ github.head_ref }}
RUN: ${{ github.run_id }}-${{ github.run_number }}
AWS_DEFAULT_REGION: us-east-1
jobs:
linux-compat:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- manylinux2014-x64
- al2-x64
steps:
- name: Checkout Sources
uses: actions/checkout@v2
- name: Build ${{ env.PACKAGE_NAME }}
run: |
# TODO Configure credentials to be able to use newer versions of the builder.
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ matrix.image }}:${{ env.BUILDER_VERSION }}
docker pull $DOCKER_IMAGE
docker run --mount type=bind,source=$(pwd),target=/root/${{ env.PACKAGE_NAME }} --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }}
linux-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v2
- name: Build ${{ env.PACKAGE_NAME }}
run: |
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --spec=downstream