diff --git a/.github/workflows/slow_tests.yml b/.github/workflows/slow_tests.yml index 9305a262..1df902fd 100644 --- a/.github/workflows/slow_tests.yml +++ b/.github/workflows/slow_tests.yml @@ -180,7 +180,7 @@ jobs: workload_identity_provider: 'projects/741367068918/locations/global/workloadIdentityPools/github/providers/github-actions' service_account: 'github-actions@signal-build-artifacts.iam.gserviceaccount.com' - run: rustup toolchain install $(cat rust-toolchain) --profile minimal - - run: bin/fetch-artifact -p linux-x64 --for-simulator + - run: bin/fetch-artifact -p linux-x64 - name: Build call sim run: bin/build-desktop --call-sim-cli-only --release - name: Get media files diff --git a/.github/workflows/webrtc_artifacts.yml b/.github/workflows/webrtc_artifacts.yml index 413d973e..6d9d8a7c 100644 --- a/.github/workflows/webrtc_artifacts.yml +++ b/.github/workflows/webrtc_artifacts.yml @@ -92,7 +92,7 @@ jobs: - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y protobuf-compiler crossbuild-essential-arm64 - - run: ./bin/build-webrtc.py --target linux --release --build-for-simulator + - run: ./bin/build-webrtc.py --target linux --release - name: Output Artifact Checksum run: | @@ -135,7 +135,7 @@ jobs: # Installs the pkg_resources python module needed to build webrtc on a mac host - run: pip install setuptools - - run: ./bin/build-webrtc.py --target mac --release --build-for-simulator + - run: ./bin/build-webrtc.py --target mac --release - name: Output Artifact Checksum run: | @@ -185,7 +185,7 @@ jobs: version-sdk: 26100 features: 'OptionId.WindowsDesktopDebuggers' - - run: python bin/build-webrtc.py --target windows --release --build-for-simulator + - run: python bin/build-webrtc.py --target windows --release shell: bash - name: Output Artifact Checksum diff --git a/Makefile b/Makefile index 0a95cd94..629b1e93 100644 --- a/Makefile +++ b/Makefile @@ -120,10 +120,10 @@ call_sim-cli: fi $(Q) if [ "$(TYPE)" = "debug" ] ; then \ echo "call_sim-cli: Debug build" ; \ - ./bin/build-desktop --build-for-simulator --no-electron -d ; \ + ./bin/build-desktop --no-electron -d ; \ else \ echo "call_sim-cli: Release build" ; \ - ./bin/build-desktop --build-for-simulator --no-electron -r ; \ + ./bin/build-desktop --no-electron -r ; \ fi PHONY += clean diff --git a/bin/build-desktop b/bin/build-desktop index 6e0b9041..544e0941 100755 --- a/bin/build-desktop +++ b/bin/build-desktop @@ -15,7 +15,7 @@ TARGET_ARCH=${TARGET_ARCH:-$(uname -m)} usage() { - echo 'usage: build-desktop [-d|-r|-c] [--webrtc-only|--ringrtc-only|--call-sim-cli-only] [--no-electron] [--no-call-sim-cli] [--archive-webrtc] [--build-for-simulator] [--test-ringrtc-adm] + echo 'usage: build-desktop [-d|-r|-c] [--webrtc-only|--ringrtc-only|--call-sim-cli-only] [--no-electron] [--no-call-sim-cli] [--archive-webrtc] [--test-ringrtc-adm] where: -d to create a debug build (default) -r to create a release build @@ -25,7 +25,6 @@ usage() --ringrtc-only builds libringrtc-ARCH.node only --webrtc-tests also builds webrtc tests --test-ringrtc-adm also tests the ringrtc ADM. - --build-for-simulator also builds extra test tools used in simulators --archive-webrtc generates an archive suitable for later --ringrtc-only builds' } @@ -46,7 +45,6 @@ SKIP_ELECTRON= ARCHIVE_WEBRTC= TEST_RINGRTC_ADM= TEST_RINGRTC_ADM_UTILS= -BUILD_FOR_SIMULATOR= while [ "$1" != "" ]; do case $1 in @@ -83,9 +81,6 @@ while [ "$1" != "" ]; do --test-ringrtc-adm-utils ) TEST_RINGRTC_ADM_UTILS=yes ;; - --build-for-simulator ) - BUILD_FOR_SIMULATOR=yes - ;; -c | --clean ) clean exit @@ -133,11 +128,6 @@ then WEBRTC_ARGS="target_cpu=\"${GN_ARCH}\" rtc_build_examples=false rtc_build_tools=false rtc_use_x11=false rtc_enable_sctp=false rtc_libvpx_build_vp9=true rtc_disable_metrics=true rtc_disable_trace_events=true use_siso=true" - if [ -n "${BUILD_FOR_SIMULATOR}" ] - then - WEBRTC_ARGS="${WEBRTC_ARGS} rtc_use_dummy_audio_file_devices=true" - fi - if [ -n "${BUILD_WEBRTC_TESTS}" ] then WEBRTC_ARGS="${WEBRTC_ARGS} rtc_include_tests=true rtc_enable_protobuf=true" @@ -193,10 +183,6 @@ then if [ -n "${ARCHIVE_WEBRTC}" ] then ARCHIVE_NAME=webrtc-"${WEBRTC_VERSION}"-"${HOST_PLATFORM}"-"${TARGET_ARCH}"-"${BUILD_TYPE}" - if [ -n "${BUILD_FOR_SIMULATOR}" ] - then - ARCHIVE_NAME="${ARCHIVE_NAME}"-sim - fi tar -c --auto-compress --dereference -f "${OUTPUT_DIR}"/"${ARCHIVE_NAME}".tar.bz2 -C "${OUTPUT_DIR}" "${STATIC_LIB_PATH}" "${BUILD_TYPE}/LICENSE.md" fi fi @@ -229,7 +215,7 @@ then exit 1 esac - echo "Building for platform ${DEFAULT_PLATFORM}, TARGET_ARCH=${TARGET_ARCH}, CARGO_TARGET=${CARGO_TARGET}, BUILD_FOR_SIMULATOR=${BUILD_FOR_SIMULATOR}" + echo "Building for platform ${DEFAULT_PLATFORM}, TARGET_ARCH=${TARGET_ARCH}, CARGO_TARGET=${CARGO_TARGET}" # Build and link the final RingRTC library. ( diff --git a/bin/build-webrtc.py b/bin/build-webrtc.py index deeb5b8a..65e33c2a 100755 --- a/bin/build-webrtc.py +++ b/bin/build-webrtc.py @@ -37,9 +37,6 @@ def parse_args(): parser.add_argument('--target', required=True, help='build target: ' + ', '.join(TARGET_PLATFORMS)) - parser.add_argument('--build-for-simulator', - action='store_true', - help='Also build simulator version. Only for Desktop platforms. Default is only non-simulator version') parser.add_argument('--release', action='store_true', help='Build a release version. Default is both') @@ -98,17 +95,10 @@ def main() -> None: build_types.append("debug") build_types.append("release") - sim_targets = [[]] - if args.target in ['android', 'ios'] and args.build_for_simulator: - raise Exception('Simulator builds are only supported for Desktop platforms') - elif args.build_for_simulator: - sim_targets = [["--build-for-simulator"], []] - logging.info(''' Target platform : {} Build type : {} -Sim targets : {} - '''.format(args.target, build_types, sim_targets)) + '''.format(args.target, build_types)) verify_build_host_platform(args.target) @@ -151,10 +141,9 @@ Sim targets : {} # Build WebRTC for x86_64 env['TARGET_ARCH'] = "x64" for build_type in build_types: - for sim_target in sim_targets: - run_cmd(args.dry_run, - ['bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type] + sim_target, - env=env) + run_cmd(args.dry_run, + ['bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type], + env=env) # Build WebRTC for arm64 run_cmd(args.dry_run, @@ -163,10 +152,9 @@ Sim targets : {} env['TARGET_ARCH'] = "arm64" env['OUTPUT_DIR'] = "out_arm" for build_type in build_types: - for sim_target in sim_targets: - run_cmd(args.dry_run, - ['bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type] + sim_target, - env=env) + run_cmd(args.dry_run, + ['bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type], + env=env) elif args.target == 'ios' or args.target == 'mac': # Get grealpath @@ -199,18 +187,16 @@ Sim targets : {} env['TARGET_ARCH'] = "x64" for build_type in build_types: - for sim_target in sim_targets: - run_cmd(args.dry_run, - ['bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type] + sim_target, - env=env) + run_cmd(args.dry_run, + ['bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type], + env=env) env['TARGET_ARCH'] = "arm64" env['OUTPUT_DIR'] = "out_arm" for build_type in build_types: - for sim_target in sim_targets: - run_cmd(args.dry_run, - ['bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type] + sim_target, - env=env) + run_cmd(args.dry_run, + ['bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type], + env=env) elif args.target == 'windows': bash = 'C:\\Program Files\\Git\\bin\\bash.exe' @@ -220,10 +206,9 @@ Sim targets : {} env['TARGET_ARCH'] = "x64" for build_type in build_types: - for sim_target in sim_targets: - run_cmd(args.dry_run, - [bash, 'bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type] + sim_target, - env=env) + run_cmd(args.dry_run, + [bash, 'bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type], + env=env) # Prepare workspace for arm env['OUTPUT_DIR'] = "out_arm" @@ -231,10 +216,9 @@ Sim targets : {} env['TARGET_ARCH'] = "arm64" for build_type in build_types: - for sim_target in sim_targets: - run_cmd(args.dry_run, - [bash, 'bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type] + sim_target, - env=env) + run_cmd(args.dry_run, + [bash, 'bin/build-desktop', '--webrtc-only', '--archive-webrtc', '--' + build_type], + env=env) if __name__ == '__main__': diff --git a/bin/fetch-artifact.py b/bin/fetch-artifact.py index 5e0bdaa3..41043e6f 100755 --- a/bin/fetch-artifact.py +++ b/bin/fetch-artifact.py @@ -21,17 +21,11 @@ UNVERIFIED_DOWNLOAD_NAME = "unverified.tmp" PREBUILD_CHECKSUMS = { 'android': '1b8279ad00398871c758addbb074713a9039db4d9de34365989cbd7ad09b18a2', 'ios': 'a33e5c454245cac08007fafea4491d1ddfd6efdba5cfd0bb134d6d0346eccef9', - 'linux-x64-sim': '31bed7982a78df420c7eda9ce038d6849afb5cad968bfd4cc8ee189406123914', 'linux-x64': 'e98ac4fee3480e51723c1d691d7eb77672b80e275fb609b512bc193708dec919', - 'linux-arm64-sim': '05298ae2ecdca60444d46066a57c1a75fbf29aa8f3d990f287f0a10ea9f45f7b', 'linux-arm64': '221a0651929b6740805f304c58bc31f05d214e000aecafc2fe51f839292e27c8', - 'mac-x64-sim': '8eb745435e56c3f244a7b083f349b86330821e66187d957d8c4c4d9f0b5d0217', 'mac-x64': '297e8c0e4f24371d831a87b7c4e906073e7100abed6010660941f0a08370243e', - 'mac-arm64-sim': '0c0335c6316de03802d7bd48b8d543f7074265b554ae6c4d7e2b0ba5aa05da6e', 'mac-arm64': '0f73d615d0c7258395bebc3439486b852a099a2032f2818ee4c295051a513c47', - 'windows-x64-sim': '5245373e6c5dcac7bd0c4f1c264b34ce8101dba53251c06d4c7806f94b98530c', 'windows-x64': 'ca978183ee323069da64483c7d920b0849265e8a87e8e4f5cbf6ebd6d3310a64', - 'windows-arm64-sim': '31066d291fcabe026582b689519fec28220d175e77e64adbc7721bcdeef3b3f5', 'windows-arm64': '9c6c3401dd3a9f6c693668f4a32cc1a2d4909056a531f954a1b9ecce53882a3f', } @@ -81,9 +75,6 @@ def build_argument_parser() -> argparse.ArgumentParser: source_group.add_argument('-p', '--platform', help='WebRTC prebuild platform to fetch artifacts for') - parser.add_argument('--for-simulator', action='store_true', - help='get WebRTC prebuild for a Desktop platform') - parser.add_argument('-c', '--checksum', help='sha256sum of the unexpanded artifact archive (can be omitted for standard prebuilds)') parser.add_argument('--skip-extract', action='store_true', @@ -160,15 +151,11 @@ def main() -> None: if not args.webrtc_version: parser.error(message='--platform requires --webrtc-version') platform_name = resolve_platform(args.platform) - if platform_name in ["android", "ios"] and args.for_simulator: - raise Exception("Simulator artifacts are only for desktop platforms") build_mode = 'debug' if args.debug else 'release' - sim = '-sim' if args.for_simulator else '' - url = "https://build-artifacts.signal.org/libraries/webrtc-{}-{}-{}{}.tar.bz2".format(args.webrtc_version, platform_name, build_mode, sim) - prebuild_platform_name = "{}{}".format(platform_name, sim) + url = "https://build-artifacts.signal.org/libraries/webrtc-{}-{}-{}.tar.bz2".format(args.webrtc_version, platform_name, build_mode) if not checksum: - checksum = PREBUILD_CHECKSUMS[prebuild_platform_name] + checksum = PREBUILD_CHECKSUMS[platform_name] if not checksum: parser.error(message='missing --checksum') diff --git a/src/rust/build.rs b/src/rust/build.rs index 51da21e0..7cc018b1 100644 --- a/src/rust/build.rs +++ b/src/rust/build.rs @@ -66,13 +66,7 @@ fn main() { if let Err(e) = fs::create_dir_all(&out_dir) { panic!("Failed to create webrtc out directory: {:?}", e); } - fetch_webrtc_artifact( - &target_os, - &target_arch, - &out_dir, - cfg!(feature = "prebuilt_webrtc_sim"), - ) - .unwrap(); + fetch_webrtc_artifact(&target_os, &target_arch, &out_dir).unwrap(); // Ignore build type since we only have release prebuilts format!("{}/release/obj/", out_dir) } else { @@ -147,7 +141,6 @@ fn fetch_webrtc_artifact( target_os: &str, target_arch: &str, artifact_out_dir: &str, - target_sim: bool, ) -> Result<(), String> { let fetch_script = format!("{}/bin/fetch-artifact", project_dir()); let platform = format!("{}-{}", target_os, target_arch); @@ -179,9 +172,6 @@ fn fetch_webrtc_artifact( .arg(fetch_script) .arg("--platform") .arg(platform); - if target_sim { - command.arg("--for-simulator"); - } let output = command .output() .expect("bin/fetch-artifact failed to complete");