Skip to content

Commit

Permalink
Fix CI. (#64)
Browse files Browse the repository at this point in the history
- Use pinned version Github virtual environment, instead of latest. This prevents CI from breaking unexpectedly what ubuntu-latest changes its meaning.
- Update version of aws-crt-builder used to run tests
- Remove bizarre `cross-compile` job that was actually building aws-crt-cpp and looks like an ancient copy/paste error.
- Fix Windows x86 Visual Studio 2015 build so it actually does x86 2015
  • Loading branch information
graebm authored Feb 11, 2022
1 parent f850f5b commit d5dacf8
Showing 1 changed file with 17 additions and 34 deletions.
51 changes: 17 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,38 @@ on:
- '!main'

env:
BUILDER_VERSION: v0.8.28
BUILDER_VERSION: v0.9.10
BUILDER_SOURCE: releases
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: aws-c-iot
LINUX_BASE_IMAGE: ubuntu-16-x64
LINUX_BASE_IMAGE: ubuntu-18-x64
RUN: ${{ github.run_id }}-${{ github.run_number }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1

jobs:
linux-compat:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # latest
strategy:
fail-fast: false
matrix:
image:
- manylinux2014-x64
- manylinux2014-x86
- fedora-34-x64
- opensuse-leap
- rhel8-x64
- al2-x64
steps:
- name: Checkout Sources
uses: actions/checkout@v2
- name: Build ${{ env.PACKAGE_NAME }}
run: |
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
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }} downstream
# TODO: Setup the pbtest to run without depending on the submodule build
# pbtest:
# runs-on: ubuntu-latest
# runs-on: ubuntu-20.04 # latest
# steps:
# - uses: actions/checkout@v2
# with:
Expand All @@ -49,7 +51,7 @@ jobs:
# docker run --mount type=bind,source=$(pwd),target=/root/${{ env.PACKAGE_NAME }} --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} downstream

linux-compiler-compat:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # latest
strategy:
matrix:
compiler:
Expand All @@ -72,7 +74,7 @@ jobs:
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=${{ matrix.compiler }} --spec downstream
clang-sanitizers:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # latest
strategy:
matrix:
sanitizers: [",thread", ",address,undefined"]
Expand All @@ -84,7 +86,7 @@ jobs:
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=clang-11 --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}"
linux-shared-libs:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # latest
steps:
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Build ${{ env.PACKAGE_NAME }}
Expand All @@ -93,56 +95,37 @@ jobs:
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
windows:
runs-on: windows-latest
runs-on: windows-2022 # latest
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
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 }}
windows-vc14:
runs-on: windows-latest
runs-on: windows-2019 # windows-2019 is last env with Visual Studio 2015 (v14.0) toolset
strategy:
matrix:
arch: [x86, x64]
arch: [Win32, x64]
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
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 }} --target windows-${{ matrix.arch }} --compiler msvc-14
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-Tv140 --cmake-extra=-A${{ matrix.arch }}
windows-shared-libs:
runs-on: windows-latest
runs-on: windows-2022 # latest
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
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 }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
osx:
runs-on: macos-latest
runs-on: macos-11 # latest
steps:
- name: Checkout Sources
uses: actions/checkout@v2
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream
cross_compile:
name: Cross Compile ${{matrix.arch}}
runs-on: ubuntu-latest
strategy:
matrix:
arch: [linux-armv6, linux-armv7, linux-arm64, android-armv7]

steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
./builder build -p aws-crt-cpp --spec=downstream --target=${{matrix.arch}} run_tests=false

0 comments on commit d5dacf8

Please sign in to comment.