diff --git a/.buildkite/android.yml b/.buildkite/android.yml --- a/.buildkite/android.yml +++ b/.buildkite/android.yml @@ -1,8 +1,11 @@ steps: - label: ':robot_face: Android Build' command: - - 'curl https://sh.rustup.rs -sSf | sh -s -- -y' + - 'curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.85' - 'source /root/.cargo/env' + - 'rustup show' + - 'rustup show active-toolchain || rustup toolchain install' + - 'rustup show' - 'rustup target add aarch64-linux-android arm-linux-androideabi x86_64-linux-android' - 'apt update && apt install -y autoconf libtool build-essential cmake git libgtest-dev libssl-dev zlib1g-dev pkg-config' - 'scripts/install_protobuf.sh' diff --git a/.buildkite/eslint_flow_jest.yml b/.buildkite/eslint_flow_jest.yml --- a/.buildkite/eslint_flow_jest.yml +++ b/.buildkite/eslint_flow_jest.yml @@ -1,6 +1,6 @@ steps: - label: ':eslint: :jest: ESLint & Flow & Jest' - command: '(pkill flow || true) && curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && . /root/.cargo/env && apt update && apt install -y cmake && yarn ci-cleaninstall && yarn eslint:all --max-warnings=0 && yarn flow:all && yarn jest:all' + command: '(pkill flow || true) && curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85 && . /root/.cargo/env && apt update && apt install -y cmake && yarn ci-cleaninstall && yarn eslint:all --max-warnings=0 && yarn flow:all && yarn jest:all' retry: automatic: true plugins: diff --git a/.buildkite/ios.yml b/.buildkite/ios.yml --- a/.buildkite/ios.yml +++ b/.buildkite/ios.yml @@ -2,7 +2,7 @@ - label: ':ios: iOS Build' command: - 'pod repo update && yarn workspace native clean-ios' - - 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y' + - 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85' - 'source /Users/comm/.cargo/env' - 'yarn ci-cleaninstall' - 'cd native && yarn xcodebuild -workspace Comm.xcworkspace -scheme Comm -destination generic/platform=iOS -allowProvisioningUpdates' diff --git a/.buildkite/jsi_codegen.yml b/.buildkite/jsi_codegen.yml --- a/.buildkite/jsi_codegen.yml +++ b/.buildkite/jsi_codegen.yml @@ -3,7 +3,7 @@ command: - '(pkill flow || true)' - 'apt update && apt install -y cmake' - - 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y' + - 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85' - '. /root/.cargo/env' - 'git config --global --add safe.directory /comm' - 'yarn ci-cleaninstall' diff --git a/.buildkite/macos.yml b/.buildkite/macos.yml --- a/.buildkite/macos.yml +++ b/.buildkite/macos.yml @@ -2,7 +2,7 @@ - label: ':macos: macOS Build' command: - 'pod repo update && yarn workspace native clean-ios' - - 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y' + - 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85' - 'source /Users/comm/.cargo/env' - 'yarn ci-cleaninstall' - 'cd desktop && yarn make-dev --arch universal' diff --git a/native/android/app/build.gradle b/native/android/app/build.gradle --- a/native/android/app/build.gradle +++ b/native/android/app/build.gradle @@ -370,6 +370,10 @@ commandLine 'rm', '-rf', '.cxx' } +task addRustToolchain(type: Exec) { + commandLine "rustup", "toolchain", "install", "1.85" +} + // Add cross-compilation targets to Rust toolchain task updateRustToolchain(type: Exec) { commandLine "rustup", "target", "add", @@ -399,12 +403,12 @@ } // Bind preBuild dependencies only if not 'clean' running -if (!isCleanRunning()) { - afterEvaluate { - preBuild.dependsOn(prepareExternalLibs, updateRustToolchain, copyNativeRustLibraryFiles) - } + +afterEvaluate { + preBuild.dependsOn(prepareExternalLibs, addRustToolchain, updateRustToolchain, copyNativeRustLibraryFiles) } + // Run removing CXX task before the clean execution beforeEvaluate { clean.dependsOn(removeCXX) @@ -420,7 +424,7 @@ // Release keystore via macOS Keychain Access def getPassword(String keyLabel) { if (System.getenv('ANDROID_SIGNING_PASSWORD')) { - return System.getenv('ANDROID_SIGNING_PASSWORD') + return System.getenv('ANDROID_SIGNING_PASSWORD') } def stdout = new ByteArrayOutputStream() exec { @@ -438,7 +442,7 @@ // or only from 'adb devices' if running debug release. def getBuildTypeABIs(nativeArchitectures) { if (System.getenv("BUILDKITE") == "true") { - return ["arm64-v8a"] + return ["arm64-v8a"] } def isBundleRelease = gradle.startParameter.taskRequests.any { !it.args.isEmpty() && it.args.first().contains("bundleRelease") diff --git a/native/root.react.js b/native/root.react.js --- a/native/root.react.js +++ b/native/root.react.js @@ -123,6 +123,7 @@ SplashScreen.preventAutoHideAsync().catch(console.log); function Root() { + console.log('test'); const navStateRef = React.useRef<?PossiblyStaleNavigationState>(); const navDispatchRef = React.useRef<?( diff --git a/scripts/ensure_rustup_setup.sh b/scripts/ensure_rustup_setup.sh --- a/scripts/ensure_rustup_setup.sh +++ b/scripts/ensure_rustup_setup.sh @@ -14,7 +14,7 @@ fi if [[ "$(rustup toolchain list)" == "no installed toolchains" ]]; then - rustup toolchain install stable + rustup toolchain install 1.85 fi ensure_target aarch64-apple-ios diff --git a/services/commtest/Dockerfile b/services/commtest/Dockerfile --- a/services/commtest/Dockerfile +++ b/services/commtest/Dockerfile @@ -26,6 +26,9 @@ WORKDIR /home/root/services/commtest +# Add the Rust target for ARM64 architecture +RUN rustup target add aarch64-unknown-linux-gnu + # Install cargo lambda RUN pip3 install cargo-lambda