Skip to content

Commit dc62c3e

Browse files
authored
Fix Github CI so tests actually get run (#213)
- use latest version of aws-crt-builder - fix builder.json - add more linux variants to CI
1 parent 9c646ab commit dc62c3e

File tree

2 files changed

+17
-24
lines changed

2 files changed

+17
-24
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ on:
77
- '!main'
88

99
env:
10-
BUILDER_VERSION: v0.5.2
10+
BUILDER_VERSION: v0.9.11
11+
BUILDER_SOURCE: releases
1112
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
1213
PACKAGE_NAME: aws-iot-device-sdk-java-v2
13-
LINUX_BASE_IMAGE: ubuntu-16-x64
1414
RUN: ${{ github.run_id }}-${{ github.run_number }}
15+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
16+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
17+
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
1518

1619
jobs:
1720
linux-compat:
@@ -20,40 +23,30 @@ jobs:
2023
matrix:
2124
image:
2225
- manylinux2014-x64
26+
- al2-x64
27+
- fedora-34-x64
28+
- opensuse-leap
29+
- rhel8-x64
2330
#- manylinux2014-x86 until we find 32-bit linux binaries we can use
2431
steps:
25-
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
2632
- name: Build ${{ env.PACKAGE_NAME }}
2733
run: |
28-
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
29-
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ matrix.image }}:${{ env.BUILDER_VERSION }}
30-
docker pull $DOCKER_IMAGE
31-
docker run --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }}
32-
33-
al2:
34-
runs-on: ubuntu-latest
35-
steps:
36-
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
37-
- name: Build ${{ env.PACKAGE_NAME }} + consumers
38-
run: |
39-
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
40-
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-al2-x64:${{ env.BUILDER_VERSION }}
41-
docker pull $DOCKER_IMAGE
42-
docker run --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }}
34+
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
35+
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }}
4336
4437
windows:
4538
runs-on: windows-latest
4639
steps:
4740
- name: Build ${{ env.PACKAGE_NAME }} + consumers
4841
run: |
49-
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
50-
python builder.pyz build -p ${{ env.PACKAGE_NAME }}
42+
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
43+
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --spec=downstream
5144
5245
osx:
5346
runs-on: macos-latest
5447
steps:
5548
- name: Build ${{ env.PACKAGE_NAME }} + consumers
5649
run: |
57-
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
50+
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
5851
chmod a+x builder
59-
./builder build -p ${{ env.PACKAGE_NAME }}
52+
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream

builder.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "aws-iot-device-sdk-v2",
2+
"name": "aws-iot-device-sdk-java-v2",
33
"packages": [
44
"maven"
55
],
@@ -24,4 +24,4 @@
2424
]
2525
}
2626
}
27-
}
27+
}

0 commit comments

Comments
 (0)