diff --git a/.builder/actions/aws_crt_java_build.py b/.builder/actions/aws_crt_java_build.py index dc220d0bf..9a6575a67 100644 --- a/.builder/actions/aws_crt_java_build.py +++ b/.builder/actions/aws_crt_java_build.py @@ -13,10 +13,3 @@ def run(self, env): else: env.shell.exec("mvn", "-P", "continuous-integration", "-B", "compile", check=True) - - parser = argparse.ArgumentParser() - parser.add_argument('--classifier') - args = parser.parse_known_args(env.args.args)[0] - if args.classifier: - env.shell.exec("mvn", "-B", "install", "-DskipTests", "-Dshared-lib.skip=true", - f"-Dcrt.classifier={args.classifier}", check=True) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e211e92e5..eb64eb2d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,25 +81,6 @@ jobs: chmod a+x builder ./builder build -p ${{ env.PACKAGE_NAME }} --target=linux-${{ matrix.arch }} --spec=downstream - linux-musl: - runs-on: ubuntu-22.04 # latest - strategy: - matrix: - image: - - alpine-3.16-x64 - - alpine-3.16-arm64 - - openwrt-x64-openjdk8 - steps: - - name: Install qemu/docker - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - - name: Checkout Sources - uses: actions/checkout@v2 - with: - submodules: true - - 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 }} linux-fips-x64: @@ -137,24 +118,34 @@ jobs: ./builder build -p ${{ env.PACKAGE_NAME }} --target=linux-arm64 --spec=downstream --cmake-extra=-DCRT_FIPS=ON - # armv7 needs its own action due to inability to differentiate at runtime armv6 vs armv7 in the jvm: - # - # At build time we can properly figure out that we're targeting armv7. - # At run time we have to force armv7 (via environment variable) in order to achieve proper resource path - # resolution. - linux-musl-armv7: - runs-on: ubuntu-20.04 # latest + + linux-musl-x64: + runs-on: ubuntu-24.04 # latest + strategy: + matrix: + image: + - alpine-3.16-x64 + - openwrt-x64-openjdk8 + steps: + - 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 }} + + linux-musl-arm: + runs-on: ubuntu-24.04 # latest + strategy: + matrix: + image: + - alpine-3.16-armv7 + - alpine-3.16-arm64 steps: - name: Install qemu/docker run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - - name: Checkout Sources - uses: actions/checkout@v2 - with: - submodules: true - 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-alpine-3.16-armv7 build -p ${{ env.PACKAGE_NAME }} --classifier "armv7" + ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }} raspberry: runs-on: ubuntu-22.04 # latest @@ -164,13 +155,12 @@ jobs: image: - raspbian-bullseye steps: - # set arm arch - - name: Install qemu/docker - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - - 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 }} + - name: Install qemu/docker + run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - 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 }} windows: diff --git a/builder.json b/builder.json index 2f205dd9f..feab51b6b 100644 --- a/builder.json +++ b/builder.json @@ -87,7 +87,23 @@ ], "!test_steps": [ "aws-crt-java-test" - ] + ], + "!run_tests": true, + "architectures": { + "armv7": { + "_comment": [ + "Due to inability to differentiate at runtime armv6 vs armv7 in the jvm", + "At build time we can properly figure out that we're targeting armv7.", + "At run time we have to force armv7 (via environment variable) in order to achieve proper resource path resolution." + ], + "+build_env": { + "AWS_CRT_ARCH": "armv7" + }, + "+test_env": { + "AWS_CRT_ARCH": "armv7" + } + } + } }, "openwrt": { "!packages": [] diff --git a/src/main/java/software/amazon/awssdk/crt/CRT.java b/src/main/java/software/amazon/awssdk/crt/CRT.java index 0c93271f8..eb28886a6 100644 --- a/src/main/java/software/amazon/awssdk/crt/CRT.java +++ b/src/main/java/software/amazon/awssdk/crt/CRT.java @@ -120,7 +120,7 @@ public static String getArchIdentifier() throws UnknownPlatformException { return systemPropertyOverride; } - String environmentOverride = System.getProperty(CRT_ARCH_OVERRIDE_ENVIRONMENT_VARIABLE); + String environmentOverride = System.getenv(CRT_ARCH_OVERRIDE_ENVIRONMENT_VARIABLE); if (environmentOverride != null && environmentOverride.length() > 0) { return environmentOverride; }