1name: CI
2
3on:
4  push:
5    branches:
6      - '*'
7      - '!main'
8
9env:
10  BUILDER_VERSION: v0.8.27
11  BUILDER_SOURCE: releases
12  BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
13  PACKAGE_NAME: aws-c-auth
14  LINUX_BASE_IMAGE: ubuntu-16-x64
15  RUN: ${{ github.run_id }}-${{ github.run_number }}
16  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
17  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
18  AWS_REGION: us-east-1
19
20jobs:
21  linux-compat:
22    runs-on: ubuntu-latest
23    strategy:
24      matrix:
25        image:
26          - manylinux1-x64
27          - manylinux1-x86
28          - manylinux2014-x64
29          - manylinux2014-x86
30          - al2-x64
31          - fedora-34-x64
32          - opensuse-leap
33          - rhel8-x64
34    steps:
35        # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
36    - name: Build ${{ env.PACKAGE_NAME }}
37      run: |
38        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
39        ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }} downstream
40
41  linux-compiler-compat:
42    runs-on: ubuntu-latest
43    strategy:
44      matrix:
45        compiler:
46          - clang-3
47          - clang-6
48          - clang-8
49          - clang-9
50          - clang-10
51          - clang-11
52          - gcc-4.8
53          - gcc-5
54          - gcc-6
55          - gcc-7
56          - gcc-8
57    steps:
58      # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
59      - name: Build ${{ env.PACKAGE_NAME }}
60        run: |
61          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
62          ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=${{ matrix.compiler }} --spec downstream
63
64  linux-shared-libs:
65    runs-on: ubuntu-latest
66    steps:
67      # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
68      - name: Build ${{ env.PACKAGE_NAME }}
69        run: |
70          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
71          ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
72
73  windows:
74    runs-on: windows-latest
75    steps:
76    - name: Build ${{ env.PACKAGE_NAME }} + consumers
77      run: |
78        python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
79        python builder.pyz build -p ${{ env.PACKAGE_NAME }}
80
81  windows-vc14:
82    runs-on: windows-latest
83    strategy:
84      matrix:
85        arch: [x86, x64]
86    steps:
87    - name: Build ${{ env.PACKAGE_NAME }} + consumers
88      run: |
89        python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
90        python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-14
91
92  windows-shared-libs:
93    runs-on: windows-latest
94    steps:
95    - name: Build ${{ env.PACKAGE_NAME }} + consumers
96      run: |
97        python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
98        python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
99
100  osx:
101    runs-on: macos-latest
102    steps:
103    - name: Build ${{ env.PACKAGE_NAME }} + consumers
104      run: |
105        python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz', 'builder')"
106        chmod a+x builder
107        ./builder build -p ${{ env.PACKAGE_NAME }} default-downstream
108
109
110