From 623ae9830d138fc462aba89403c90a95c3a9a973 Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Mon, 2 Dec 2024 15:17:19 -0800 Subject: [PATCH 01/13] switch over to roles for ci --- .github/workflows/ci.yml | 91 ++++++++++++++++++++++++++++++---------- 1 file changed, 69 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca7bd76..64c4e5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,35 +6,45 @@ on: - 'main' env: - BUILDER_VERSION: v0.9.17 + BUILDER_VERSION: v0.9.72 BUILDER_SOURCE: releases BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net PACKAGE_NAME: aws-crt-dotnet 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 + CRT_CI_ROLE: ${{ secrets.CRT_CI_ROLE_ARN }} + AWS_DEFAULT_REGION: us-east-1 + +permissions: + id-token: write # This is required for requesting the JWT jobs: linux-compat: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: image: - al2-x64 steps: + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} - name: Build ${{ env.PACKAGE_NAME }} + consumers 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 }} --spec=downstream linux-arm: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: arch: [arm64] steps: + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} - name: Install qemu/docker run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages @@ -54,38 +64,59 @@ jobs: - clang-9 - clang-10 - clang-11 + - clang-13 + - clang-15 + - clang-17 - gcc-4.8 - gcc-5 - gcc-6 - gcc-7 - gcc-8 + - gcc-11 + - gcc-13 steps: - # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} + # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages - 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-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=${{ matrix.compiler }} --spec downstream linux_mono: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - name: Build ${{ env.PACKAGE_NAME }} - 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 }} --variant=mono_test + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} + - name: Build ${{ env.PACKAGE_NAME }} + 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 }} --variant=mono_test clang-sanitizers: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: sanitizers: [",thread", ",address,undefined"] steps: - # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages - - 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-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=clang-11 --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}" + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} + # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages + - 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-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=clang-11 --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}" windows-vc16: runs-on: windows-2019 @@ -93,6 +124,10 @@ jobs: matrix: arch: [x64] steps: + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} - name: Setup dotnet # Use setup dotnet action as Windows-2019 image no longer contains .net5.0 uses: actions/setup-dotnet@v3 with: @@ -116,6 +151,10 @@ jobs: matrix: arch: [x86, x64] steps: + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} - name: Setup dotnet uses: actions/setup-dotnet@v3 with: @@ -135,8 +174,12 @@ jobs: python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-14 downstream osx: - runs-on: macos-12 + runs-on: macos-14 steps: + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} - name: Setup dotnet # Use setup dotnet action as macos-12 image no longer contains .net5.0 and .net3.1 uses: actions/setup-dotnet@v3 with: @@ -153,7 +196,7 @@ jobs: # it would be better to run tests natively on one of these machines, # but we don't have access to one in the cloud, so for now just cross-compile osx-arm64-cross-compile: - runs-on: macos-12 + runs-on: macos-14 steps: - name: Build ${{ env.PACKAGE_NAME }} + consumers run: | @@ -163,8 +206,12 @@ jobs: test `lipo aws-crt-dotnet/build/Arm64/lib/libaws-crt-dotnet-ARM64.dylib -archs` = "arm64" check-submodules: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} - name: Checkout Source uses: actions/checkout@v4 with: From 0917fa9fe0e52c39ddc18e302526c6c1f92b163c Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Mon, 2 Dec 2024 15:33:15 -0800 Subject: [PATCH 02/13] mac --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64c4e5c..04cc281 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,7 +174,7 @@ jobs: python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-14 downstream osx: - runs-on: macos-14 + runs-on: macos-14-large steps: - uses: aws-actions/configure-aws-credentials@v4 with: From c6483a0fcaf83b1e701848ae7b67d75776c905d0 Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Mon, 2 Dec 2024 15:43:25 -0800 Subject: [PATCH 03/13] needed? --- builder.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/builder.json b/builder.json index 79c8c91..58d8d20 100644 --- a/builder.json +++ b/builder.json @@ -11,15 +11,6 @@ "imports": [ "dotnetcore" ], - "hosts": { - "al2": { - "packages": [ - "libicu", - "zlib", - "libcurl" - ] - } - }, "targets": { "linux": { "imports": [ From bb261dcf638f455a13e7df238c3d39d272323ff1 Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Mon, 2 Dec 2024 15:47:05 -0800 Subject: [PATCH 04/13] this? --- builder.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/builder.json b/builder.json index 58d8d20..1e57849 100644 --- a/builder.json +++ b/builder.json @@ -11,6 +11,13 @@ "imports": [ "dotnetcore" ], + "hosts": { + "al2": { + "packages": [ + "libicu" + ] + } + }, "targets": { "linux": { "imports": [ From 1792de78ba69ea4f64a661492bec8f1f9eabffaf Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Mon, 2 Dec 2024 15:53:50 -0800 Subject: [PATCH 05/13] maybe that --- builder.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builder.json b/builder.json index 1e57849..51ad796 100644 --- a/builder.json +++ b/builder.json @@ -14,7 +14,9 @@ "hosts": { "al2": { "packages": [ - "libicu" + "libicu", + "zlib", + "libssl" ] } }, From c2e4e41470758fb431987c89b0f373d70c46507a Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Mon, 2 Dec 2024 15:57:56 -0800 Subject: [PATCH 06/13] maybe --- builder.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder.json b/builder.json index 51ad796..b40d4ad 100644 --- a/builder.json +++ b/builder.json @@ -16,7 +16,7 @@ "packages": [ "libicu", "zlib", - "libssl" + "openssl" ] } }, From 9664c1abc8ebbf96147fc10f54633f01c3021c61 Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Mon, 2 Dec 2024 16:03:10 -0800 Subject: [PATCH 07/13] maybe2 --- builder.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder.json b/builder.json index b40d4ad..6091ea4 100644 --- a/builder.json +++ b/builder.json @@ -16,7 +16,7 @@ "packages": [ "libicu", "zlib", - "openssl" + "openssl11" ] } }, From c0e640fa5e574f1995b6b7435e8dea9f076635f9 Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Mon, 2 Dec 2024 16:28:09 -0800 Subject: [PATCH 08/13] down the rabbit hole --- .github/workflows/ci.yml | 2 +- builder.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04cc281..de8f633 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: - 'main' env: - BUILDER_VERSION: v0.9.72 + BUILDER_VERSION: v0.9.50 BUILDER_SOURCE: releases BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net PACKAGE_NAME: aws-crt-dotnet diff --git a/builder.json b/builder.json index 6091ea4..79c8c91 100644 --- a/builder.json +++ b/builder.json @@ -16,7 +16,7 @@ "packages": [ "libicu", "zlib", - "openssl11" + "libcurl" ] } }, From cb10e886fa71d75417b515a4f44574e5828062b7 Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Mon, 2 Dec 2024 16:30:51 -0800 Subject: [PATCH 09/13] rabbit hole 2 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de8f633..4d37b18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: - 'main' env: - BUILDER_VERSION: v0.9.50 + BUILDER_VERSION: v0.9.25 BUILDER_SOURCE: releases BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net PACKAGE_NAME: aws-crt-dotnet From d078cb58b019b72d8543b944d0199ac0600b0b20 Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Mon, 2 Dec 2024 16:37:37 -0800 Subject: [PATCH 10/13] rabbit hole 3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d37b18..3c83903 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: - 'main' env: - BUILDER_VERSION: v0.9.25 + BUILDER_VERSION: v0.9.35 BUILDER_SOURCE: releases BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net PACKAGE_NAME: aws-crt-dotnet From 398755d4e0bcd3040ed35f9a692070d56848011d Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Wed, 4 Dec 2024 16:42:01 -0800 Subject: [PATCH 11/13] new builder --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c83903..aeb469f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: - 'main' env: - BUILDER_VERSION: v0.9.35 + BUILDER_VERSION: v0.9.73 BUILDER_SOURCE: releases BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net PACKAGE_NAME: aws-crt-dotnet From cd080c58af104a7ea32f5510f14b1febf7f6e62c Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Wed, 4 Dec 2024 16:57:50 -0800 Subject: [PATCH 12/13] install mono --- .github/workflows/ci.yml | 2 +- builder.json | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aeb469f..f5a3509 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-ubuntu-20-aarch64 build -p ${{ env.PACKAGE_NAME }} --target=linux-${{ matrix.arch }} linux-compiler-compat: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: compiler: diff --git a/builder.json b/builder.json index 79c8c91..dc6c2a7 100644 --- a/builder.json +++ b/builder.json @@ -89,6 +89,13 @@ "variants": { "mono_test" : { + "hosts": { + "ubuntu": { + "+packages": [ + "mono-runtime" + ] + } + }, "!test_steps": [ "dotnet build tests/tests.csproj -t:MonoTest {build_tests_args} --configuration Debug" ] From 3d164e237bfc7a2a19546eef2e7ee18134b4677d Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Wed, 4 Dec 2024 23:07:53 -0800 Subject: [PATCH 13/13] install all of mono --- builder.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder.json b/builder.json index dc6c2a7..fdddf28 100644 --- a/builder.json +++ b/builder.json @@ -92,7 +92,7 @@ "hosts": { "ubuntu": { "+packages": [ - "mono-runtime" + "mono-complete" ] } },