From 18aef8a24d78717daf5948a8334d273da1e599f9 Mon Sep 17 00:00:00 2001 From: Itamar Levy-Or Date: Fri, 29 Apr 2022 13:52:40 -0400 Subject: [PATCH 1/9] maven update and build script --- codebuild/cd/osx-arm64-build.sh | 13 +++++++++++++ crt/aws-c-cal | 2 +- crt/aws-c-common | 2 +- crt/aws-c-http | 2 +- crt/aws-c-io | 2 +- crt/aws-c-s3 | 2 +- crt/s2n | 2 +- pom.xml | 16 ++++++++++++++++ 8 files changed, 35 insertions(+), 6 deletions(-) create mode 100755 codebuild/cd/osx-arm64-build.sh diff --git a/codebuild/cd/osx-arm64-build.sh b/codebuild/cd/osx-arm64-build.sh new file mode 100755 index 000000000..6d79e264c --- /dev/null +++ b/codebuild/cd/osx-arm64-build.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -ex + +cd `dirname $0`/../.. + +git submodule update --init + +mvn -B compile -P mac-arm-make + +# Copy artifacts to dist +mkdir -p ../dist +cp -rv target/cmake-build/lib ../dist/ diff --git a/crt/aws-c-cal b/crt/aws-c-cal index 611690ff1..7eb1d7360 160000 --- a/crt/aws-c-cal +++ b/crt/aws-c-cal @@ -1 +1 @@ -Subproject commit 611690ff1087e7e1481480606f3d491f4914f93b +Subproject commit 7eb1d7360ea205ff275d2acc6cce2682063b643f diff --git a/crt/aws-c-common b/crt/aws-c-common index d9031cf4f..68f28f8df 160000 --- a/crt/aws-c-common +++ b/crt/aws-c-common @@ -1 +1 @@ -Subproject commit d9031cf4f02fe4d8c24a53bb6c8df67ce8be9f0c +Subproject commit 68f28f8df258390744f3c5b460250f8809161041 diff --git a/crt/aws-c-http b/crt/aws-c-http index 3f8ffda54..9c61700e8 160000 --- a/crt/aws-c-http +++ b/crt/aws-c-http @@ -1 +1 @@ -Subproject commit 3f8ffda541eab815646f739cef2b350d6e7d5406 +Subproject commit 9c61700e8c3c359b5398d5452274580a44def686 diff --git a/crt/aws-c-io b/crt/aws-c-io index 045793575..cfe553a77 160000 --- a/crt/aws-c-io +++ b/crt/aws-c-io @@ -1 +1 @@ -Subproject commit 0457935752729d02b3ccc224205622fd275be2bb +Subproject commit cfe553a770e9c2d1c93b8cdfb870b9f2a46b436e diff --git a/crt/aws-c-s3 b/crt/aws-c-s3 index 85b791a1c..92067b1f4 160000 --- a/crt/aws-c-s3 +++ b/crt/aws-c-s3 @@ -1 +1 @@ -Subproject commit 85b791a1ce06812b24ee66825f65f0380aa5cc80 +Subproject commit 92067b1f44523e70337e0c5eb00b80c9cf10b941 diff --git a/crt/s2n b/crt/s2n index 88c7ae4d3..0d41122bd 160000 --- a/crt/s2n +++ b/crt/s2n @@ -1 +1 @@ -Subproject commit 88c7ae4d3fd9b3e9e49fcecc9bee1ddb8099ae70 +Subproject commit 0d41122bd2ca62a5de384b79c524dd48852b2071 diff --git a/pom.xml b/pom.xml index b6e6d0e07..860d1d2d0 100644 --- a/pom.xml +++ b/pom.xml @@ -99,6 +99,17 @@ + + mac-arm-make + + + build_mac_m1 + + + + -DCMAKE_OSX_ARCHITECTURES + + unix-x86 @@ -159,6 +170,7 @@ -DCMAKE_PREFIX_PATH=${cmake.binaries}/install -DCMAKE_INSTALL_PREFIX=${cmake.binaries}/install -DCMAKE_C_FLAGS=${cmake.cflags} + ${cmake.architecture} -DS2N_NO_PQ_ASM=${cmake.s2nNoPqAsm} -DBUILD_TESTING=OFF -Wno-unused-variables @@ -354,6 +366,10 @@ + + + + From f23e8fa4ab9cbed0b515330de95a25af44a14d09 Mon Sep 17 00:00:00 2001 From: Itamar Levy-Or Date: Fri, 29 Apr 2022 14:47:13 -0400 Subject: [PATCH 2/9] update submodules --- crt/aws-c-auth | 2 +- crt/aws-c-common | 2 +- crt/aws-c-http | 2 +- crt/aws-c-io | 2 +- crt/aws-c-s3 | 2 +- crt/s2n | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crt/aws-c-auth b/crt/aws-c-auth index e1b95cca6..5755fc110 160000 --- a/crt/aws-c-auth +++ b/crt/aws-c-auth @@ -1 +1 @@ -Subproject commit e1b95cca6f2248c28b66ddb40bcccd35a59cb8b5 +Subproject commit 5755fc110b6d7e3ac4225fd50415b518e061dd8c diff --git a/crt/aws-c-common b/crt/aws-c-common index 68f28f8df..9b2a8b75f 160000 --- a/crt/aws-c-common +++ b/crt/aws-c-common @@ -1 +1 @@ -Subproject commit 68f28f8df258390744f3c5b460250f8809161041 +Subproject commit 9b2a8b75ff2f9dd53d1a8cdcc366a0834fa4d700 diff --git a/crt/aws-c-http b/crt/aws-c-http index 9c61700e8..b76ebf220 160000 --- a/crt/aws-c-http +++ b/crt/aws-c-http @@ -1 +1 @@ -Subproject commit 9c61700e8c3c359b5398d5452274580a44def686 +Subproject commit b76ebf2207c989e1d8e1c5e1a9ab1b0c32de3483 diff --git a/crt/aws-c-io b/crt/aws-c-io index cfe553a77..8f4508f5e 160000 --- a/crt/aws-c-io +++ b/crt/aws-c-io @@ -1 +1 @@ -Subproject commit cfe553a770e9c2d1c93b8cdfb870b9f2a46b436e +Subproject commit 8f4508f5ec7d2949d5545e2b1ddcd1beb47a76a8 diff --git a/crt/aws-c-s3 b/crt/aws-c-s3 index 92067b1f4..2f6fa845e 160000 --- a/crt/aws-c-s3 +++ b/crt/aws-c-s3 @@ -1 +1 @@ -Subproject commit 92067b1f44523e70337e0c5eb00b80c9cf10b941 +Subproject commit 2f6fa845e76e010abec7a44b1288dda096d1814c diff --git a/crt/s2n b/crt/s2n index 0d41122bd..8314a96de 160000 --- a/crt/s2n +++ b/crt/s2n @@ -1 +1 @@ -Subproject commit 0d41122bd2ca62a5de384b79c524dd48852b2071 +Subproject commit 8314a96de0c33a426ae877856a8a1a431d354e0d From 7b4dfac38ba002b980cce3d9017f8c871f031e05 Mon Sep 17 00:00:00 2001 From: Itamar Levy-Or Date: Mon, 2 May 2022 15:04:40 -0400 Subject: [PATCH 3/9] update deploy_snapshot.yml --- codebuild/cd/deploy-snapshot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/codebuild/cd/deploy-snapshot.yml b/codebuild/cd/deploy-snapshot.yml index 3cf30f260..ab1d28a29 100644 --- a/codebuild/cd/deploy-snapshot.yml +++ b/codebuild/cd/deploy-snapshot.yml @@ -27,6 +27,7 @@ phases: - cp -rv $CODEBUILD_SRC_DIR_linux_x64/dist/* $CODEBUILD_SRC_DIR/aws-crt-java/target/cmake-build/ - cp -rv $CODEBUILD_SRC_DIR_linux_x86/dist/* $CODEBUILD_SRC_DIR/aws-crt-java/target/cmake-build/ - cp -rv $CODEBUILD_SRC_DIR_osx_x64/* $CODEBUILD_SRC_DIR/aws-crt-java/target/cmake-build/ + - cp -rv $CODEBUILD_SRC_DIR_osx_arm64/* $CODEBUILD_SRC_DIR/aws-crt-java/target/cmake-build/ - ls -alR $CODEBUILD_SRC_DIR/aws-crt-java/target/cmake-build/lib # install settings.xml to ~/.m2/settings.xml - mkdir -p $HOME/.m2 From acf18b87f5285d95ae153ac9a030b906e43d8140 Mon Sep 17 00:00:00 2001 From: Itamar Levy-Or Date: Fri, 13 May 2022 13:57:47 -0400 Subject: [PATCH 4/9] rerun CI and magic??? --- codebuild/cd/osx-arm64-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/codebuild/cd/osx-arm64-build.sh b/codebuild/cd/osx-arm64-build.sh index 6d79e264c..57b64f5a0 100755 --- a/codebuild/cd/osx-arm64-build.sh +++ b/codebuild/cd/osx-arm64-build.sh @@ -9,5 +9,6 @@ git submodule update --init mvn -B compile -P mac-arm-make # Copy artifacts to dist +# CI please work mkdir -p ../dist cp -rv target/cmake-build/lib ../dist/ From 5cc9ca519e1239b17e5e0a6f66badc59f51b989a Mon Sep 17 00:00:00 2001 From: Itamar Levy-Or Date: Mon, 16 May 2022 09:33:39 -0400 Subject: [PATCH 5/9] small fixes --- codebuild/cd/osx-arm64-build.sh | 1 - codebuild/cd/osx-x64-build.sh | 2 +- pom.xml | 10 ++++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/codebuild/cd/osx-arm64-build.sh b/codebuild/cd/osx-arm64-build.sh index 57b64f5a0..6d79e264c 100755 --- a/codebuild/cd/osx-arm64-build.sh +++ b/codebuild/cd/osx-arm64-build.sh @@ -9,6 +9,5 @@ git submodule update --init mvn -B compile -P mac-arm-make # Copy artifacts to dist -# CI please work mkdir -p ../dist cp -rv target/cmake-build/lib ../dist/ diff --git a/codebuild/cd/osx-x64-build.sh b/codebuild/cd/osx-x64-build.sh index 74455e952..8ac262be0 100755 --- a/codebuild/cd/osx-x64-build.sh +++ b/codebuild/cd/osx-x64-build.sh @@ -6,7 +6,7 @@ cd `dirname $0`/../.. git submodule update --init -mvn -B compile +mvn -B compile -P mac-x64-make # Copy artifacts to dist mkdir -p ../dist diff --git a/pom.xml b/pom.xml index 860d1d2d0..44a9a2d91 100644 --- a/pom.xml +++ b/pom.xml @@ -89,10 +89,11 @@ - mac-make + mac-x64-make mac + x86_64 @@ -102,9 +103,10 @@ mac-arm-make - - build_mac_m1 - + + mac + arm64 + -DCMAKE_OSX_ARCHITECTURES From 70decdc520755e9779844cd7eb5787c88124c67f Mon Sep 17 00:00:00 2001 From: Itamar Levy-Or Date: Mon, 16 May 2022 10:41:34 -0400 Subject: [PATCH 6/9] cmake-arm64 -> cmake->arch --- pom.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 44a9a2d91..bb1191c71 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,7 @@ - -DCMAKE_OSX_ARCHITECTURES + -DCMAKE_OSX_ARCHITECTURES=arm64 @@ -368,10 +368,11 @@ - - + + + From 080e90f0c99e2c458de040006946a80a6c3b0735 Mon Sep 17 00:00:00 2001 From: Michael Graeb Date: Mon, 16 May 2022 14:07:19 -0700 Subject: [PATCH 7/9] trivial tweaks: - pom file just uses 1 variable: cmake.osx_arch. Instead of cmake.osx_arch leading to the creation of cmake.architecture. Seems simpler this way. - rename profiles: ~mac-x64-make~ -> mac-x64 and ~mac-arm-make~ -> mac-arm64. Because who cares that we're using makefiles --- .gitignore | 2 ++ codebuild/cd/osx-arm64-build.sh | 2 +- codebuild/cd/osx-x64-build.sh | 2 +- pom.xml | 17 +++++++---------- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index ce7109819..cee434243 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,5 @@ settings.xml # docs are updated automatically by .github/workflows/docs.yml docs/ + +bin/ diff --git a/codebuild/cd/osx-arm64-build.sh b/codebuild/cd/osx-arm64-build.sh index 6d79e264c..6864afe1e 100755 --- a/codebuild/cd/osx-arm64-build.sh +++ b/codebuild/cd/osx-arm64-build.sh @@ -6,7 +6,7 @@ cd `dirname $0`/../.. git submodule update --init -mvn -B compile -P mac-arm-make +mvn -B compile -P mac-arm64 # Copy artifacts to dist mkdir -p ../dist diff --git a/codebuild/cd/osx-x64-build.sh b/codebuild/cd/osx-x64-build.sh index 8ac262be0..3dd2f8252 100755 --- a/codebuild/cd/osx-x64-build.sh +++ b/codebuild/cd/osx-x64-build.sh @@ -6,7 +6,7 @@ cd `dirname $0`/../.. git submodule update --init -mvn -B compile -P mac-x64-make +mvn -B compile -P mac-x64 # Copy artifacts to dist mkdir -p ../dist diff --git a/pom.xml b/pom.xml index bb1191c71..eaef7a964 100644 --- a/pom.xml +++ b/pom.xml @@ -41,6 +41,7 @@ UTF-8 OFF OFF + -DOSX_ARCH_DUMMY=1 @@ -89,19 +90,20 @@ - mac-x64-make + mac-x64 mac - x86_64 + x86_64 + -DCMAKE_OSX_ARCHITECTURES=x86_64 - mac-arm-make + mac-arm64 mac @@ -172,10 +174,10 @@ -DCMAKE_PREFIX_PATH=${cmake.binaries}/install -DCMAKE_INSTALL_PREFIX=${cmake.binaries}/install -DCMAKE_C_FLAGS=${cmake.cflags} - ${cmake.architecture} + ${cmake.osx_arch} -DS2N_NO_PQ_ASM=${cmake.s2nNoPqAsm} -DBUILD_TESTING=OFF - -Wno-unused-variables + --no-warn-unused-cli ${cmake.generator} ${cmake.toolset} @@ -368,11 +370,6 @@ - - - - - From 8b96d82a9599bccba1b08712e7b329b3a258a170 Mon Sep 17 00:00:00 2001 From: Itamar Levy-Or Date: Fri, 20 May 2022 07:42:05 -0400 Subject: [PATCH 8/9] update ci to build for osx-arm64 --- .github/workflows/ci.yml | 11 +++++++++++ crt/aws-c-event-stream | 2 +- crt/aws-c-http | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea07dc493..f2d60d9f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,6 +135,17 @@ jobs: chmod a+x builder ./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream + osx-arm64: + runs-on: macos-11 # latest + steps: + - name: Checkout Sources + uses: actions/checkout@v2 + with: + submodules: true + - name: Build ${{ env.PACKAGE_NAME }} + consumers + run: | + mvn compile -P mac-arm-make + android: name: Android # ubuntu-20.04 comes with Android tooling, see: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#android diff --git a/crt/aws-c-event-stream b/crt/aws-c-event-stream index e87537be5..9141f54ca 160000 --- a/crt/aws-c-event-stream +++ b/crt/aws-c-event-stream @@ -1 +1 @@ -Subproject commit e87537be561d753ec82e783bc0929b1979c585f8 +Subproject commit 9141f54caa20376cce5633e785ffd628df569429 diff --git a/crt/aws-c-http b/crt/aws-c-http index b76ebf220..73af2aa20 160000 --- a/crt/aws-c-http +++ b/crt/aws-c-http @@ -1 +1 @@ -Subproject commit b76ebf2207c989e1d8e1c5e1a9ab1b0c32de3483 +Subproject commit 73af2aa20d220dfbb26f22ef15df9651583cd5cb From c60d03da83ae1b9e9496999b8eb2f7ee5778f86a Mon Sep 17 00:00:00 2001 From: Itamar Levy-Or Date: Fri, 20 May 2022 07:52:00 -0400 Subject: [PATCH 9/9] fix build command --- .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 f2d60d9f9..fb59ab1aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,7 +144,7 @@ jobs: submodules: true - name: Build ${{ env.PACKAGE_NAME }} + consumers run: | - mvn compile -P mac-arm-make + mvn -B compile -P mac-arm64 android: name: Android