diff --git a/.github/workflows/run-ci-script.yml b/.github/workflows/run-ci-script.yml index 4db804814..f9a8d726a 100644 --- a/.github/workflows/run-ci-script.yml +++ b/.github/workflows/run-ci-script.yml @@ -77,7 +77,7 @@ jobs: VERIFY: ${{ inputs.verify }} FEATURES: ${{ inputs.features }} - name: Run CI Script - timeout-minutes: 30 + timeout-minutes: 60 run: ${{ inputs.script }} env: TARGET: ${{ inputs.target }} diff --git a/Cargo.toml b/Cargo.toml index b5a4f46a2..f5e5f79d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,8 +12,6 @@ build = "build.rs" edition = "2018" [badges] -appveyor = { repository = "rust-lang/packed_simd" } -travis-ci = { repository = "rust-lang/packed_simd" } codecov = { repository = "rust-lang/packed_simd" } is-it-maintained-issue-resolution = { repository = "rust-lang/packed_simd" } is-it-maintained-open-issues = { repository = "rust-lang/packed_simd" } diff --git a/ci/android-install-sdk.sh b/ci/android-install-sdk.sh index 6b5ac09ab..4e16f1b7e 100644 --- a/ci/android-install-sdk.sh +++ b/ci/android-install-sdk.sh @@ -18,17 +18,22 @@ set -ex # located in https://github.com/appunite/docker by just wrapping it in a script # which apparently magically accepts the licenses. +ANDROID_SDK_URL=https://dl.google.com/android/repository +ANDROID_SDK_ARCHIVE=commandlinetools-linux-9477386_latest.zip + mkdir sdk -curl --retry 5 https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -O -unzip -d sdk sdk-tools-linux-3859397.zip +curl --retry 5 "$ANDROID_SDK_URL/$ANDROID_SDK_ARCHIVE" -O +unzip -d sdk "$ANDROID_SDK_ARCHIVE" case "$1" in arm | armv7) - abi=armeabi-v7a + version="android-24" + abi="armeabi-v7a" ;; aarch64) - abi=arm64-v8a + version="android-31" + abi="arm64-v8a" ;; i686) @@ -45,16 +50,22 @@ case "$1" in ;; esac; +mv sdk/cmdline-tools latest +mkdir sdk/cmdline-tools +mv latest sdk/cmdline-tools + +ANDROID_SDK_BIN="./sdk/cmdline-tools/latest/bin" + # --no_https avoids # javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found -yes | ./sdk/tools/bin/sdkmanager --licenses --no_https -yes | ./sdk/tools/bin/sdkmanager --no_https \ +yes | "$ANDROID_SDK_BIN/sdkmanager" --licenses --no_https +yes | "$ANDROID_SDK_BIN/sdkmanager" --no_https \ "emulator" \ "platform-tools" \ - "platforms;android-24" \ - "system-images;android-24;default;$abi" + "platforms;$version" \ + "system-images;$version;default;$abi" echo "no" | - ./sdk/tools/bin/avdmanager create avd \ + "$ANDROID_SDK_BIN/avdmanager" create avd \ --name "${1}" \ - --package "system-images;android-24;default;$abi" + --package "system-images;$version;default;$abi" diff --git a/ci/docker/aarch64-linux-android/Dockerfile b/ci/docker/aarch64-linux-android/Dockerfile index 27bde89c5..16a14f920 100644 --- a/ci/docker/aarch64-linux-android/Dockerfile +++ b/ci/docker/aarch64-linux-android/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:22.04 RUN dpkg --add-architecture i386 && \ apt-get update && \ @@ -7,10 +7,10 @@ RUN dpkg --add-architecture i386 && \ make \ curl \ ca-certificates \ - python \ + python-is-python3 \ unzip \ expect \ - openjdk-9-jre \ + openjdk-11-jre \ libstdc++6:i386 \ libpulse0 \ gcc \ @@ -20,16 +20,18 @@ WORKDIR /android/ COPY android* /android/ ENV ANDROID_ARCH=aarch64 -ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools -RUN sh /android/android-install-ndk.sh $ANDROID_ARCH +RUN sh /android/android-install-ndk.sh +ENV PATH=$PATH:/android/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin RUN sh /android/android-install-sdk.sh $ANDROID_ARCH +ENV PATH=$PATH:/android/sdk/cmdline-tools:/android/sdk/platform-tools + RUN mv /root/.android /tmp RUN chmod 777 -R /tmp/.android -RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/* +RUN chmod 755 /android/sdk/*tools/**/* /android/sdk/emulator/qemu/linux-x86_64/* ENV PATH=$PATH:/rust/bin \ - CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \ + CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang \ CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER=/tmp/runtest \ OBJDUMP=aarch64-linux-android-objdump \ HOME=/tmp @@ -41,7 +43,7 @@ ENTRYPOINT [ \ # set SHELL so android can detect a 64bits system, see # http://stackoverflow.com/a/41789144 "SHELL=/bin/dash /android/sdk/emulator/emulator @aarch64 -no-window & \ - rustc /tmp/runtest.rs -o /tmp/runtest && \ + rustc /tmp/runtest.rs -O -o /tmp/runtest && \ exec \"$@\"", \ "--" \ ] diff --git a/ci/docker/aarch64-unknown-linux-gnu/Dockerfile b/ci/docker/aarch64-unknown-linux-gnu/Dockerfile index 41ff4729a..96ce2e87e 100644 --- a/ci/docker/aarch64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/aarch64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ ca-certificates \ diff --git a/ci/docker/armv7-linux-androideabi/Dockerfile b/ci/docker/armv7-linux-androideabi/Dockerfile index 995a9e30e..b274769ae 100644 --- a/ci/docker/armv7-linux-androideabi/Dockerfile +++ b/ci/docker/armv7-linux-androideabi/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:22.04 RUN dpkg --add-architecture i386 && \ apt-get update && \ @@ -7,10 +7,10 @@ RUN dpkg --add-architecture i386 && \ make \ curl \ ca-certificates \ - python \ + python-is-python3 \ unzip \ expect \ - openjdk-9-jre \ + openjdk-11-jre \ libstdc++6:i386 \ libpulse0 \ gcc \ @@ -20,18 +20,20 @@ WORKDIR /android/ COPY android* /android/ ENV ANDROID_ARCH=arm -ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools -RUN sh /android/android-install-ndk.sh $ANDROID_ARCH +RUN sh /android/android-install-ndk.sh +ENV PATH=$PATH:/android/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin RUN sh /android/android-install-sdk.sh $ANDROID_ARCH +ENV PATH=$PATH:/android/sdk/cmdline-tools:/android/sdk/platform-tools + RUN mv /root/.android /tmp RUN chmod 777 -R /tmp/.android -RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/* +RUN chmod 755 /android/sdk/*tools/**/* /android/sdk/emulator/qemu/linux-x86_64/* ENV PATH=$PATH:/rust/bin \ - CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \ - CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \ - OBJDUMP=arm-linux-androideabi-objdump \ + CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi19-clang \ + CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \ + OBJDUMP=llvm-objdump \ HOME=/tmp ADD runtest-android.rs /tmp/runtest.rs @@ -41,7 +43,7 @@ ENTRYPOINT [ \ # set SHELL so android can detect a 64bits system, see # http://stackoverflow.com/a/41789144 "SHELL=/bin/dash /android/sdk/emulator/emulator @arm -no-window & \ - rustc /tmp/runtest.rs -o /tmp/runtest && \ + rustc /tmp/runtest.rs -O -o /tmp/runtest && \ exec \"$@\"", \ "--" \ ] diff --git a/ci/docker/thumbv7neon-linux-androideabi/Dockerfile b/ci/docker/thumbv7neon-linux-androideabi/Dockerfile index c1da77109..05a77c2e1 100644 --- a/ci/docker/thumbv7neon-linux-androideabi/Dockerfile +++ b/ci/docker/thumbv7neon-linux-androideabi/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:22.04 RUN dpkg --add-architecture i386 && \ apt-get update && \ @@ -7,10 +7,10 @@ RUN dpkg --add-architecture i386 && \ make \ curl \ ca-certificates \ - python \ + python-is-python3 \ unzip \ expect \ - openjdk-9-jre \ + openjdk-11-jre \ libstdc++6:i386 \ libpulse0 \ gcc \ @@ -20,16 +20,19 @@ WORKDIR /android/ COPY android* /android/ ENV ANDROID_ARCH=arm -ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools -RUN sh /android/android-install-ndk.sh $ANDROID_ARCH +RUN sh /android/android-install-ndk.sh +ENV PATH=$PATH:/android/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin + RUN sh /android/android-install-sdk.sh $ANDROID_ARCH +ENV PATH=$PATH:/android/sdk/cmdline-tools:/android/sdk/platform-tools + RUN mv /root/.android /tmp RUN chmod 777 -R /tmp/.android -RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/* +RUN chmod 755 /android/sdk/*tools/**/* /android/sdk/emulator/qemu/linux-x86_64/* ENV PATH=$PATH:/rust/bin \ - CARGO_TARGET_THUMBV7NEON_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \ + CARGO_TARGET_THUMBV7NEON_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi19-clang \ CARGO_TARGET_THUMBV7NEON_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \ OBJDUMP=arm-linux-androideabi-objdump \ HOME=/tmp @@ -41,7 +44,7 @@ ENTRYPOINT [ \ # set SHELL so android can detect a 64bits system, see # http://stackoverflow.com/a/41789144 "SHELL=/bin/dash /android/sdk/emulator/emulator @arm -no-window & \ - rustc /tmp/runtest.rs -o /tmp/runtest && \ + rustc /tmp/runtest.rs -O -o /tmp/runtest && \ exec \"$@\"", \ "--" \ ] diff --git a/ci/run.sh b/ci/run.sh index b1b22ebd7..ea67dcd63 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -70,9 +70,18 @@ cargo_test_impl() { RUSTFLAGS=${ORIGINAL_RUSTFLAGS} } -# Debug run: -if [[ "${TARGET}" != "wasm32-unknown-unknown" ]]; then - # Run wasm32-unknown-unknown in release mode only +release_only=false +if [[ "${TARGET}" =~ wasm32 ]]; then + release_only=true +elif [[ "${TARGET}" =~ aarch64 ]]; then + release_only=true +elif [[ "${TARGET}" =~ androideabi ]]; then + release_only=true +fi + +if [[ "$release_only" == false ]]; then + # Run wasm32-unknown-unknown, aarch64, and android in release mode only + # as for some reason the emulation quality of these is low cargo_test_impl fi