From d5dacf85bc2218440485ecd9ed2624a48ce15f1a Mon Sep 17 00:00:00 2001 From: Michael Graeb Date: Fri, 11 Feb 2022 10:43:55 -0800 Subject: [PATCH] Fix CI. (#64) - 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 --- .github/workflows/ci.yml | 51 ++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6ea0c9b..a7518ac2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,11 +7,11 @@ 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 }} @@ -19,16 +19,18 @@ env: 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 @@ -36,7 +38,7 @@ jobs: # 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: @@ -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: @@ -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"] @@ -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 }} @@ -93,7 +95,7 @@ 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: | @@ -101,18 +103,18 @@ jobs: 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: | @@ -120,29 +122,10 @@ jobs: 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 - - -