From b3ca22c19c025660fbbaf92a5c8320c4497ebf18 Mon Sep 17 00:00:00 2001 From: christian Date: Wed, 1 Mar 2023 13:25:40 +0000 Subject: [PATCH 01/18] updated ui branding --- CHANGELOG.md | 2 ++ src/Assets/Bugsnag/Editor/BugsnagEditor.EDM.cs | 14 +++++++------- src/Assets/Bugsnag/Editor/BugsnagEditor.cs | 4 ++-- upm-tools/AssemblyDefinitions/Bugsnag.asmdef | 2 +- upm-tools/AssemblyDefinitions/BugsnagEditor.asmdef | 4 ++-- upm-tools/README.md | 4 ++-- upm-tools/package.json | 6 +++--- 7 files changed, 19 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60cab9e2b..9ae3c1441 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## TBD +- Updated BugSnag UI branding + ### Bug fixes * Fix a race condition in Bugsnag.Start involving creation of gameobjects outside of the main Unity thread. [#699](https://github.com/bugsnag/bugsnag-unity/pull/699) diff --git a/src/Assets/Bugsnag/Editor/BugsnagEditor.EDM.cs b/src/Assets/Bugsnag/Editor/BugsnagEditor.EDM.cs index ca940d09f..04ab5e72b 100644 --- a/src/Assets/Bugsnag/Editor/BugsnagEditor.EDM.cs +++ b/src/Assets/Bugsnag/Editor/BugsnagEditor.EDM.cs @@ -14,7 +14,7 @@ public partial class BugsnagEditor : EditorWindow // The kotlin Version here needs to match the one in the rake build file. Both should reflect what the android notifier is using. private const string ANDROID_DEPS_XML = "https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib"; - private const string EDM_MENU_ITEM = "Window/Bugsnag/Enable EDM4U Support"; + private const string EDM_MENU_ITEM = "Window/BugSnag/Enable EDM4U Support"; private static string EDMDepsFilePath = "/Bugsnag/Editor/BugsnagAndroidDependencies.xml"; @@ -50,16 +50,16 @@ public static void EnableEDM() } catch (Exception e) { - Debug.LogError("Error enabling Bugsnag EDM4U support: " + e.Message); + Debug.LogError("Error enabling BugSnag EDM4U support: " + e.Message); } if (IsEDMEnabled()) { - ReportEDMSuccess("Bugsnag EDM4U support successfully enabled.\n\nPlease restart Unity before building."); + ReportEDMSuccess("BugSnag EDM4U support successfully enabled.\n\nPlease restart Unity before building."); } else { - ReportEDMError("Error enabling Bugsnag EDM4U support.\n\nPlease check the console for error messages"); + ReportEDMError("Error enabling BugSnag EDM4U support.\n\nPlease check the console for error messages"); } } @@ -73,16 +73,16 @@ public static void DisableEDM() } catch (Exception e) { - Debug.LogError("Error disabling Bugsnag EDM4U support: " + e.Message); + Debug.LogError("Error disabling BugSnag EDM4U support: " + e.Message); } if (!IsEDMEnabled()) { - ReportEDMSuccess("Bugsnag EDM4U support successfully disabled.\n\nPlease restart Unity before building."); + ReportEDMSuccess("BugSnag EDM4U support successfully disabled.\n\nPlease restart Unity before building."); } else { - ReportEDMError("Error disabling Bugsnag EDM4U support.\n\nPlease check the console for error messages"); + ReportEDMError("Error disabling BugSnag EDM4U support.\n\nPlease check the console for error messages"); } } diff --git a/src/Assets/Bugsnag/Editor/BugsnagEditor.cs b/src/Assets/Bugsnag/Editor/BugsnagEditor.cs index 2da7b042e..4fa32982a 100644 --- a/src/Assets/Bugsnag/Editor/BugsnagEditor.cs +++ b/src/Assets/Bugsnag/Editor/BugsnagEditor.cs @@ -24,11 +24,11 @@ public partial class BugsnagEditor : EditorWindow private void OnEnable() { - titleContent.text = "Bugsnag"; + titleContent.text = "BugSnag"; CheckForSettingsCreation(); } - [MenuItem("Window/Bugsnag/Configuration", false, 0)] + [MenuItem("Window/BugSnag/Configuration", false, 0)] public static void ShowWindow() { CheckForSettingsCreation(); diff --git a/upm-tools/AssemblyDefinitions/Bugsnag.asmdef b/upm-tools/AssemblyDefinitions/Bugsnag.asmdef index b7a25e197..f2d63f453 100644 --- a/upm-tools/AssemblyDefinitions/Bugsnag.asmdef +++ b/upm-tools/AssemblyDefinitions/Bugsnag.asmdef @@ -1,3 +1,3 @@ { - "name": "Bugsnag" + "name": "BugSnag" } diff --git a/upm-tools/AssemblyDefinitions/BugsnagEditor.asmdef b/upm-tools/AssemblyDefinitions/BugsnagEditor.asmdef index 921042cbf..e1ab24b70 100644 --- a/upm-tools/AssemblyDefinitions/BugsnagEditor.asmdef +++ b/upm-tools/AssemblyDefinitions/BugsnagEditor.asmdef @@ -1,7 +1,7 @@ { - "name": "BugsnagEditor", + "name": "BugSnagEditor", "references": [ - "Bugsnag" + "BugSnag" ], "optionalUnityReferences": [], "includePlatforms": [ diff --git a/upm-tools/README.md b/upm-tools/README.md index 70f82fb01..dbd6a2b0a 100644 --- a/upm-tools/README.md +++ b/upm-tools/README.md @@ -1,7 +1,7 @@ -Bugsnag SDK for Unity +BugSnag SDK for Unity =========== -This is the UPM package for the Bugsnag SDK for Unity. +This is the UPM package for the BugSnag SDK for Unity. Install it via `UPM`: ``` diff --git a/upm-tools/package.json b/upm-tools/package.json index 65a7a1b3f..dc3e6f29b 100644 --- a/upm-tools/package.json +++ b/upm-tools/package.json @@ -1,14 +1,14 @@ { "name": "com.bugsnag.unitynotifier", "version": "VERSION_STRING", - "displayName": "Bugsnag Unity Notifier", - "description": "The Bugsnag Notifier for Unity gives you instant notification of exceptions thrown from your Unity games on iOS and Android devices, as well as standalone Mac and WebGL deployments. Exceptions in your Unity code (JS, C# and Boo) as well as native crashes (Objective C, Java) are automatically detected and sent to Bugsnag.", + "displayName": "BugSnag Unity Notifier", + "description": "The BugSnag Notifier for Unity gives you instant notification of exceptions thrown from your Unity games on iOS and Android devices, as well as standalone Mac and WebGL deployments. Exceptions in your Unity code (JS, C# and Boo) as well as native crashes (Objective C, Java) are automatically detected and sent to BugSnag.", "unity": "2018.1", "documentationUrl": "https://docs.bugsnag.com/platforms/unity/", "changelogUrl": "https://github.com/bugsnag/bugsnag-unity/blob/master/CHANGELOG.md", "licensesUrl": "https://github.com/bugsnag/bugsnag-unity/blob/master/LICENSE.txt", "author": { - "name": "Bugsnag", + "name": "BugSnag", "email": "support@bugsnag.com", "url": "https://www.bugsnag.com/" } From 38d8e68c669549982663b27f2613e9bf589e03fa Mon Sep 17 00:00:00 2001 From: christian Date: Tue, 7 Mar 2023 13:55:33 +0000 Subject: [PATCH 02/18] reverting assemble filename casing --- upm-tools/AssemblyDefinitions/Bugsnag.asmdef | 2 +- upm-tools/AssemblyDefinitions/BugsnagEditor.asmdef | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/upm-tools/AssemblyDefinitions/Bugsnag.asmdef b/upm-tools/AssemblyDefinitions/Bugsnag.asmdef index f2d63f453..b7a25e197 100644 --- a/upm-tools/AssemblyDefinitions/Bugsnag.asmdef +++ b/upm-tools/AssemblyDefinitions/Bugsnag.asmdef @@ -1,3 +1,3 @@ { - "name": "BugSnag" + "name": "Bugsnag" } diff --git a/upm-tools/AssemblyDefinitions/BugsnagEditor.asmdef b/upm-tools/AssemblyDefinitions/BugsnagEditor.asmdef index e1ab24b70..3781e890b 100644 --- a/upm-tools/AssemblyDefinitions/BugsnagEditor.asmdef +++ b/upm-tools/AssemblyDefinitions/BugsnagEditor.asmdef @@ -1,7 +1,7 @@ { "name": "BugSnagEditor", "references": [ - "BugSnag" + "Bugsnag" ], "optionalUnityReferences": [], "includePlatforms": [ From 4b24febc8dcda72840f9750750caa54f241b9433 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 20 Jun 2024 00:16:56 +0200 Subject: [PATCH 03/18] Update bugsnag-cocoa to v6.29.0 --- CHANGELOG.md | 6 ++++++ bugsnag-cocoa | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81a4db57b..992421002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## TBD + +### Dependencies + +- Update bugsnag-cocoa to [v6.29.0](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.29.0) [#814](https://github.com/bugsnag/bugsnag-unity/pull/814) + ## 8.0.0 (2024-06-12) ### Enhancements diff --git a/bugsnag-cocoa b/bugsnag-cocoa index 16b9145fc..cd3a27c2d 160000 --- a/bugsnag-cocoa +++ b/bugsnag-cocoa @@ -1 +1 @@ -Subproject commit 16b9145fc66e5296f16e733f6feb5d0e450574e8 +Subproject commit cd3a27c2d7ad344c102bd7ec168c0584939ab7b1 From 458a73a2b09655f76f480156487934d6e8d2f571 Mon Sep 17 00:00:00 2001 From: Richard Elms Date: Wed, 26 Jun 2024 15:27:14 +0200 Subject: [PATCH 04/18] PLAT-12270 setup dev ci runs (#815) --- .buildkite/block.full.yml | 7 +- .buildkite/pipeline.android.full.yml | 274 ++++++ .buildkite/pipeline.full.yml | 861 ------------------ .buildkite/pipeline.ios.full.yml | 321 +++++++ .buildkite/pipeline.macos.full.yml | 209 +++++ .buildkite/pipeline.webgl.full.yml | 202 ++++ .buildkite/pipeline.windows.full.yml | 214 +++++ .buildkite/pipeline.yml | 21 +- .buildkite/pipeline_trigger.sh | 6 +- Rakefile | 54 +- .../maze_runner/Assets/Editor/Builder.cs | 88 +- .../ProjectSettings/ProjectVersion.txt | 3 +- features/scripts/build_android.sh | 26 +- features/scripts/build_ios.sh | 29 +- features/scripts/build_maze_runner.sh | 43 +- features/scripts/generate_xcode_project.sh | 21 +- features/support/env.rb | 15 +- scripts/ci-build-macos-fixture.sh | 29 + scripts/ci-build-macos-packages.sh | 10 - scripts/ci-build-webgl-fixture.sh | 24 + scripts/ci-build-windows-fixture-wsl.sh | 22 +- scripts/ci-run-macos-tests-csharp.sh | 7 - scripts/ci-run-macos-tests.sh | 23 +- scripts/ci-run-webgl-tests.sh | 18 +- scripts/ci-run-windows-tests-wsl.sh | 24 +- unity/PackageProject/Packages/manifest.json | 21 +- 26 files changed, 1619 insertions(+), 953 deletions(-) create mode 100644 .buildkite/pipeline.android.full.yml delete mode 100644 .buildkite/pipeline.full.yml create mode 100644 .buildkite/pipeline.ios.full.yml create mode 100644 .buildkite/pipeline.macos.full.yml create mode 100644 .buildkite/pipeline.webgl.full.yml create mode 100644 .buildkite/pipeline.windows.full.yml create mode 100755 scripts/ci-build-macos-fixture.sh delete mode 100755 scripts/ci-build-macos-packages.sh create mode 100755 scripts/ci-build-webgl-fixture.sh mode change 100644 => 100755 scripts/ci-build-windows-fixture-wsl.sh delete mode 100644 scripts/ci-run-macos-tests-csharp.sh mode change 100644 => 100755 scripts/ci-run-macos-tests.sh mode change 100644 => 100755 scripts/ci-run-webgl-tests.sh mode change 100644 => 100755 scripts/ci-run-windows-tests-wsl.sh diff --git a/.buildkite/block.full.yml b/.buildkite/block.full.yml index 443182410..88c22efae 100644 --- a/.buildkite/block.full.yml +++ b/.buildkite/block.full.yml @@ -4,4 +4,9 @@ steps: - label: 'Upload the full test pipeline' depends_on: 'trigger-full-build' - command: buildkite-agent pipeline upload .buildkite/pipeline.full.yml + command: > + buildkite-agent pipeline upload .buildkite/pipeline.android.full.yml && + buildkite-agent pipeline upload .buildkite/pipeline.ios.full.yml && + buildkite-agent pipeline upload .buildkite/pipeline.windows.full.yml && + buildkite-agent pipeline upload .buildkite/pipeline.macos.full.yml && + buildkite-agent pipeline upload .buildkite/pipeline.webgl.full.yml diff --git a/.buildkite/pipeline.android.full.yml b/.buildkite/pipeline.android.full.yml new file mode 100644 index 000000000..a67c62299 --- /dev/null +++ b/.buildkite/pipeline.android.full.yml @@ -0,0 +1,274 @@ +aliases: + - &2020 "2020.3.48f1" + - &2021 "2021.3.36f1" + - &2022 "2022.3.22f1" + - &2023 "2023.2.19f1" + +agents: + queue: macos-14 + +steps: + # + # Build Android test fixtures + # + - label: ":android: Build Android test fixture for Unity 2020" + timeout_in_minutes: 30 + key: "build-android-fixture-2020" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2020 + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - features/fixtures/maze_runner/mazerunner_2020.apk + - features/fixtures/build_android_apk.log + commands: + - bundle install + - rake test:android:build + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ":android: Build Android DEV test fixture for Unity 2021" + timeout_in_minutes: 30 + key: "build-android-dev-fixture-2021" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - features/fixtures/maze_runner/mazerunner_dev_2021.apk + - features/fixtures/build_android_apk.log + commands: + - bundle install + - rake test:android:build_dev + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ":android: Build Android test fixture for Unity 2022" + timeout_in_minutes: 30 + key: "build-android-fixture-2022" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2022 + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - features/fixtures/maze_runner/mazerunner_2022.apk + - features/fixtures/build_android_apk.log + commands: + - bundle install + - rake test:android:build + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ":android: Build Android test fixture for Unity 2023" + timeout_in_minutes: 30 + key: "build-android-fixture-2023" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2023 + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - features/fixtures/maze_runner/mazerunner_2023.apk + - features/fixtures/build_android_apk.log + commands: + - bundle install + - rake test:android:build + retry: + automatic: + - exit_status: "*" + limit: 1 + + # - label: ':android: Build Android EDM test fixture for Unity 2020' + # timeout_in_minutes: 30 + # key: 'build-edm-fixture-2020' + # depends_on: 'build-artifacts' + # env: + # UNITY_VERSION: *2020 + # plugins: + # artifacts#v1.9.0: + # download: + # - Bugsnag.unitypackage + # upload: + # - features/fixtures/EDM_Fixture/edm_2020.apk + # - features/scripts/buildEdmFixture.log + # - features/scripts/edmImport.log + # - features/scripts/enableEdm.log + # commands: + # - rake test:edm:build + # retry: + # automatic: + # - exit_status: "*" + # limit: 1 + + # + # Run Android tests + # + - label: ":bitbar: :android: Run Android e2e tests for Unity 2020" + timeout_in_minutes: 60 + depends_on: "build-android-fixture-2020" + agents: + queue: opensource + env: + UNITY_VERSION: *2020 + plugins: + artifacts#v1.9.0: + download: + - "features/fixtures/maze_runner/mazerunner_2020.apk" + upload: + - "maze_output/**/*" + - "maze_output/metrics.csv" + docker-compose#v4.7.0: + pull: maze-runner-bitbar + run: maze-runner-bitbar + service-ports: true + command: + - "features/csharp" + - "features/android" + - "--app=features/fixtures/maze_runner/mazerunner_2020.apk" + - "--farm=bb" + - "--appium-version=1.22" + - "--device=ANDROID_10|ANDROID_11|ANDROID_12|ANDROID_13" + - "--no-tunnel" + - "--aws-public-ip" + - "--fail-fast" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + + - label: ":bitbar: :android: Run Android DEV e2e tests for Unity 2021" + timeout_in_minutes: 60 + depends_on: "build-android-dev-fixture-2021" + agents: + queue: opensource + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.5.0: + download: + - "features/fixtures/maze_runner/mazerunner_dev_2021.apk" + upload: + - "maze_output/**/*" + - "maze_output/metrics.csv" + docker-compose#v4.7.0: + pull: maze-runner-bitbar + run: maze-runner-bitbar + service-ports: true + command: + - "features/csharp" + - "features/android" + - "--app=features/fixtures/maze_runner/mazerunner_dev_2021.apk" + - "--farm=bb" + - "--appium-version=1.22" + - "--device=ANDROID_10|ANDROID_11|ANDROID_12|ANDROID_13" + - "--no-tunnel" + - "--aws-public-ip" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + + - label: ":bitbar: :android: Run Android e2e tests for Unity 2022" + timeout_in_minutes: 60 + depends_on: "build-android-fixture-2022" + agents: + queue: opensource + env: + UNITY_VERSION: *2022 + plugins: + artifacts#v1.9.0: + download: + - "features/fixtures/maze_runner/mazerunner_2022.apk" + upload: + - "maze_output/**/*" + - "maze_output/metrics.csv" + docker-compose#v4.7.0: + pull: maze-runner-bitbar + run: maze-runner-bitbar + service-ports: true + command: + - "features/csharp" + - "features/android" + - "--app=features/fixtures/maze_runner/mazerunner_2022.apk" + - "--farm=bb" + - "--appium-version=1.22" + - "--device=ANDROID_10|ANDROID_11|ANDROID_12|ANDROID_13" + - "--no-tunnel" + - "--aws-public-ip" + - "--fail-fast" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + + - label: ":bitbar: :android: Run Android e2e tests for Unity 2023" + timeout_in_minutes: 60 + depends_on: "build-android-fixture-2023" + agents: + queue: opensource + env: + UNITY_VERSION: *2023 + plugins: + artifacts#v1.9.0: + download: + - "features/fixtures/maze_runner/mazerunner_2023.apk" + upload: + - "maze_output/**/*" + - "maze_output/metrics.csv" + docker-compose#v4.7.0: + pull: maze-runner-bitbar + run: maze-runner-bitbar + service-ports: true + command: + - "features/csharp" + - "features/android" + - "--app=features/fixtures/maze_runner/mazerunner_2023.apk" + - "--farm=bb" + - "--appium-version=1.22" + - "--device=ANDROID_10|ANDROID_11|ANDROID_12|ANDROID_13" + - "--no-tunnel" + - "--aws-public-ip" + - "--fail-fast" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + + # - label: ':android: Run Android EDM e2e tests for Unity 2020' + # timeout_in_minutes: 60 + # depends_on: 'build-edm-fixture-2020' + # agents: + # queue: opensource + # env: + # UNITY_VERSION: *2021 + # plugins: + # artifacts#v1.9.0: + # download: + # - "features/fixtures/EDM_Fixture/edm_2020.apk" + # upload: + # - "maze_output/**/*" + # docker-compose#v3.7.0: + # pull: maze-runner + # run: maze-runner + # command: + # - "--app=/app/features/fixtures/EDM_Fixture/edm_2020.apk" + # - "--farm=bs" + # - "--device=ANDROID_11_0" + # - "features/edm" + # concurrency: 5 + # concurrency_group: browserstack-app + # concurrency_method: eager + diff --git a/.buildkite/pipeline.full.yml b/.buildkite/pipeline.full.yml deleted file mode 100644 index 0669c7f46..000000000 --- a/.buildkite/pipeline.full.yml +++ /dev/null @@ -1,861 +0,0 @@ -aliases: - - &2020 "2020.3.48f1" - - &2021 "2021.3.36f1" - - &2022 "2022.3.22f1" - - &2023 "2023.2.19f1" - - -agents: - queue: macos-14 - -steps: - # Note: - # The basic pipeline handles Unity 2021, but doesn't include the building of test fixtures for WebGL, macOS and - # Windows. They are included here instead. - - # Build MacOS and WebGL test fixtures - # - - label: Build Unity 2020 MacOS and WebGL test fixtures - timeout_in_minutes: 30 - key: "cocoa-webgl-2020-fixtures" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2020 - XCODE_VERSION: "15.3.0" - # Python2 needed for WebGL to build - EMSDK_PYTHON: "/Library/Frameworks/Python.framework/Versions/2.7/bin/python" - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - commands: - - scripts/ci-build-macos-packages.sh - artifact_paths: - - unity.log - - features/fixtures/maze_runner/build/MacOS-2020.zip - - features/fixtures/maze_runner/build/WebGL-2020.zip - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: Build Unity 2021 MacOS and WebGL test fixtures - timeout_in_minutes: 30 - key: "cocoa-webgl-2021-fixtures" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2021 - XCODE_VERSION: "15.3.0" - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - commands: - - scripts/ci-build-macos-packages.sh - artifact_paths: - - unity.log - - features/fixtures/maze_runner/build/MacOS-2021.zip - - features/fixtures/maze_runner/build/WebGL-2021.zip - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: Build Unity 2022 MacOS and WebGL test fixtures - timeout_in_minutes: 30 - key: "cocoa-webgl-2022-fixtures" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2022 - XCODE_VERSION: "15.3.0" - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - commands: - - scripts/ci-build-macos-packages.sh - artifact_paths: - - unity.log - - features/fixtures/maze_runner/build/MacOS-2022.zip - - features/fixtures/maze_runner/build/WebGL-2022.zip - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: Build Unity 2023 MacOS and WebGL test fixtures - timeout_in_minutes: 30 - key: "cocoa-webgl-2023-fixtures" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2023 - XCODE_VERSION: "15.3.0" - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - commands: - - scripts/ci-build-macos-packages.sh - artifact_paths: - - unity.log - - features/fixtures/maze_runner/build/MacOS-2023.zip - - features/fixtures/maze_runner/build/WebGL-2023.zip - retry: - automatic: - - exit_status: "*" - limit: 1 - - # - # Run macOS desktop tests - # - - label: Run MacOS e2e tests for Unity 2020 - timeout_in_minutes: 60 - depends_on: "cocoa-webgl-2020-fixtures" - agents: - queue: macos-14 - env: - UNITY_VERSION: *2020 - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/MacOS-2020.zip - upload: - - maze_output/**/* - - '*-mazerunner.log' - - maze_output/metrics.csv - commands: - - scripts/ci-run-macos-tests-csharp.sh - - # DISABLED Pending PLAT-9177 - # - label: Run MacOS e2e tests for Unity 2021 - # timeout_in_minutes: 60 - # depends_on: 'cocoa-webgl-2021-fixtures' - # agents: - # queue: macos-12-arm-unity - # env: - # UNITY_VERSION: *2021 - # plugins: - # artifacts#v1.9.0: - # download: - # - features/fixtures/maze_runner/build/MacOS-2021.zip - # upload: - # - maze_output/**/* - # - Mazerunner.log - # commands: - # - scripts/ci-run-macos-tests-csharp.sh - - - label: Run MacOS e2e tests for Unity 2022 - timeout_in_minutes: 60 - depends_on: 'cocoa-webgl-2022-fixtures' - agents: - queue: macos-14 - env: - UNITY_VERSION: *2022 - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/MacOS-2022.zip - upload: - - maze_output/**/* - - '*-mazerunner.log' - commands: - - scripts/ci-run-macos-tests-csharp.sh - - - label: Run MacOS e2e tests for Unity 2023 - timeout_in_minutes: 60 - depends_on: 'cocoa-webgl-2023-fixtures' - agents: - queue: macos-12-arm - env: - UNITY_VERSION: *2023 - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/MacOS-2023.zip - upload: - - maze_output/**/* - - '*-mazerunner.log' - commands: - - scripts/ci-run-macos-tests-csharp.sh - - # - # Run WebGL tests - # - # Note: These are run on Intel due to an issue with persistence with Firefox on ARM. - # - - label: Run WebGL e2e tests for Unity 2020 - timeout_in_minutes: 30 - depends_on: "cocoa-webgl-2020-fixtures" - env: - UNITY_VERSION: *2020 - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/WebGL-2020.zip - upload: - - maze_output/**/* - - maze_output/metrics.csv - - # TODO: WebGL persistence tests are currently skipped pending PLAT-8151 - commands: - - scripts/ci-run-webgl-tests.sh - - # DISABLED Pending PLAT-9177 - # - label: Run WebGL e2e tests for Unity 2021 - # timeout_in_minutes: 30 - # depends_on: 'cocoa-webgl-2021-fixtures' - # env: - # UNITY_VERSION: *2021 - # plugins: - # artifacts#v1.9.0: - # download: - # - features/fixtures/maze_runner/build/WebGL-2021.zip - # upload: - # - maze_output/**/* - # # TODO: WebGL persistence tests are currently skipped pending PLAT-8151 - # commands: - # - scripts/ci-run-webgl-tests.sh - - - label: Run WebGL e2e tests for Unity 2022 - timeout_in_minutes: 30 - depends_on: 'cocoa-webgl-2022-fixtures' - env: - UNITY_VERSION: *2022 - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/WebGL-2022.zip - upload: - - maze_output/**/* - # TODO: WebGL persistence tests are currently skipped pending PLAT-8151 - commands: - - scripts/ci-run-webgl-tests.sh - - - label: Run WebGL e2e tests for Unity 2023 - timeout_in_minutes: 30 - depends_on: 'cocoa-webgl-2023-fixtures' - env: - UNITY_VERSION: *2023 - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/WebGL-2023.zip - upload: - - maze_output/**/* - # TODO: WebGL persistence tests are currently skipped pending PLAT-8151 - commands: - - scripts/ci-run-webgl-tests.sh - - # - # Build Android test fixtures - # - - label: ":android: Build Android test fixture for Unity 2020" - timeout_in_minutes: 30 - key: "build-android-fixture-2020" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2020 - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - features/fixtures/maze_runner/mazerunner_2020.apk - - features/fixtures/build_android_apk.log - commands: - - bundle install - - rake test:android:build - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: ":android: Build Android test fixture for Unity 2022" - timeout_in_minutes: 30 - key: "build-android-fixture-2022" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2022 - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - features/fixtures/maze_runner/mazerunner_2022.apk - - features/fixtures/build_android_apk.log - commands: - - bundle install - - rake test:android:build - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: ":android: Build Android test fixture for Unity 2023" - timeout_in_minutes: 30 - key: "build-android-fixture-2023" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2023 - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - features/fixtures/maze_runner/mazerunner_2023.apk - - features/fixtures/build_android_apk.log - commands: - - bundle install - - rake test:android:build - retry: - automatic: - - exit_status: "*" - limit: 1 - - # - label: ':android: Build Android EDM test fixture for Unity 2020' - # timeout_in_minutes: 30 - # key: 'build-edm-fixture-2020' - # depends_on: 'build-artifacts' - # env: - # UNITY_VERSION: *2020 - # plugins: - # artifacts#v1.9.0: - # download: - # - Bugsnag.unitypackage - # upload: - # - features/fixtures/EDM_Fixture/edm_2020.apk - # - features/scripts/buildEdmFixture.log - # - features/scripts/edmImport.log - # - features/scripts/enableEdm.log - # commands: - # - rake test:edm:build - # retry: - # automatic: - # - exit_status: "*" - # limit: 1 - - # - # Run Android tests - # - - label: ":bitbar: :android: Run Android e2e tests for Unity 2020" - timeout_in_minutes: 60 - depends_on: "build-android-fixture-2020" - agents: - queue: opensource - env: - UNITY_VERSION: *2020 - plugins: - artifacts#v1.9.0: - download: - - "features/fixtures/maze_runner/mazerunner_2020.apk" - upload: - - "maze_output/**/*" - - "maze_output/metrics.csv" - docker-compose#v4.7.0: - pull: maze-runner-bitbar - run: maze-runner-bitbar - service-ports: true - command: - - "features/csharp" - - "features/android" - - "--app=features/fixtures/maze_runner/mazerunner_2020.apk" - - "--farm=bb" - - "--appium-version=1.22" - - "--device=ANDROID_10|ANDROID_11|ANDROID_12|ANDROID_13" - - "--no-tunnel" - - "--aws-public-ip" - - "--fail-fast" - concurrency: 25 - concurrency_group: "bitbar" - concurrency_method: eager - - - label: ":bitbar: :android: Run Android e2e tests for Unity 2022" - timeout_in_minutes: 60 - depends_on: "build-android-fixture-2022" - agents: - queue: opensource - env: - UNITY_VERSION: *2022 - plugins: - artifacts#v1.9.0: - download: - - "features/fixtures/maze_runner/mazerunner_2022.apk" - upload: - - "maze_output/**/*" - - "maze_output/metrics.csv" - docker-compose#v4.7.0: - pull: maze-runner-bitbar - run: maze-runner-bitbar - service-ports: true - command: - - "features/csharp" - - "features/android" - - "--app=features/fixtures/maze_runner/mazerunner_2022.apk" - - "--farm=bb" - - "--appium-version=1.22" - - "--device=ANDROID_10|ANDROID_11|ANDROID_12|ANDROID_13" - - "--no-tunnel" - - "--aws-public-ip" - - "--fail-fast" - concurrency: 25 - concurrency_group: "bitbar" - concurrency_method: eager - - - label: ":bitbar: :android: Run Android e2e tests for Unity 2023" - timeout_in_minutes: 60 - depends_on: "build-android-fixture-2023" - agents: - queue: opensource - env: - UNITY_VERSION: *2023 - plugins: - artifacts#v1.9.0: - download: - - "features/fixtures/maze_runner/mazerunner_2023.apk" - upload: - - "maze_output/**/*" - - "maze_output/metrics.csv" - docker-compose#v4.7.0: - pull: maze-runner-bitbar - run: maze-runner-bitbar - service-ports: true - command: - - "features/csharp" - - "features/android" - - "--app=features/fixtures/maze_runner/mazerunner_2023.apk" - - "--farm=bb" - - "--appium-version=1.22" - - "--device=ANDROID_10|ANDROID_11|ANDROID_12|ANDROID_13" - - "--no-tunnel" - - "--aws-public-ip" - - "--fail-fast" - concurrency: 25 - concurrency_group: "bitbar" - concurrency_method: eager - - # - label: ':android: Run Android EDM e2e tests for Unity 2020' - # timeout_in_minutes: 60 - # depends_on: 'build-edm-fixture-2020' - # agents: - # queue: opensource - # env: - # UNITY_VERSION: *2021 - # plugins: - # artifacts#v1.9.0: - # download: - # - "features/fixtures/EDM_Fixture/edm_2020.apk" - # upload: - # - "maze_output/**/*" - # docker-compose#v3.7.0: - # pull: maze-runner - # run: maze-runner - # command: - # - "--app=/app/features/fixtures/EDM_Fixture/edm_2020.apk" - # - "--farm=bs" - # - "--device=ANDROID_11_0" - # - "features/edm" - # concurrency: 5 - # concurrency_group: browserstack-app - # concurrency_method: eager - - # - # Build iOS test fixtures - # - - label: ":ios: Generate Xcode project - Unity 2020" - timeout_in_minutes: 30 - key: "generate-fixture-project-2020" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2020 - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - features/fixtures/unity.log - - project_2020.tgz - commands: - - bundle install - - rake test:ios:generate_xcode - - tar -zvcf project_2020.tgz features/fixtures/maze_runner/mazerunner_xcode - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: ":ios: Build iOS test fixture for Unity 2020" - timeout_in_minutes: 30 - key: "build-ios-fixture-2020" - depends_on: "generate-fixture-project-2020" - env: - XCODE_VERSION: "15.3.0" - UNITY_VERSION: *2020 - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - - project_2020.tgz - upload: - - features/fixtures/maze_runner/mazerunner_2020.ipa - - features/fixtures/unity.log - commands: - - bundle install - - tar -zxf project_2020.tgz features/fixtures/maze_runner - - rake test:ios:build_xcode - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: ":ios: Generate Xcode project - Unity 2022" - timeout_in_minutes: 30 - key: "generate-fixture-project-2022" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2022 - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - features/fixtures/unity.log - - project_2022.tgz - commands: - - bundle install - - rake test:ios:generate_xcode - - tar -zvcf project_2022.tgz features/fixtures/maze_runner/mazerunner_xcode - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: ":ios: Build iOS test fixture for Unity 2022" - timeout_in_minutes: 30 - key: "build-ios-fixture-2022" - depends_on: "generate-fixture-project-2022" - env: - UNITY_VERSION: *2022 - XCODE_VERSION: "15.3.0" - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - - project_2022.tgz - upload: - - features/fixtures/maze_runner/mazerunner_2022.ipa - - features/fixtures/unity.log - commands: - - bundle install - - tar -zxf project_2022.tgz features/fixtures/maze_runner - - rake test:ios:build_xcode - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: ":ios: Generate Xcode project - Unity 2023" - timeout_in_minutes: 30 - key: "generate-fixture-project-2023" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2023 - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - features/fixtures/unity.log - - project_2023.tgz - commands: - - bundle install - - rake test:ios:generate_xcode - - tar -zvcf project_2023.tgz features/fixtures/maze_runner/mazerunner_xcode - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: ":ios: Build iOS test fixture for Unity 2023" - timeout_in_minutes: 30 - key: "build-ios-fixture-2023" - depends_on: "generate-fixture-project-2023" - env: - UNITY_VERSION: *2023 - XCODE_VERSION: "15.3.0" - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - - project_2023.tgz - upload: - - features/fixtures/maze_runner/mazerunner_2023.ipa - - features/fixtures/unity.log - commands: - - bundle install - - tar -zxf project_2023.tgz features/fixtures/maze_runner - - rake test:ios:build_xcode - retry: - automatic: - - exit_status: "*" - limit: 1 - - # - # Run iOS tests - # - - label: ":bitbar: :ios: Run iOS e2e tests for Unity 2020" - timeout_in_minutes: 60 - depends_on: "build-ios-fixture-2020" - agents: - queue: opensource - plugins: - artifacts#v1.9.0: - download: - - "features/fixtures/maze_runner/mazerunner_2020.ipa" - upload: - - "maze_output/**/*" - - "maze_output/metrics.csv" - docker-compose#v4.7.0: - pull: maze-runner-bitbar - run: maze-runner-bitbar - service-ports: true - command: - - "features/csharp" - - "features/ios" - - "--app=features/fixtures/maze_runner/mazerunner_2020.ipa" - - "--farm=bb" - - "--appium-version=1.22" - - "--device=IOS_13|IOS_14|IOS_15" - - "--no-tunnel" - - "--aws-public-ip" - - "--fail-fast" - concurrency: 25 - concurrency_group: "bitbar" - concurrency_method: eager - - - label: ":bitbar: :ios: Run iOS e2e tests for Unity 2022" - timeout_in_minutes: 60 - depends_on: "build-ios-fixture-2022" - agents: - queue: opensource - plugins: - artifacts#v1.9.0: - download: - - "features/fixtures/maze_runner/mazerunner_2022.ipa" - upload: - - "maze_output/**/*" - - "maze_output/metrics.csv" - docker-compose#v4.7.0: - pull: maze-runner-bitbar - run: maze-runner-bitbar - service-ports: true - command: - - "features/csharp" - - "features/ios" - - "--app=features/fixtures/maze_runner/mazerunner_2022.ipa" - - "--farm=bb" - - "--appium-version=1.22" - - "--device=IOS_13|IOS_14|IOS_15" - - "--no-tunnel" - - "--aws-public-ip" - - "--fail-fast" - concurrency: 25 - concurrency_group: "bitbar" - concurrency_method: eager - - - label: ":bitbar: :ios: Run iOS e2e tests for Unity 2023" - timeout_in_minutes: 60 - depends_on: "build-ios-fixture-2023" - agents: - queue: opensource - plugins: - artifacts#v1.9.0: - download: - - "features/fixtures/maze_runner/mazerunner_2023.ipa" - upload: - - "maze_output/**/*" - - "maze_output/metrics.csv" - docker-compose#v4.7.0: - pull: maze-runner-bitbar - run: maze-runner-bitbar - service-ports: true - command: - - "features/csharp" - - "features/ios" - - "--app=features/fixtures/maze_runner/mazerunner_2023.ipa" - - "--farm=bb" - - "--appium-version=1.22" - - "--device=IOS_13|IOS_14|IOS_15" - - "--no-tunnel" - - "--aws-public-ip" - - "--fail-fast" - concurrency: 25 - concurrency_group: "bitbar" - concurrency_method: eager - - # - # Build Windows test fixtures - # - - label: Build Unity 2020 Windows test fixture - timeout_in_minutes: 30 - key: "windows-2020-fixture" - depends_on: "build-artifacts" - agents: - queue: windows-unity-wsl - env: - UNITY_VERSION: *2020 - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - unity.log - - features/fixtures/maze_runner/build/Windows-2020.zip - commands: - - scripts/ci-build-windows-fixture-wsl.sh - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: Build Unity 2021 Windows test fixture - timeout_in_minutes: 30 - key: "windows-2021-fixture" - depends_on: "build-artifacts" - agents: - queue: windows-unity-wsl - env: - UNITY_VERSION: *2021 - commands: - - scripts/ci-build-windows-fixture-wsl.sh - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - unity.log - - unity_import.log - - features/fixtures/maze_runner/build/Windows-2021.zip - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: Build Unity 2022 Windows test fixture - timeout_in_minutes: 30 - key: "windows-2022-fixture" - depends_on: "build-artifacts" - agents: - queue: windows-unity-wsl - env: - UNITY_VERSION: *2022 - commands: - - scripts/ci-build-windows-fixture-wsl.sh - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - unity.log - - unity_import.log - - features/fixtures/maze_runner/build/Windows-2022.zip - retry: - automatic: - - exit_status: "*" - limit: 1 - - - label: Build Unity 2023 Windows test fixture - skip: Pending PLAT-12072 - timeout_in_minutes: 30 - key: "windows-2023-fixture" - depends_on: "build-artifacts" - agents: - queue: windows-unity-wsl - env: - UNITY_VERSION: *2023 - commands: - - scripts/ci-build-windows-fixture-wsl.sh - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - unity.log - - unity_import.log - - features/fixtures/maze_runner/build/Windows-2023.zip - retry: - automatic: - - exit_status: "*" - limit: 1 - - # - # Run Windows e2e tests - # - - label: Run Windows e2e tests for Unity 2020 - timeout_in_minutes: 30 - depends_on: "windows-2020-fixture" - agents: - queue: windows-general-wsl - env: - UNITY_VERSION: *2020 - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/Windows-2020.zip - upload: - - maze_output/**/* - - maze_output/metrics.csv - - command: - - scripts/ci-run-windows-tests-wsl.sh - - - label: Run Windows e2e tests for Unity 2021 - timeout_in_minutes: 30 - depends_on: "windows-2021-fixture" - agents: - queue: windows-general-wsl - env: - UNITY_VERSION: *2021 - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/Windows-2021.zip - upload: - - maze_output/**/* - - maze_output/metrics.csv - commands: - - scripts/ci-run-windows-tests-wsl.sh - - - label: Run Windows e2e tests for Unity 2022 - timeout_in_minutes: 30 - depends_on: "windows-2022-fixture" - agents: - queue: windows-general-wsl - env: - UNITY_VERSION: *2022 - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/Windows-2022.zip - upload: - - maze_output/**/* - - maze_output/metrics.csv - commands: - - scripts/ci-run-windows-tests-wsl.sh - - - label: Run Windows e2e tests for Unity 2023 - skip: Pending PLAT-12072 - timeout_in_minutes: 30 - depends_on: "windows-2023-fixture" - agents: - queue: windows-general-wsl - env: - UNITY_VERSION: *2023 - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/Windows-2023.zip - upload: - - maze_output/**/* - - maze_output/metrics.csv - commands: - - scripts/ci-run-windows-tests-wsl.sh diff --git a/.buildkite/pipeline.ios.full.yml b/.buildkite/pipeline.ios.full.yml new file mode 100644 index 000000000..e422ff1f2 --- /dev/null +++ b/.buildkite/pipeline.ios.full.yml @@ -0,0 +1,321 @@ +aliases: + - &2020 "2020.3.48f1" + - &2021 "2021.3.36f1" + - &2022 "2022.3.22f1" + - &2023 "2023.2.19f1" + + +agents: + queue: macos-14 + +steps: + # + # Build iOS test fixtures + # + - label: ":ios: Generate Xcode project - Unity 2020" + timeout_in_minutes: 30 + key: "generate-fixture-project-2020" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2020 + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - features/fixtures/unity.log + - project_2020.tgz + commands: + - bundle install + - rake test:ios:generate_xcode + - tar -zvcf project_2020.tgz features/fixtures/maze_runner/mazerunner_xcode + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ":ios: Build iOS test fixture for Unity 2020" + timeout_in_minutes: 30 + key: "build-ios-fixture-2020" + depends_on: "generate-fixture-project-2020" + env: + XCODE_VERSION: "15.3.0" + UNITY_VERSION: *2020 + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + - project_2020.tgz + upload: + - features/fixtures/maze_runner/mazerunner_2020.ipa + - features/fixtures/unity.log + commands: + - bundle install + - tar -zxf project_2020.tgz features/fixtures/maze_runner + - rake test:ios:build_xcode + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ":ios: Generate Xcode DEV project - Unity 2021" + timeout_in_minutes: 30 + key: "generate-dev-fixture-project-2021" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.5.0: + download: + - Bugsnag.unitypackage + upload: + - features/fixtures/unity.log + - project_dev_2021.tgz + commands: + - bundle install + - rake test:ios:generate_xcode_dev + - tar -zvcf project_dev_2021.tgz features/fixtures/maze_runner/mazerunner_dev_xcode + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ":ios: Build DEV iOS test fixture for Unity 2021" + timeout_in_minutes: 30 + key: "build-ios-dev-fixture-2021" + depends_on: "generate-dev-fixture-project-2021" + env: + UNITY_VERSION: *2021 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.5.0: + download: + - Bugsnag.unitypackage + - project_dev_2021.tgz + upload: + - features/fixtures/maze_runner/mazerunner_dev_2021.ipa + - features/fixtures/unity.log + commands: + - bundle install + - tar -zxf project_dev_2021.tgz features/fixtures/maze_runner + - rake test:ios:build_xcode_dev + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ":ios: Generate Xcode project - Unity 2022" + timeout_in_minutes: 30 + key: "generate-fixture-project-2022" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2022 + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - features/fixtures/unity.log + - project_2022.tgz + commands: + - bundle install + - rake test:ios:generate_xcode + - tar -zvcf project_2022.tgz features/fixtures/maze_runner/mazerunner_xcode + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ":ios: Build iOS test fixture for Unity 2022" + timeout_in_minutes: 30 + key: "build-ios-fixture-2022" + depends_on: "generate-fixture-project-2022" + env: + UNITY_VERSION: *2022 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + - project_2022.tgz + upload: + - features/fixtures/maze_runner/mazerunner_2022.ipa + - features/fixtures/unity.log + commands: + - bundle install + - tar -zxf project_2022.tgz features/fixtures/maze_runner + - rake test:ios:build_xcode + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ":ios: Generate Xcode project - Unity 2023" + timeout_in_minutes: 30 + key: "generate-fixture-project-2023" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2023 + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - features/fixtures/unity.log + - project_2023.tgz + commands: + - bundle install + - rake test:ios:generate_xcode + - tar -zvcf project_2023.tgz features/fixtures/maze_runner/mazerunner_xcode + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ":ios: Build iOS test fixture for Unity 2023" + timeout_in_minutes: 30 + key: "build-ios-fixture-2023" + depends_on: "generate-fixture-project-2023" + env: + UNITY_VERSION: *2023 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + - project_2023.tgz + upload: + - features/fixtures/maze_runner/mazerunner_2023.ipa + - features/fixtures/unity.log + commands: + - bundle install + - tar -zxf project_2023.tgz features/fixtures/maze_runner + - rake test:ios:build_xcode + retry: + automatic: + - exit_status: "*" + limit: 1 + + # + # Run iOS tests + # + - label: ":bitbar: :ios: Run iOS e2e tests for Unity 2020" + timeout_in_minutes: 60 + depends_on: "build-ios-fixture-2020" + agents: + queue: opensource + plugins: + artifacts#v1.9.0: + download: + - "features/fixtures/maze_runner/mazerunner_2020.ipa" + upload: + - "maze_output/**/*" + - "maze_output/metrics.csv" + docker-compose#v4.7.0: + pull: maze-runner-bitbar + run: maze-runner-bitbar + service-ports: true + command: + - "features/csharp" + - "features/ios" + - "--app=features/fixtures/maze_runner/mazerunner_2020.ipa" + - "--farm=bb" + - "--appium-version=1.22" + - "--device=IOS_13|IOS_14|IOS_15" + - "--no-tunnel" + - "--aws-public-ip" + - "--fail-fast" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + + - label: ":bitbar: :ios: Run iOS e2e DEV tests for Unity 2021" + timeout_in_minutes: 60 + depends_on: "build-ios-dev-fixture-2021" + agents: + queue: opensource + plugins: + artifacts#v1.5.0: + download: + - "features/fixtures/maze_runner/mazerunner_dev_2021.ipa" + upload: + - "maze_output/**/*" + - "maze_output/metrics.csv" + + docker-compose#v4.7.0: + pull: maze-runner-bitbar + run: maze-runner-bitbar + service-ports: true + command: + - "features/csharp" + - "features/ios" + - "--app=features/fixtures/maze_runner/mazerunner_dev_2021.ipa" + - "--farm=bb" + - "--appium-version=1.22" + - "--device=IOS_13|IOS_14|IOS_15" + - "--no-tunnel" + - "--aws-public-ip" + - "--fail-fast" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + + - label: ":bitbar: :ios: Run iOS e2e tests for Unity 2022" + timeout_in_minutes: 60 + depends_on: "build-ios-fixture-2022" + agents: + queue: opensource + plugins: + artifacts#v1.9.0: + download: + - "features/fixtures/maze_runner/mazerunner_2022.ipa" + upload: + - "maze_output/**/*" + - "maze_output/metrics.csv" + docker-compose#v4.7.0: + pull: maze-runner-bitbar + run: maze-runner-bitbar + service-ports: true + command: + - "features/csharp" + - "features/ios" + - "--app=features/fixtures/maze_runner/mazerunner_2022.ipa" + - "--farm=bb" + - "--appium-version=1.22" + - "--device=IOS_13|IOS_14|IOS_15" + - "--no-tunnel" + - "--aws-public-ip" + - "--fail-fast" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + + - label: ":bitbar: :ios: Run iOS e2e tests for Unity 2023" + timeout_in_minutes: 60 + depends_on: "build-ios-fixture-2023" + agents: + queue: opensource + plugins: + artifacts#v1.9.0: + download: + - "features/fixtures/maze_runner/mazerunner_2023.ipa" + upload: + - "maze_output/**/*" + - "maze_output/metrics.csv" + docker-compose#v4.7.0: + pull: maze-runner-bitbar + run: maze-runner-bitbar + service-ports: true + command: + - "features/csharp" + - "features/ios" + - "--app=features/fixtures/maze_runner/mazerunner_2023.ipa" + - "--farm=bb" + - "--appium-version=1.22" + - "--device=IOS_13|IOS_14|IOS_15" + - "--no-tunnel" + - "--aws-public-ip" + - "--fail-fast" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager diff --git a/.buildkite/pipeline.macos.full.yml b/.buildkite/pipeline.macos.full.yml new file mode 100644 index 000000000..da21fdc6e --- /dev/null +++ b/.buildkite/pipeline.macos.full.yml @@ -0,0 +1,209 @@ +aliases: + - &2020 "2020.3.48f1" + - &2021 "2021.3.36f1" + - &2022 "2022.3.22f1" + - &2023 "2023.2.19f1" + + +agents: + queue: macos-14 + +steps: + + # Build MacOS test fixtures + # + - label: Build Unity 2020 MacOS test fixture + timeout_in_minutes: 30 + key: "macos-2020-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2020 + XCODE_VERSION: "15.3.0" + # Python2 needed for WebGL to build + EMSDK_PYTHON: "/Library/Frameworks/Python.framework/Versions/2.7/bin/python" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + commands: + - scripts/ci-build-macos-fixture.sh release + artifact_paths: + - unity.log + - features/fixtures/maze_runner/build/MacOS-release-2020.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2021 MacOS test fixture + timeout_in_minutes: 30 + key: "macos-2021-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2021 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + commands: + - scripts/ci-build-macos-fixture.sh release + artifact_paths: + - unity.log + - features/fixtures/maze_runner/build/MacOS-release-2021.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2021 MacOS DEV test fixture + timeout_in_minutes: 30 + key: "macos-2021-dev-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2021 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + commands: + - scripts/ci-build-macos-fixture.sh dev + artifact_paths: + - unity.log + - features/fixtures/maze_runner/build/MacOS-dev-2021.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2022 MacOS fixture + timeout_in_minutes: 30 + key: "macos-2022-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2022 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + commands: + - scripts/ci-build-macos-fixture.sh release + artifact_paths: + - unity.log + - features/fixtures/maze_runner/build/MacOS-release-2022.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2023 MacOS test fixture + timeout_in_minutes: 30 + key: "macos-2023-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2023 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + commands: + - scripts/ci-build-macos-fixture.sh release + artifact_paths: + - unity.log + - features/fixtures/maze_runner/build/MacOS-release-2023.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + # + # Run macOS desktop tests + # + - label: Run MacOS e2e tests for Unity 2020 + timeout_in_minutes: 60 + depends_on: "macos-2020-fixture" + agents: + queue: macos-14 + env: + UNITY_VERSION: *2020 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/MacOS-release-2020.zip + upload: + - maze_output/**/* + - '*-mazerunner.log' + - maze_output/metrics.csv + commands: + - scripts/ci-run-macos-tests.sh release + + - label: Run MacOS e2e tests for Unity 2021 + timeout_in_minutes: 60 + depends_on: 'macos-2021-fixture' + agents: + queue: macos-12-arm-unity + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/MacOS-release-2021.zip + upload: + - maze_output/**/* + - Mazerunner.log + commands: + - scripts/ci-run-macos-tests.sh release + + - label: Run MacOS e2e DEV tests for Unity 2021 + timeout_in_minutes: 60 + depends_on: 'macos-2021-dev-fixture' + agents: + queue: macos-12-arm-unity + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/MacOS-dev-2021.zip + upload: + - maze_output/**/* + - Mazerunner.log + commands: + - scripts/ci-run-macos-tests.sh dev + + - label: Run MacOS e2e tests for Unity 2022 + timeout_in_minutes: 60 + depends_on: 'macos-2022-fixture' + agents: + queue: macos-14 + env: + UNITY_VERSION: *2022 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/MacOS-release-2022.zip + upload: + - maze_output/**/* + - '*-mazerunner.log' + commands: + - scripts/ci-run-macos-tests.sh release + + - label: Run MacOS e2e tests for Unity 2023 + timeout_in_minutes: 60 + depends_on: 'macos-2023-fixture' + agents: + queue: macos-12-arm + env: + UNITY_VERSION: *2023 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/MacOS-release-2023.zip + upload: + - maze_output/**/* + - '*-mazerunner.log' + commands: + - scripts/ci-run-macos-tests.sh release diff --git a/.buildkite/pipeline.webgl.full.yml b/.buildkite/pipeline.webgl.full.yml new file mode 100644 index 000000000..5c435cfc6 --- /dev/null +++ b/.buildkite/pipeline.webgl.full.yml @@ -0,0 +1,202 @@ +aliases: + - &2020 "2020.3.48f1" + - &2021 "2021.3.36f1" + - &2022 "2022.3.22f1" + - &2023 "2023.2.19f1" + + +agents: + queue: macos-14 + +steps: + # Build WebGL test fixtures + # + - label: Build Unity 2020 WebGL test fixture + timeout_in_minutes: 30 + key: "webgl-2020-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2020 + XCODE_VERSION: "15.3.0" + # Python2 needed for WebGL to build + EMSDK_PYTHON: "/Library/Frameworks/Python.framework/Versions/2.7/bin/python" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + commands: + - scripts/ci-build-webgl-fixture.sh release + artifact_paths: + - unity.log + - features/fixtures/maze_runner/build/WebGL-release-2020.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2021 WebGL test fixture + timeout_in_minutes: 30 + key: "webgl-2021-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2021 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + commands: + - scripts/ci-build-webgl-fixture.sh release + artifact_paths: + - unity.log + - features/fixtures/maze_runner/build/WebGL-release-2021.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2021 DEV WebGL test fixture + timeout_in_minutes: 30 + key: "webgl-2021-dev-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2021 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + commands: + - scripts/ci-build-webgl-fixture.sh dev + artifact_paths: + - unity.log + - features/fixtures/maze_runner/build/WebGL-dev-2021.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2022 WebGL test fixture + timeout_in_minutes: 30 + key: "webgl-2022-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2022 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + commands: + - scripts/ci-build-webgl-fixture.sh release + artifact_paths: + - unity.log + - features/fixtures/maze_runner/build/WebGL-release-2022.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2023 WebGL test fixture + timeout_in_minutes: 30 + key: "webgl-2023-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2023 + XCODE_VERSION: "15.3.0" + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + commands: + - scripts/ci-build-webgl-fixture.sh release + artifact_paths: + - unity.log + - features/fixtures/maze_runner/build/WebGL-release-2023.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + # + # Run WebGL tests + # + # Note: These are run on Intel due to an issue with persistence with Firefox on ARM. + # + - label: Run WebGL e2e tests for Unity 2020 + timeout_in_minutes: 30 + depends_on: "webgl-2020-fixture" + env: + UNITY_VERSION: *2020 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/WebGL-release-2020.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + + # TODO: WebGL persistence tests are currently skipped pending PLAT-8151 + commands: + - scripts/ci-run-webgl-tests.sh release + + - label: Run WebGL e2e tests for Unity 2021 + timeout_in_minutes: 30 + depends_on: 'webgl-2021-fixture' + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/WebGL-release-2021.zip + upload: + - maze_output/**/* + # TODO: WebGL persistence tests are currently skipped pending PLAT-8151 + commands: + - scripts/ci-run-webgl-tests.sh release + + - label: Run WebGL e2e DEV tests for Unity 2021 + timeout_in_minutes: 30 + depends_on: 'webgl-2021-dev-fixture' + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/WebGL-dev-2021.zip + upload: + - maze_output/**/* + # TODO: WebGL persistence tests are currently skipped pending PLAT-8151 + commands: + - scripts/ci-run-webgl-tests.sh dev + + - label: Run WebGL e2e tests for Unity 2022 + timeout_in_minutes: 30 + depends_on: 'webgl-2022-fixture' + env: + UNITY_VERSION: *2022 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/WebGL-release-2022.zip + upload: + - maze_output/**/* + # TODO: WebGL persistence tests are currently skipped pending PLAT-8151 + commands: + - scripts/ci-run-webgl-tests.sh release + + - label: Run WebGL e2e tests for Unity 2023 + timeout_in_minutes: 30 + depends_on: 'webgl-2023-fixture' + env: + UNITY_VERSION: *2023 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/WebGL-release-2023.zip + upload: + - maze_output/**/* + # TODO: WebGL persistence tests are currently skipped pending PLAT-8151 + commands: + - scripts/ci-run-webgl-tests.sh release + diff --git a/.buildkite/pipeline.windows.full.yml b/.buildkite/pipeline.windows.full.yml new file mode 100644 index 000000000..585f3359d --- /dev/null +++ b/.buildkite/pipeline.windows.full.yml @@ -0,0 +1,214 @@ +aliases: + - &2020 "2020.3.48f1" + - &2021 "2021.3.36f1" + - &2022 "2022.3.22f1" + - &2023 "2023.2.19f1" + +steps: + # + # Build Windows test fixtures + # + - label: Build Unity 2020 Windows test fixture + timeout_in_minutes: 30 + key: "windows-2020-fixture" + depends_on: "build-artifacts" + agents: + queue: windows-unity-wsl + env: + UNITY_VERSION: *2020 + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - unity.log + - features/fixtures/maze_runner/build/Windows-release-2020.zip + commands: + - scripts/ci-build-windows-fixture-wsl.sh release + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2021 Windows test fixture + timeout_in_minutes: 30 + key: "windows-2021-fixture" + depends_on: "build-artifacts" + agents: + queue: windows-unity-wsl + env: + UNITY_VERSION: *2021 + commands: + - scripts/ci-build-windows-fixture-wsl.sh release + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - unity.log + - unity_import.log + - features/fixtures/maze_runner/build/Windows-release-2021.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2021 Windows DEV test fixture + timeout_in_minutes: 30 + key: "windows-2021-dev-fixture" + depends_on: "build-artifacts" + agents: + queue: windows-unity-wsl + env: + UNITY_VERSION: *2021 + commands: + - scripts/ci-build-windows-fixture-wsl.sh dev + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - unity.log + - unity_import.log + - features/fixtures/maze_runner/build/Windows-dev-2021.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2022 Windows test fixture + timeout_in_minutes: 30 + key: "windows-2022-fixture" + depends_on: "build-artifacts" + agents: + queue: windows-unity-wsl + env: + UNITY_VERSION: *2022 + commands: + - scripts/ci-build-windows-fixture-wsl.sh release + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - unity.log + - unity_import.log + - features/fixtures/maze_runner/build/Windows-release-2022.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2023 Windows test fixture + skip: Pending PLAT-12072 + timeout_in_minutes: 30 + key: "windows-2023-fixture" + depends_on: "build-artifacts" + agents: + queue: windows-unity-wsl + env: + UNITY_VERSION: *2023 + commands: + - scripts/ci-build-windows-fixture-wsl.sh release + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - unity.log + - unity_import.log + - features/fixtures/maze_runner/build/Windows-release-2023.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + # + # Run Windows e2e tests + # + - label: Run Windows e2e tests for Unity 2020 + timeout_in_minutes: 30 + depends_on: "windows-2020-fixture" + agents: + queue: windows-general-wsl + env: + UNITY_VERSION: *2020 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/Windows-release-2020.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + + command: + - scripts/ci-run-windows-tests-wsl.sh release + + - label: Run Windows e2e tests for Unity 2021 + timeout_in_minutes: 30 + depends_on: "windows-2021-fixture" + agents: + queue: windows-general-wsl + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/Windows-release-2021.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + commands: + - scripts/ci-run-windows-tests-wsl.sh release + + - label: Run Windows e2e DEV tests for Unity 2021 + timeout_in_minutes: 30 + depends_on: "windows-2021-dev-fixture" + agents: + queue: windows-general-wsl + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/Windows-dev-2021.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + commands: + - scripts/ci-run-windows-tests-wsl.sh dev + + - label: Run Windows e2e tests for Unity 2022 + timeout_in_minutes: 30 + depends_on: "windows-2022-fixture" + agents: + queue: windows-general-wsl + env: + UNITY_VERSION: *2022 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/Windows-release-2022.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + commands: + - scripts/ci-run-windows-tests-wsl.sh release + + - label: Run Windows e2e tests for Unity 2023 + skip: Pending PLAT-12072 + timeout_in_minutes: 30 + depends_on: "windows-2023-fixture" + agents: + queue: windows-general-wsl + env: + UNITY_VERSION: *2023 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/Windows-release-2023.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + commands: + - scripts/ci-run-windows-tests-wsl.sh release diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 553ee3ba3..abf00f89c 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -23,25 +23,6 @@ steps: - exit_status: "*" limit: 1 - # - label: Ensure notifier builds on Windows (for development) - # timeout_in_minutes: 30 - # agents: - # queue: windows-unity-wsl - # env: - # UNITY_VERSION: *2020 - # WSLENV: UNITY_VERSION - # command: - # - /mnt/c/Windows/System32/cmd.exe /c .\\scripts\\ci-build-windows-plugin.bat - # plugins: - # artifacts#v1.5.0: - # upload: - # - from: Bugsnag.unitypackage - # to: Bugsnag_WindowsBuilt.unitypackage - # retry: - # automatic: - # - exit_status: "*" - # limit: 1 - - label: 'build size impact reporting' timeout_in_minutes: 10 depends_on: build-artifacts @@ -76,6 +57,8 @@ steps: - exit_status: "*" limit: 1 + + # - label: ':android: Build Android EDM test fixture for Unity 2021' # timeout_in_minutes: 30 # key: 'build-edm-fixture-2021' diff --git a/.buildkite/pipeline_trigger.sh b/.buildkite/pipeline_trigger.sh index ac0534eac..8be39d688 100755 --- a/.buildkite/pipeline_trigger.sh +++ b/.buildkite/pipeline_trigger.sh @@ -6,7 +6,11 @@ if [[ "$BUILDKITE_MESSAGE" == *"[full ci]"* || ! -z "$FULL_SCHEDULED_BUILD" || "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" == "master" ]]; then echo "Running full build" - buildkite-agent pipeline upload .buildkite/pipeline.full.yml + buildkite-agent pipeline upload .buildkite/pipeline.android.full.yml + buildkite-agent pipeline upload .buildkite/pipeline.ios.full.yml + buildkite-agent pipeline upload .buildkite/pipeline.windows.full.yml + buildkite-agent pipeline upload .buildkite/pipeline.macos.full.yml + buildkite-agent pipeline upload .buildkite/pipeline.webgl.full.yml else # Basic build, but allow a full build to be triggered echo "Running basic build" diff --git a/Rakefile b/Rakefile index 93f00b67a..b40832ce6 100644 --- a/Rakefile +++ b/Rakefile @@ -398,7 +398,25 @@ namespace :test do end # Build the Android APK - script = File.join("features", "scripts", "build_android.sh") + script = File.join("features", "scripts", "build_android.sh release") + unless system env, script + raise 'Android APK build failed' + end + end + + task :build_dev do + # Check that a Unity version has been selected and the path exists before calling the build script + unity_path, unity = get_required_unity_paths + + # Prepare the test fixture project by importing the plugins + env = { "UNITY_PATH" => File.dirname(unity) } + script = File.join("features", "scripts", "prepare_fixture.sh") + unless system env, script + raise 'Preparation of test fixture failed' + end + + # Build the Android APK + script = File.join("features", "scripts", "build_android.sh dev") unless system env, script raise 'Android APK build failed' end @@ -433,7 +451,27 @@ namespace :test do # Generate the Xcode project Dir.chdir"features" do - script = File.join("scripts", "generate_xcode_project.sh") + script = File.join("scripts", "generate_xcode_project.sh release") + unless system env, script + raise 'IPA build failed' + end + end + end + + task :generate_xcode_dev do + # Check that a Unity version has been selected and the path exists before calling the build script + unity_path, unity = get_required_unity_paths + + # Prepare the test fixture project by importing the plugins + env = { "UNITY_PATH" => File.dirname(unity) } + script = File.join("features", "scripts", "prepare_fixture.sh") + unless system env, script + raise 'Preparation of test fixture failed' + end + + # Generate the Xcode project + Dir.chdir"features" do + script = File.join("scripts", "generate_xcode_project.sh dev") unless system env, script raise 'IPA build failed' end @@ -443,7 +481,17 @@ namespace :test do task :build_xcode do # Build and archive from the Xcode project Dir.chdir"features" do - script = File.join("scripts", "build_ios.sh") + script = File.join("scripts", "build_ios.sh release") + unless system script + raise 'IPA build failed' + end + end + end + + task :build_xcode_dev do + # Build and archive from the Xcode project + Dir.chdir"features" do + script = File.join("scripts", "build_ios.sh dev") unless system script raise 'IPA build failed' end diff --git a/features/fixtures/maze_runner/Assets/Editor/Builder.cs b/features/fixtures/maze_runner/Assets/Editor/Builder.cs index 266adeb58..59eea7505 100644 --- a/features/fixtures/maze_runner/Assets/Editor/Builder.cs +++ b/features/fixtures/maze_runner/Assets/Editor/Builder.cs @@ -8,38 +8,80 @@ public class Builder : MonoBehaviour { - static void Build(string folder, BuildTarget target) + static void BuildStandalone(string folder, BuildTarget target, bool dev) { BuildPlayerOptions opts = new BuildPlayerOptions(); + PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, "UNITY_ASSERTIONS"); + PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.WebGL, "UNITY_ASSERTIONS"); var scenes = EditorBuildSettings.scenes.Where(s => s.enabled).Select(s => s.path).ToArray(); opts.scenes = scenes; opts.locationPathName = folder; opts.target = target; - opts.options = BuildOptions.Development; + opts.options = dev ? BuildOptions.Development : BuildOptions.None; BuildPipeline.BuildPlayer(opts); } - public static void MacOS() + public static void MacOSRelease() + { + MacOS(false); + } + + public static void Win64Release() + { + Win64(false); + } + + public static void WebGLRelease() + { + WebGL(false); + } + + public static void MacOSDev() { - Build("build/MacOS/Mazerunner", BuildTarget.StandaloneOSX); + MacOS(true); } - public static void Win64() + public static void Win64Dev() { - Build("build/Windows/Mazerunner.exe", BuildTarget.StandaloneWindows64); + Win64(true); } - public static void WebGL() + public static void WebGLDev() { - Build("build/WebGL/Mazerunner", BuildTarget.WebGL); + WebGL(true); } + static void MacOS(bool dev) + { + BuildStandalone(dev ? "build/MacOS/Mazerunner_dev" : "build/MacOS/Mazerunner", BuildTarget.StandaloneOSX, dev); + } + + static void Win64(bool dev) + { + BuildStandalone(dev ? "build/Windows/Mazerunner_dev.exe" : "build/Windows/Mazerunner.exe", BuildTarget.StandaloneWindows64, dev); + } + + static void WebGL(bool dev) + { + BuildStandalone("build/WebGL/Mazerunner" + (dev ? "_dev" : ""), BuildTarget.WebGL, dev); + } + + + public static void AndroidDev() + { + BuildAndroid(true); + } + + public static void AndroidRelease() + { + BuildAndroid(false); + } // Generates the Mazerunner APK - public static void AndroidBuild() + static void BuildAndroid(bool dev) { Debug.Log("Building Android app..."); PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, "com.bugsnag.fixtures.unity.notifier.android"); - var opts = CommonOptions("mazerunner.apk"); + var opts = CommonMobileBuildOptions(dev ? "mazerunner_dev.apk" : "mazerunner.apk", dev); opts.target = BuildTarget.Android; #if UNITY_2022_1_OR_NEWER @@ -50,18 +92,27 @@ public static void AndroidBuild() Debug.Log("Result: " + result); } + + // Generates the Mazerunner IPA - public static void IosBuild() + public static void IosDev() + { + IosBuild(true); + } + + public static void IosRelease() + { + IosBuild(false); + } + static void IosBuild(bool dev) { Debug.Log("Building iOS app..."); PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, "com.bugsnag.fixtures.unity.notifier.ios"); PlayerSettings.iOS.appleDeveloperTeamID = "7W9PZ27Y5F"; PlayerSettings.iOS.appleEnableAutomaticSigning = true; PlayerSettings.iOS.allowHTTPDownload = true; - - var opts = CommonOptions("mazerunner_xcode"); + var opts = CommonMobileBuildOptions(dev ? "mazerunner_dev_xcode" : "mazerunner_xcode", dev); opts.target = BuildTarget.iOS; - var result = BuildPipeline.BuildPlayer(opts); Debug.Log("Result: " + result); } @@ -70,7 +121,7 @@ public static void SwitchBuild() { Debug.Log("Building Switch app..."); PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Switch, "com.bugsnag.fixtures.unity.notifier.ios"); - var opts = CommonOptions("mazerunner.nspd"); + var opts = CommonMobileBuildOptions("mazerunner.nspd",false); opts.target = BuildTarget.Switch; opts.options = BuildOptions.Development; @@ -78,15 +129,18 @@ public static void SwitchBuild() Debug.Log("Result: " + result); } - private static BuildPlayerOptions CommonOptions(string outputFile) + private static BuildPlayerOptions CommonMobileBuildOptions(string outputFile, bool dev) { var scenes = EditorBuildSettings.scenes.Where(s => s.enabled).Select(s => s.path).ToArray(); PlayerSettings.defaultInterfaceOrientation = UIOrientation.Portrait; + PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android, "UNITY_ASSERTIONS"); + PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.iOS, "UNITY_ASSERTIONS"); + BuildPlayerOptions opts = new BuildPlayerOptions(); opts.scenes = scenes; opts.locationPathName = Application.dataPath + "/../" + outputFile; - opts.options = BuildOptions.None; + opts.options = dev ? BuildOptions.Development : BuildOptions.None; return opts; } diff --git a/features/fixtures/maze_runner/ProjectSettings/ProjectVersion.txt b/features/fixtures/maze_runner/ProjectSettings/ProjectVersion.txt index 95dcc9f42..da76706d2 100644 --- a/features/fixtures/maze_runner/ProjectSettings/ProjectVersion.txt +++ b/features/fixtures/maze_runner/ProjectSettings/ProjectVersion.txt @@ -1 +1,2 @@ -m_EditorVersion: 2018.4.34f1 +m_EditorVersion: 2020.3.48f1 +m_EditorVersionWithRevision: 2020.3.48f1 (b805b124c6b7) diff --git a/features/scripts/build_android.sh b/features/scripts/build_android.sh index 34f5c2d8d..0fcad6229 100755 --- a/features/scripts/build_android.sh +++ b/features/scripts/build_android.sh @@ -6,6 +6,14 @@ then exit 1 fi +if [ -z "$1" ] +then + echo "Build type must be specified: 'release' or 'dev'" + exit 1 +fi + +BUILD_TYPE=$1 + UNITY_PATH="/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS" pushd "${0%/*}" @@ -19,10 +27,22 @@ DEFAULT_CLI_ARGS="-quit -batchmode -nographics -logFile build_android_apk.log" project_path=`pwd`/maze_runner -# Build for Android +if [ "$BUILD_TYPE" == "dev" ]; then + BUILD_METHOD="Builder.AndroidDev" + OUTPUT_APK="mazerunner_dev.apk" + RENAMED_APK="mazerunner_dev_${UNITY_VERSION:0:4}.apk" +elif [ "$BUILD_TYPE" == "release" ]; then + BUILD_METHOD="Builder.AndroidRelease" + OUTPUT_APK="mazerunner.apk" + RENAMED_APK="mazerunner_${UNITY_VERSION:0:4}.apk" +else + echo "Invalid build type specified: 'release' or 'dev' only" + exit 1 +fi -$UNITY_PATH/Unity $DEFAULT_CLI_ARGS -projectPath $project_path -executeMethod Builder.AndroidBuild +# Build for Android +$UNITY_PATH/Unity $DEFAULT_CLI_ARGS -projectPath $project_path -executeMethod $BUILD_METHOD RESULT=$? if [ $RESULT -ne 0 ]; then exit $RESULT; fi -mv $project_path/mazerunner.apk $project_path/mazerunner_${UNITY_VERSION:0:4}.apk +mv $project_path/$OUTPUT_APK $project_path/$RENAMED_APK diff --git a/features/scripts/build_ios.sh b/features/scripts/build_ios.sh index 3a7ae3c85..bece9a7b1 100755 --- a/features/scripts/build_ios.sh +++ b/features/scripts/build_ios.sh @@ -1,5 +1,19 @@ #!/usr/bin/env bash +if [ -z "$UNITY_VERSION" ] +then + echo "UNITY_VERSION must be set" + exit 1 +fi + +if [ -z "$1" ] +then + echo "Build type must be specified: 'release' or 'dev'" + exit 1 +fi + +BUILD_TYPE=$1 + pushd "${0%/*}" script_path=`pwd` popd @@ -9,8 +23,19 @@ project_path=`pwd`/maze_runner # Clean any previous builds find $project_path/output/ -name "*.ipa" -exec rm '{}' \; +if [ "$BUILD_TYPE" == "dev" ]; then + XCODE_PROJECT="mazerunner_dev_xcode/Unity-iPhone.xcodeproj" + OUTPUT_IPA="mazerunner_dev_${UNITY_VERSION:0:4}.ipa" +elif [ "$BUILD_TYPE" == "release" ]; then + XCODE_PROJECT="mazerunner_xcode/Unity-iPhone.xcodeproj" + OUTPUT_IPA="mazerunner_${UNITY_VERSION:0:4}.ipa" +else + echo "Invalid build type specified: 'release' or 'dev' only" + exit 1 +fi + # Archive and export the project -xcrun xcodebuild -project $project_path/mazerunner_xcode/Unity-iPhone.xcodeproj \ +xcrun xcodebuild -project $project_path/$XCODE_PROJECT \ -scheme Unity-iPhone \ -configuration Debug \ -archivePath $project_path/archive/Unity-iPhone.xcarchive \ @@ -38,4 +63,4 @@ if [ $? -ne 0 ]; then fi # Move to known location for running (note - the name of the .ipa differs between Xcode versions) -find $project_path/output/ -name "*.ipa" -exec mv '{}' $project_path/mazerunner_${UNITY_VERSION:0:4}.ipa \; +find $project_path/output/ -name "*.ipa" -exec mv '{}' $project_path/$OUTPUT_IPA \; diff --git a/features/scripts/build_maze_runner.sh b/features/scripts/build_maze_runner.sh index 73fcfdece..6bcce3ac4 100755 --- a/features/scripts/build_maze_runner.sh +++ b/features/scripts/build_maze_runner.sh @@ -5,31 +5,50 @@ if [ -z "$UNITY_VERSION" ]; then exit 1 fi -if [[ $# != 1 ]]; then - echo "Build platform (macos/webgl/windows) must be passed as a parameter" +if [[ $# != 2 ]]; then + echo "Build type (release/dev) and platform (macos/webgl/windows/wsl) must be passed as parameters" exit 2 fi -if [ "$1" == "macos" ]; then - PLATFORM="MacOS" +BUILD_TYPE=$1 +PLATFORM_TYPE=$2 + +if [ "$PLATFORM_TYPE" == "macos" ]; then + if [ "$BUILD_TYPE" == "release" ]; then + PLATFORM="MacOSRelease" + else + PLATFORM="MacOSDev" + fi UNITY_PATH="/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity" -elif [ "$1" == "windows" ]; then - PLATFORM="Win64" +elif [ "$PLATFORM_TYPE" == "windows" ]; then + if [ "$BUILD_TYPE" == "release" ]; then + PLATFORM="Win64Release" + else + PLATFORM="Win64Dev" + fi set -m UNITY_PATH="/c/Program Files/Unity/Hub/Editor/$UNITY_VERSION/Editor/Unity.exe" -elif [ "$1" == "wsl" ]; then - PLATFORM="Win64" +elif [ "$PLATFORM_TYPE" == "wsl" ]; then + if [ "$BUILD_TYPE" == "release" ]; then + PLATFORM="Win64Release" + else + PLATFORM="Win64Dev" + fi set -m UNITY_PATH="/mnt/c/Program Files/Unity/Hub/Editor/$UNITY_VERSION/Editor/Unity.exe" -elif [ "$1" == "webgl" ]; then - PLATFORM="WebGL" +elif [ "$PLATFORM_TYPE" == "webgl" ]; then + if [ "$BUILD_TYPE" == "release" ]; then + PLATFORM="WebGLRelease" + else + PLATFORM="WebGLDev" + fi if [ "$(uname)" == "Darwin" ]; then UNITY_PATH="/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity" else UNITY_PATH="/c/Program Files/Unity/Hub/Editor/$UNITY_VERSION/Editor/Unity.exe" fi else - echo "Unsupported platform: $1" + echo "Unsupported platform: $PLATFORM_TYPE" exit 3 fi @@ -46,7 +65,7 @@ pushd $SCRIPT_DIR package_path="$root_path/Bugsnag.unitypackage" project_path="$root_path/features/fixtures/maze_runner" - if [ "$1" == "wsl" ]; then + if [ "$PLATFORM_TYPE" == "wsl" ]; then # Solves an issue on WSL were wslpath fails if the file does not exist. if [ ! -f "$import_log_file" ]; then touch $import_log_file diff --git a/features/scripts/generate_xcode_project.sh b/features/scripts/generate_xcode_project.sh index 02bdecffd..6dc9462af 100755 --- a/features/scripts/generate_xcode_project.sh +++ b/features/scripts/generate_xcode_project.sh @@ -6,6 +6,14 @@ then exit 1 fi +if [ -z "$1" ] +then + echo "Build type must be specified: 'release' or 'dev'" + exit 1 +fi + +BUILD_TYPE=$1 + UNITY_PATH="/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS" pushd "${0%/*}" @@ -18,8 +26,17 @@ DEFAULT_CLI_ARGS="-quit -nographics -batchmode -logFile unity.log" project_path=`pwd`/maze_runner +if [ "$BUILD_TYPE" == "dev" ]; then + BUILD_METHOD="Builder.IosDev" +elif [ "$BUILD_TYPE" == "release" ]; then + BUILD_METHOD="Builder.IosRelease" +else + echo "Invalid build type specified: 'release' or 'dev' only" + exit 1 +fi + # Generate the Xcode project for iOS -$UNITY_PATH/Unity $DEFAULT_CLI_ARGS -projectPath $project_path -executeMethod Builder.IosBuild +$UNITY_PATH/Unity $DEFAULT_CLI_ARGS -projectPath $project_path -executeMethod $BUILD_METHOD RESULT=$? if [ $RESULT -ne 0 ]; then exit $RESULT; fi @@ -27,6 +44,6 @@ if [ $RESULT -ne 0 ]; then exit $RESULT; fi # a clean build. Building the project twice is a temporary workaround that circumnavigates what # appears to be a platform bug. # For further context see https://answers.unity.com/questions/1610105/how-to-add-compiler-or-linker-flags-for-il2cpp-inv.html -$UNITY_PATH/Unity $DEFAULT_CLI_ARGS -projectPath $project_path -executeMethod Builder.IosBuild +$UNITY_PATH/Unity $DEFAULT_CLI_ARGS -projectPath $project_path -executeMethod $BUILD_METHOD RESULT=$? if [ $RESULT -ne 0 ]; then exit $RESULT; fi diff --git a/features/support/env.rb b/features/support/env.rb index dc450ff05..f3d75ae48 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -72,7 +72,20 @@ # Allow the necessary environment variables to be passed from Ubuntu (under WSL) to the Windows test fixture ENV['WSLENV'] = 'BUGSNAG_SCENARIO:BUGSNAG_APIKEY:MAZE_ENDPOINT' elsif Maze.config.browser != nil # WebGL - Maze.config.document_server_root = 'features/fixtures/maze_runner/build/WebGL/Mazerunner' + + release_path = 'features/fixtures/maze_runner/build/WebGL/Mazerunner' + dev_path = 'features/fixtures/maze_runner/build/WebGL/Mazerunner_dev' + + if File.exist?(release_path) && File.exist?(dev_path) + raise "Both webgl builds exist: #{release_path} and #{dev_path}" + elsif File.exist?(release_path) + Maze.config.document_server_root = release_path + elsif File.exist?(dev_path) + Maze.config.document_server_root = dev_path + else + raise "Neither webgl build exists: #{release_path} or #{dev_path}" + end + elsif Maze.config.os&.downcase == 'switch' maze_ip = ENV['SWITCH_MAZE_IP'] raise 'SWITCH_MAZE_IP must be set' unless maze_ip diff --git a/scripts/ci-build-macos-fixture.sh b/scripts/ci-build-macos-fixture.sh new file mode 100755 index 000000000..29f6cbe00 --- /dev/null +++ b/scripts/ci-build-macos-fixture.sh @@ -0,0 +1,29 @@ +#!/bin/bash -e + +if [ -z "$UNITY_VERSION" ]; then + echo "UNITY_VERSION must be set, to e.g. 2018.4.36f1" + exit 1 +fi + +if [[ $# != 1 ]]; then + echo "Build type (release/dev) must be passed as a parameter" + exit 2 +fi + +BUILD_TYPE=$1 + +# Build the MacOS and WebGL fixtures +./features/scripts/build_maze_runner.sh $BUILD_TYPE macos + +pushd features/fixtures/maze_runner/build + zip -r MacOS-${UNITY_VERSION:0:4}.zip MacOS +popd + + +pushd features/fixtures/maze_runner/build + if [ "$BUILD_TYPE" == "release" ]; then + zip -r MacOS-release-${UNITY_VERSION:0:4}.zip MacOS + else + zip -r MacOS-dev-${UNITY_VERSION:0:4}.zip MacOS + fi +popd diff --git a/scripts/ci-build-macos-packages.sh b/scripts/ci-build-macos-packages.sh deleted file mode 100755 index 9faa5dab0..000000000 --- a/scripts/ci-build-macos-packages.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -e - -# Build the MacOS and WebGL fixtures -./features/scripts/build_maze_runner.sh macos -./features/scripts/build_maze_runner.sh webgl - -pushd features/fixtures/maze_runner/build - zip -r MacOS-${UNITY_VERSION:0:4}.zip MacOS - zip -r WebGL-${UNITY_VERSION:0:4}.zip WebGL -popd diff --git a/scripts/ci-build-webgl-fixture.sh b/scripts/ci-build-webgl-fixture.sh new file mode 100755 index 000000000..7445f41c4 --- /dev/null +++ b/scripts/ci-build-webgl-fixture.sh @@ -0,0 +1,24 @@ +#!/bin/bash -e + +if [ -z "$UNITY_VERSION" ]; then + echo "UNITY_VERSION must be set, to e.g. 2018.4.36f1" + exit 1 +fi + +if [[ $# != 1 ]]; then + echo "Build type (release/dev) must be passed as a parameter" + exit 2 +fi + +BUILD_TYPE=$1 + +# Build the WebGL fixture +./features/scripts/build_maze_runner.sh $BUILD_TYPE webgl + +pushd features/fixtures/maze_runner/build + if [ "$BUILD_TYPE" == "release" ]; then + zip -r WebGL-release-${UNITY_VERSION:0:4}.zip WebGL + else + zip -r WebGL-dev-${UNITY_VERSION:0:4}.zip WebGL + fi +popd diff --git a/scripts/ci-build-windows-fixture-wsl.sh b/scripts/ci-build-windows-fixture-wsl.sh old mode 100644 new mode 100755 index 0d1bec9e7..63e6292e2 --- a/scripts/ci-build-windows-fixture-wsl.sh +++ b/scripts/ci-build-windows-fixture-wsl.sh @@ -1,5 +1,23 @@ #!/bin/bash -e + +if [ -z "$UNITY_VERSION" ]; then + echo "UNITY_VERSION must be set, to e.g. 2018.4.36f1" + exit 1 +fi + +if [[ $# != 1 ]]; then + echo "Build type (release/dev) must be passed as a parameter" + exit 2 +fi + +BUILD_TYPE=$1 + cd features/scripts -./build_maze_runner.sh wsl +./build_maze_runner.sh $BUILD_TYPE wsl cd ../fixtures/maze_runner/build -zip -r Windows-${UNITY_VERSION:0:4}.zip Windows + +if [ "$BUILD_TYPE" == "release" ]; then + zip -r Windows-release-${UNITY_VERSION:0:4}.zip Windows +else + zip -r Windows-dev-${UNITY_VERSION:0:4}.zip Windows +fi diff --git a/scripts/ci-run-macos-tests-csharp.sh b/scripts/ci-run-macos-tests-csharp.sh deleted file mode 100644 index 3a77cf93e..000000000 --- a/scripts/ci-run-macos-tests-csharp.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -e -pushd features/fixtures/maze_runner/build - unzip MacOS-${UNITY_VERSION:0:4}.zip -popd - -bundle install -bundle exec maze-runner --app=features/fixtures/maze_runner/build/MacOS/Mazerunner.app --os=macos features/macos features/csharp diff --git a/scripts/ci-run-macos-tests.sh b/scripts/ci-run-macos-tests.sh old mode 100644 new mode 100755 index 74e775c2e..924448cb5 --- a/scripts/ci-run-macos-tests.sh +++ b/scripts/ci-run-macos-tests.sh @@ -1,7 +1,26 @@ #!/bin/bash -e + +if [ -z "$UNITY_VERSION" ]; then + echo "UNITY_VERSION must be set, to e.g. 2018.4.36f1" + exit 1 +fi + +if [[ $# != 1 ]]; then + echo "Build type (release/dev) must be passed as a parameter" + exit 2 +fi + +BUILD_TYPE=$1 + pushd features/fixtures/maze_runner/build - unzip MacOS-${UNITY_VERSION:0:4}.zip + if [ "$BUILD_TYPE" == "release" ]; then + unzip MacOS-release-${UNITY_VERSION:0:4}.zip + APP_PATH="features/fixtures/maze_runner/build/MacOS/Mazerunner.app" + else + unzip MacOS-dev-${UNITY_VERSION:0:4}.zip + APP_PATH="features/fixtures/maze_runner/build/MacOS/Mazerunner_dev.app" + fi popd bundle install -bundle exec maze-runner --app=features/fixtures/maze_runner/build/MacOS/Mazerunner.app --os=macos features/desktop +bundle exec maze-runner --app=$APP_PATH --os=macos features/macos features/csharp diff --git a/scripts/ci-run-webgl-tests.sh b/scripts/ci-run-webgl-tests.sh old mode 100644 new mode 100755 index 901ea07dc..03da2bde1 --- a/scripts/ci-run-webgl-tests.sh +++ b/scripts/ci-run-webgl-tests.sh @@ -1,7 +1,23 @@ #!/bin/bash -e +if [ -z "$UNITY_VERSION" ]; then + echo "UNITY_VERSION must be set, to e.g. 2018.4.36f1" + exit 1 +fi + +if [[ $# != 1 ]]; then + echo "Build type (release/dev) must be passed as a parameter" + exit 2 +fi + +BUILD_TYPE=$1 + pushd features/fixtures/maze_runner/build - unzip WebGL-${UNITY_VERSION:0:4}.zip + if [ "$BUILD_TYPE" == "release" ]; then + unzip WebGL-release-${UNITY_VERSION:0:4}.zip + else + unzip WebGL-dev-${UNITY_VERSION:0:4}.zip + fi popd bundle install diff --git a/scripts/ci-run-windows-tests-wsl.sh b/scripts/ci-run-windows-tests-wsl.sh old mode 100644 new mode 100755 index 29c862515..f5bdf34ce --- a/scripts/ci-run-windows-tests-wsl.sh +++ b/scripts/ci-run-windows-tests-wsl.sh @@ -1,6 +1,26 @@ #!/bin/bash -e + +if [ -z "$UNITY_VERSION" ]; then + echo "UNITY_VERSION must be set, to e.g. 2018.4.36f1" + exit 1 +fi + +if [[ $# != 1 ]]; then + echo "Build type (release/dev) must be passed as a parameter" + exit 2 +fi + +BUILD_TYPE=$1 + cd features/fixtures/maze_runner/build -unzip Windows-${UNITY_VERSION:0:4}.zip +if [ "$BUILD_TYPE" == "release" ]; then + unzip Windows-release-${UNITY_VERSION:0:4}.zip + APP_PATH="features/fixtures/maze_runner/build/Windows/Mazerunner.exe" +else + unzip Windows-dev-${UNITY_VERSION:0:4}.zip + APP_PATH="features/fixtures/maze_runner/build/Windows/Mazerunner_dev.exe" +fi cd ../../../.. + bundle install -bundle exec maze-runner --app=features/fixtures/maze_runner/build/Windows/Mazerunner.exe --os=windows features/csharp +bundle exec maze-runner --app=$APP_PATH --os=windows features/csharp diff --git a/unity/PackageProject/Packages/manifest.json b/unity/PackageProject/Packages/manifest.json index 349d31879..953b0c6fe 100644 --- a/unity/PackageProject/Packages/manifest.json +++ b/unity/PackageProject/Packages/manifest.json @@ -1,12 +1,21 @@ { "dependencies": { - "com.unity.ads": "2.0.8", - "com.unity.analytics": "3.2.3", - "com.unity.collab-proxy": "1.2.15", - "com.unity.package-manager-ui": "2.0.13", - "com.unity.purchasing": "2.2.1", - "com.unity.textmeshpro": "1.4.1", + "com.unity.2d.sprite": "1.0.0", + "com.unity.2d.tilemap": "1.0.0", + "com.unity.ads": "4.4.2", + "com.unity.analytics": "3.6.12", + "com.unity.collab-proxy": "2.2.0", + "com.unity.ide.rider": "3.0.27", + "com.unity.ide.visualstudio": "2.0.22", + "com.unity.ide.vscode": "1.2.5", + "com.unity.purchasing": "4.9.3", + "com.unity.test-framework": "1.1.33", + "com.unity.textmeshpro": "3.0.6", + "com.unity.timeline": "1.6.5", + "com.unity.ugui": "1.0.0", + "com.unity.xr.legacyinputhelpers": "2.1.10", "com.unity.modules.ai": "1.0.0", + "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", "com.unity.modules.assetbundle": "1.0.0", "com.unity.modules.audio": "1.0.0", From 1ad32433ec9c9c05d25fcd0b48b62ba0e558ea5e Mon Sep 17 00:00:00 2001 From: Richard Elms Date: Fri, 28 Jun 2024 16:42:36 +0200 Subject: [PATCH 05/18] PLAT-12363 build unity notifier with dotnet standard 2.0 (#816) --- CONTRIBUTING.md | 4 +- Rakefile | 2 +- build.cake | 33 ----- build.sh | 125 ++++-------------- src/BugsnagUnity/BugsnagUnity.Android.csproj | 6 - src/BugsnagUnity/BugsnagUnity.MacOS.csproj | 6 - src/BugsnagUnity/BugsnagUnity.Windows.csproj | 6 - src/BugsnagUnity/BugsnagUnity.csproj | 6 - src/BugsnagUnity/BugsnagUnity.iOS.csproj | 6 - src/Directory.build.props | 4 +- .../BugsnagUnity.Tests.csproj | 18 +-- .../BugsnagUnity.Tests/ConfigurationTests.cs | 44 +++--- tests/BugsnagUnity.Tests/ExceptionTests.cs | 25 ++-- .../MaximumLogTypeCounterTests.cs | 36 ++--- .../PostProcessBuildTests.cs | 14 +- .../BugsnagUnity.Tests/SessionTrackerTests.cs | 22 ++- .../StackFrameParsingTests.cs | 40 +++--- .../UniqueLogCounterTests.cs | 16 +-- tests/UnityEngine/UnityEngine.csproj | 10 +- 19 files changed, 136 insertions(+), 287 deletions(-) delete mode 100644 build.cake diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 56e5a1b42..0a5e7ce0b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -108,12 +108,12 @@ bundle exec maze-runner features/handled_errors.feature 1. Make sure any changes made since last release in `master` are merged into `next`. -2. Checkout the `next` branch. Set the version number in the change log and `build.cake`. +2. Checkout the `next` branch. Set the version number in the change log and `build.sh`. 3. Commit the changelog and version updates: ``` - git add CHANGELOG.md build.cake + git add CHANGELOG.md build.sh git commit -m "Release v7.x.x" ``` 4. Make a pull request to merge the changes into `master` diff --git a/Rakefile b/Rakefile index b40832ce6..65ecef444 100644 --- a/Rakefile +++ b/Rakefile @@ -321,7 +321,7 @@ namespace :plugin do end end - Dir.chdir File.join("src", "BugsnagUnity", "bin", "Release", "net35") do + Dir.chdir File.join("src", "BugsnagUnity", "bin", "Release", "netstandard2.0") do FileUtils.cp File.realpath("BugsnagUnity.dll"), assets_path windows_dir = File.join(assets_path, "Windows") FileUtils.cp File.realpath("BugsnagUnity.Windows.dll"), windows_dir diff --git a/build.cake b/build.cake deleted file mode 100644 index faf9b5b5e..000000000 --- a/build.cake +++ /dev/null @@ -1,33 +0,0 @@ -#addin nuget:?package=Cake.Git&version=1.1.0 -#tool "nuget:?package=NUnit.ConsoleRunner" - -var target = Argument("target", "Default"); -var solution = File("./BugsnagUnity.sln"); -var configuration = Argument("configuration", "Release"); -var project = File("./src/BugsnagUnity/BugsnagUnity.csproj"); -var version = "8.0.0"; - -Task("Restore-NuGet-Packages") - .Does(() => NuGetRestore(solution)); - -Task("Build") - .IsDependentOn("Restore-NuGet-Packages") - .Does(() => { - MSBuild(solution, settings => - settings - .SetVerbosity(Verbosity.Minimal) - .WithProperty("Version", version) - .SetConfiguration(configuration)); - }); - -Task("Test") - .IsDependentOn("Build") - .Does(() => { - var assemblies = GetFiles($"./tests/**/bin/{configuration}/**/*.Tests.dll"); - NUnit3(assemblies); - }); - -Task("Default") - .IsDependentOn("Test"); - -RunTarget(target); diff --git a/build.sh b/build.sh index b9e12527f..9b618e661 100755 --- a/build.sh +++ b/build.sh @@ -1,117 +1,50 @@ #!/usr/bin/env bash -########################################################################## -# This is the Cake bootstrapper script for Linux and OS X. -# This file was downloaded from https://github.com/cake-build/resources -# Feel free to change this file to fit your needs. -########################################################################## - -# Define directories. -SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -TOOLS_DIR=$SCRIPT_DIR/tools -ADDINS_DIR=$TOOLS_DIR/Addins -MODULES_DIR=$TOOLS_DIR/Modules -NUGET_EXE=$TOOLS_DIR/nuget.exe -CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe -PACKAGES_CONFIG=$TOOLS_DIR/packages.config -PACKAGES_CONFIG_MD5=$TOOLS_DIR/packages.config.md5sum -ADDINS_PACKAGES_CONFIG=$ADDINS_DIR/packages.config -MODULES_PACKAGES_CONFIG=$MODULES_DIR/packages.config - -# Define md5sum or md5 depending on Linux/OSX -MD5_EXE= -if [[ "$(uname -s)" == "Darwin" ]]; then - MD5_EXE="md5 -r" -else - MD5_EXE="md5sum" -fi - # Define default arguments. -SCRIPT="build.cake" -CAKE_ARGUMENTS=() +CONFIGURATION="Release" +SOLUTION="./BugsnagUnity.sln" +VERSION="8.0.0" # Parse arguments. for i in "$@"; do case $1 in - -s|--script) SCRIPT="$2"; shift ;; - --) shift; CAKE_ARGUMENTS+=("$@"); break ;; - *) CAKE_ARGUMENTS+=("$1") ;; + -c|--configuration) CONFIGURATION="$2"; shift ;; + -v|--version) VERSION="$2"; shift ;; + *) ;; esac shift done -# Make sure the tools folder exist. -if [ ! -d "$TOOLS_DIR" ]; then - mkdir "$TOOLS_DIR" -fi - -# Make sure that packages.config exist. -if [ ! -f "$TOOLS_DIR/packages.config" ]; then - echo "Downloading packages.config..." - curl -Lsfo "$TOOLS_DIR/packages.config" https://cakebuild.net/download/bootstrapper/packages - if [ $? -ne 0 ]; then - echo "An error occurred while downloading packages.config." - exit 1 - fi -fi - -# Download NuGet if it does not exist. -if [ ! -f "$NUGET_EXE" ]; then - echo "Downloading NuGet..." - curl -Lsfo "$NUGET_EXE" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe - if [ $? -ne 0 ]; then - echo "An error occurred while downloading nuget.exe." - exit 1 - fi -fi - -# Restore tools from NuGet. -pushd "$TOOLS_DIR" >/dev/null -if [ ! -f "$PACKAGES_CONFIG_MD5" ] || [ "$( cat "$PACKAGES_CONFIG_MD5" | sed 's/\r$//' )" != "$( $MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' )" ]; then - find . -type d ! -name . ! -name 'Cake.Bakery' | xargs rm -rf -fi +# Restore NuGet packages +# NOTE it is necessary to call restore on every project, not just the solution! +# Builds will intermitently fail if this is not done every time. +echo "Restoring NuGet packages..." +dotnet restore "$SOLUTION" +dotnet restore src/BugsnagUnity/BugsnagUnity.csproj +dotnet restore src/BugsnagUnity/BugsnagUnity.Android.csproj +dotnet restore src/BugsnagUnity/BugsnagUnity.iOS.csproj +dotnet restore src/BugsnagUnity/BugsnagUnity.MacOS.csproj +dotnet restore src/BugsnagUnity/BugsnagUnity.Windows.csproj -mono "$NUGET_EXE" install -ExcludeVersion if [ $? -ne 0 ]; then - echo "Could not restore NuGet tools." + echo "An error occurred while restoring NuGet packages." exit 1 fi -$MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' >| "$PACKAGES_CONFIG_MD5" - -popd >/dev/null - -# Restore addins from NuGet. -if [ -f "$ADDINS_PACKAGES_CONFIG" ]; then - pushd "$ADDINS_DIR" >/dev/null - - mono "$NUGET_EXE" install -ExcludeVersion - if [ $? -ne 0 ]; then - echo "Could not restore NuGet addins." - exit 1 - fi - - popd >/dev/null -fi - -# Restore modules from NuGet. -if [ -f "$MODULES_PACKAGES_CONFIG" ]; then - pushd "$MODULES_DIR" >/dev/null - - mono "$NUGET_EXE" install -ExcludeVersion - if [ $? -ne 0 ]; then - echo "Could not restore NuGet modules." - exit 1 - fi - - popd >/dev/null +# Build the solution +echo "Building the solution..." +dotnet build "$SOLUTION" -c "$CONFIGURATION" /p:Version="$VERSION" +if [ $? -ne 0 ]; then + echo "An error occurred while building the solution." + exit 1 fi -# Make sure that Cake has been installed. -if [ ! -f "$CAKE_EXE" ]; then - echo "Could not find Cake.exe at '$CAKE_EXE'." +# Run tests +echo "Running tests..." +dotnet test "$SOLUTION" -c "$CONFIGURATION" --no-build +if [ $? -ne 0 ]; then + echo "An error occurred while running tests." exit 1 fi -# Start Cake -exec mono "$CAKE_EXE" $SCRIPT "${CAKE_ARGUMENTS[@]}" +echo "Build and tests completed successfully." diff --git a/src/BugsnagUnity/BugsnagUnity.Android.csproj b/src/BugsnagUnity/BugsnagUnity.Android.csproj index 72daf8300..6c23bd57b 100644 --- a/src/BugsnagUnity/BugsnagUnity.Android.csproj +++ b/src/BugsnagUnity/BugsnagUnity.Android.csproj @@ -1,10 +1,4 @@  - - 8.0 - - - 8.0 - diff --git a/src/BugsnagUnity/BugsnagUnity.MacOS.csproj b/src/BugsnagUnity/BugsnagUnity.MacOS.csproj index fe487fd79..e5b42f661 100644 --- a/src/BugsnagUnity/BugsnagUnity.MacOS.csproj +++ b/src/BugsnagUnity/BugsnagUnity.MacOS.csproj @@ -1,10 +1,4 @@  - - 8.0 - - - 8.0 - diff --git a/src/BugsnagUnity/BugsnagUnity.Windows.csproj b/src/BugsnagUnity/BugsnagUnity.Windows.csproj index 5affa4e2e..6bc61eba4 100644 --- a/src/BugsnagUnity/BugsnagUnity.Windows.csproj +++ b/src/BugsnagUnity/BugsnagUnity.Windows.csproj @@ -1,10 +1,4 @@  - - 8.0 - - - 8.0 - diff --git a/src/BugsnagUnity/BugsnagUnity.csproj b/src/BugsnagUnity/BugsnagUnity.csproj index da5512f68..a673b40e5 100644 --- a/src/BugsnagUnity/BugsnagUnity.csproj +++ b/src/BugsnagUnity/BugsnagUnity.csproj @@ -1,10 +1,4 @@  - - 8.0 - - - 8.0 - diff --git a/src/BugsnagUnity/BugsnagUnity.iOS.csproj b/src/BugsnagUnity/BugsnagUnity.iOS.csproj index cc06c2cec..066893974 100644 --- a/src/BugsnagUnity/BugsnagUnity.iOS.csproj +++ b/src/BugsnagUnity/BugsnagUnity.iOS.csproj @@ -1,10 +1,4 @@  - - 8.0 - - - 8.0 - diff --git a/src/Directory.build.props b/src/Directory.build.props index 3f847ffa3..c4391e71a 100644 --- a/src/Directory.build.props +++ b/src/Directory.build.props @@ -1,7 +1,7 @@  - net35 - 7.1 + netstandard2.0 + 8.0 1.0.0 diff --git a/tests/BugsnagUnity.Tests/BugsnagUnity.Tests.csproj b/tests/BugsnagUnity.Tests/BugsnagUnity.Tests.csproj index 7418792b5..ca2ff1f7f 100644 --- a/tests/BugsnagUnity.Tests/BugsnagUnity.Tests.csproj +++ b/tests/BugsnagUnity.Tests/BugsnagUnity.Tests.csproj @@ -1,18 +1,7 @@  - net35 - 7.1 + net8.0 - - 8.0 - - - 8.0 - - - - - @@ -22,4 +11,9 @@ Always + + + + + diff --git a/tests/BugsnagUnity.Tests/ConfigurationTests.cs b/tests/BugsnagUnity.Tests/ConfigurationTests.cs index 0f3db1971..2d02978fc 100644 --- a/tests/BugsnagUnity.Tests/ConfigurationTests.cs +++ b/tests/BugsnagUnity.Tests/ConfigurationTests.cs @@ -1,17 +1,16 @@ -using NUnit.Framework; +using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Threading; -using UnityEngine; namespace BugsnagUnity.Payload.Tests { - [TestFixture] - class ConfigurationTests + [TestClass] + public class ConfigurationTests { - [Test] + [TestMethod] public void DefaultConfigurationValues() { var config = new Configuration("foo"); @@ -24,60 +23,57 @@ public void DefaultConfigurationValues() Assert.AreEqual("foo", config.ApiKey); } - - [Test] + [TestMethod] public void MaxBreadcrumbsLimit() { var config = new Configuration("foo"); config.MaximumBreadcrumbs = 501; - Assert.AreEqual(config.MaximumBreadcrumbs, 100); + Assert.AreEqual(100, config.MaximumBreadcrumbs); config.MaximumBreadcrumbs = -1; - Assert.AreEqual(config.MaximumBreadcrumbs, 100); + Assert.AreEqual(100, config.MaximumBreadcrumbs); config.MaximumBreadcrumbs = 20; - Assert.AreEqual(config.MaximumBreadcrumbs, 20); + Assert.AreEqual(20, config.MaximumBreadcrumbs); } - [Test] + [TestMethod] public void CloneTest() { var original = new Configuration("foo"); original.MaximumBreadcrumbs = 1; original.ReleaseStage = "1"; - original.SetUser("1","1","1"); + original.SetUser("1", "1", "1"); var clone = original.Clone(); - //int check + // int check Assert.AreEqual(original.MaximumBreadcrumbs, clone.MaximumBreadcrumbs); clone.MaximumBreadcrumbs = 2; Assert.AreEqual(1, original.MaximumBreadcrumbs); - Assert.AreEqual( 2, clone.MaximumBreadcrumbs); + Assert.AreEqual(2, clone.MaximumBreadcrumbs); - //string check + // string check clone.ReleaseStage = "2"; Assert.AreNotEqual(original.ReleaseStage, clone.ReleaseStage); - - //user check + // user check clone.SetUser("2", "2", "2"); Assert.AreEqual("1", original.GetUser().Name); Assert.AreEqual("2", clone.GetUser().Name); } - - [Test] + [TestMethod] public void EndpointValidation() { var config = new Configuration("foo"); Assert.IsTrue(config.Endpoints.IsValid); - config.Endpoints.Notify = new System.Uri("https://www.richIsCool.com/"); + config.Endpoints.Notify = new Uri("https://www.richIsCool.com/"); Assert.IsFalse(config.Endpoints.IsValid); - config.Endpoints.Session = new System.Uri("https://www.richIsSuperCool.com/"); + config.Endpoints.Session = new Uri("https://www.richIsSuperCool.com/"); Assert.IsTrue(config.Endpoints.IsValid); @@ -86,7 +82,7 @@ public void EndpointValidation() Assert.IsFalse(config.Endpoints.IsValid); } - [Test] + [TestMethod] public void RedactedKeysTest() { var config = new Configuration("foo"); @@ -106,7 +102,7 @@ public void RedactedKeysTest() Assert.IsFalse(config2.KeyIsRedacted("app_id")); } - [Test] + [TestMethod] public void DiscardedClassesTest() { var config = new Configuration("foo"); @@ -124,7 +120,7 @@ public void DiscardedClassesTest() Assert.IsFalse(config2.ErrorClassIsDiscarded("System.ArgumentException")); } - [Test] + [TestMethod] public void ThreadSafeCallbacksTest() { var config = new Configuration("foo"); diff --git a/tests/BugsnagUnity.Tests/ExceptionTests.cs b/tests/BugsnagUnity.Tests/ExceptionTests.cs index 8033a51eb..10a61fe09 100644 --- a/tests/BugsnagUnity.Tests/ExceptionTests.cs +++ b/tests/BugsnagUnity.Tests/ExceptionTests.cs @@ -1,14 +1,14 @@ -using NUnit.Framework; +using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Linq; using System.Threading; using UnityEngine; namespace BugsnagUnity.Payload.Tests { - [TestFixture] - class ExceptionTests + [TestClass] + public class ExceptionTests { - [Test] + [TestMethod] public void ParseExceptionFromLogMessage() { string condition = "IndexOutOfRangeException: Array index is out of range."; @@ -21,7 +21,7 @@ public void ParseExceptionFromLogMessage() UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) [0x00000] in :0"; var logType = UnityEngine.LogType.Error; var log = new UnityLogMessage(condition, stacktrace, logType); - Assert.True(Error.ShouldSend(log)); + Assert.IsTrue(Error.ShouldSend(log)); var exception = Error.FromUnityLogMessage(log, new System.Diagnostics.StackFrame[] { }, Severity.Info); var stack = exception.Stacktrace.ToList(); @@ -51,7 +51,7 @@ public void ParseExceptionFromLogMessage() Assert.AreEqual(0, stack[6].LineNumber); } - [Test] + [TestMethod] public void ParseDuplicateAndroidExceptionFromLogMessage() { string condition = "AndroidJavaException: java.lang.Error"; @@ -61,10 +61,10 @@ public void ParseDuplicateAndroidExceptionFromLogMessage() app_process64.000d1b11(Unknown:-2)"; var logType = UnityEngine.LogType.Error; var log = new UnityLogMessage(condition, stacktrace, logType); - Assert.False(Error.ShouldSend(log)); + Assert.IsFalse(Error.ShouldSend(log)); } - [Test] + [TestMethod] public void ParseAndroidExceptionFromLogMessage() { string condition = "AndroidJavaException: java.lang.IllegalArgumentException"; @@ -73,11 +73,11 @@ public void ParseAndroidExceptionFromLogMessage() com.unity3d.player.UnityPlayer.nativeRender(Native Method)"; var logType = UnityEngine.LogType.Error; var log = new UnityLogMessage(condition, stacktrace, logType); - Assert.True(Error.ShouldSend(log)); + Assert.IsTrue(Error.ShouldSend(log)); var exception = Error.FromUnityLogMessage(log, new System.Diagnostics.StackFrame[] { }, Severity.Warning); var stack = exception.Stacktrace.ToList(); Assert.AreEqual("java.lang.IllegalArgumentException", exception.ErrorClass); - Assert.True(System.String.IsNullOrEmpty(exception.ErrorMessage)); + Assert.IsTrue(System.String.IsNullOrEmpty(exception.ErrorMessage)); Assert.AreEqual(2, stack.Count); Assert.AreEqual("com.example.bugsnagcrashplugin.CrashHelper.UnhandledCrash()", stack[0].Method); Assert.AreEqual("CrashHelper.java", stack[0].File); @@ -87,7 +87,7 @@ public void ParseAndroidExceptionFromLogMessage() Assert.AreEqual(null, stack[1].LineNumber); } - [Test] + [TestMethod] public void ParseAndroidExceptionAndMessageFromLogMessage() { string condition = "AndroidJavaException: java.lang.ArrayIndexOutOfBoundsException: length=2; index=2"; @@ -107,7 +107,7 @@ public void ParseAndroidExceptionAndMessageFromLogMessage() UnityEngine.EventSystems.EventSystem:Update()"; var logType = UnityEngine.LogType.Error; var log = new UnityLogMessage(condition, stacktrace, logType); - Assert.True(Error.ShouldSend(log)); + Assert.IsTrue(Error.ShouldSend(log)); var exception = Error.FromUnityLogMessage(log, new System.Diagnostics.StackFrame[] { }, Severity.Warning); var stack = exception.Stacktrace.ToList(); @@ -156,4 +156,3 @@ public void ParseAndroidExceptionAndMessageFromLogMessage() } } } - diff --git a/tests/BugsnagUnity.Tests/MaximumLogTypeCounterTests.cs b/tests/BugsnagUnity.Tests/MaximumLogTypeCounterTests.cs index 747713525..3609a1e30 100644 --- a/tests/BugsnagUnity.Tests/MaximumLogTypeCounterTests.cs +++ b/tests/BugsnagUnity.Tests/MaximumLogTypeCounterTests.cs @@ -1,15 +1,15 @@ -using NUnit.Framework; -using System; +using System; using System.Collections.Generic; using System.Threading; using UnityEngine; +using Microsoft.VisualStudio.TestTools.UnitTesting; namespace BugsnagUnity.Tests { - [TestFixture] + [TestClass] public class MaximumLogTypeCounterTests { - [Test] + [TestMethod] public void SendsSingleMessage() { Dictionary maximumTypePerTimePeriod = @@ -22,12 +22,12 @@ public void SendsSingleMessage() var counter = new MaximumLogTypeCounter(configuration); - var message = new UnityLogMessage("", "", LogType.Error); + var message = new UnityLogMessage("", "", UnityEngine.LogType.Error); - Assert.True(counter.ShouldSend(message)); + Assert.IsTrue(counter.ShouldSend(message)); } - [Test] + [TestMethod] public void ShouldNotSendOverLimitMessages() { Dictionary maximumTypePerTimePeriod = @@ -44,10 +44,10 @@ public void ShouldNotSendOverLimitMessages() var message2 = new UnityLogMessage("", "", LogType.Error); counter.ShouldSend(message1); - Assert.False(counter.ShouldSend(message2)); + Assert.IsFalse(counter.ShouldSend(message2)); } - [Test] + [TestMethod] public void ShouldSendUnderTheLimit() { Dictionary maximumTypePerTimePeriod = @@ -66,14 +66,14 @@ public void ShouldSendUnderTheLimit() var message4 = new UnityLogMessage("", "", LogType.Error); var message5 = new UnityLogMessage("", "", LogType.Error); - Assert.True(counter.ShouldSend(message1)); - Assert.True(counter.ShouldSend(message2)); - Assert.True(counter.ShouldSend(message3)); - Assert.True(counter.ShouldSend(message4)); - Assert.True(counter.ShouldSend(message5)); + Assert.IsTrue(counter.ShouldSend(message1)); + Assert.IsTrue(counter.ShouldSend(message2)); + Assert.IsTrue(counter.ShouldSend(message3)); + Assert.IsTrue(counter.ShouldSend(message4)); + Assert.IsTrue(counter.ShouldSend(message5)); } - [Test] + [TestMethod] public void DontTrackCertainLogType() { Dictionary maximumTypePerTimePeriod = @@ -89,10 +89,10 @@ public void DontTrackCertainLogType() var message = new UnityLogMessage("", "", LogType.Error); - Assert.True(counter.ShouldSend(message)); + Assert.IsTrue(counter.ShouldSend(message)); } - [Test] + [TestMethod] public void FlushesCorrectly() { Dictionary maximumTypePerTimePeriod = @@ -114,7 +114,7 @@ public void FlushesCorrectly() message = new UnityLogMessage("", "", LogType.Error); - Assert.True(counter.ShouldSend(message)); + Assert.IsTrue(counter.ShouldSend(message)); } } } diff --git a/tests/BugsnagUnity.Tests/PostProcessBuildTests.cs b/tests/BugsnagUnity.Tests/PostProcessBuildTests.cs index c7c06ec5d..2bae8dd07 100644 --- a/tests/BugsnagUnity.Tests/PostProcessBuildTests.cs +++ b/tests/BugsnagUnity.Tests/PostProcessBuildTests.cs @@ -2,16 +2,17 @@ using System.Collections.Generic; using System.IO; using System.Reflection; -using NUnit.Framework; +using Microsoft.VisualStudio.TestTools.UnitTesting; namespace BugsnagUnity.Tests { - [TestFixture] + [TestClass] public class PostProcessBuildTests { - [TestCase("one")] - [TestCase("two")] - [TestCase("three")] + [DataTestMethod] + [DataRow("one")] + [DataRow("two")] + [DataRow("three")] public void Test(string fileIdentifier) { string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); @@ -19,10 +20,9 @@ public void Test(string fileIdentifier) var input = new LinkedList(File.ReadAllLines(Path.Combine(directory, $"test_{fileIdentifier}_input.pbxproj"))); var output = new LinkedList(File.ReadAllLines(Path.Combine(directory, $"test_{fileIdentifier}_output.pbxproj"))); - PostProcessBuild.Apply(input, "186208CC13E64B42A13CCD74"); - Assert.AreEqual(output, input); + CollectionAssert.AreEqual(new List(output), new List(input)); } } } diff --git a/tests/BugsnagUnity.Tests/SessionTrackerTests.cs b/tests/BugsnagUnity.Tests/SessionTrackerTests.cs index 5d6f48e62..3ec5cd1bf 100644 --- a/tests/BugsnagUnity.Tests/SessionTrackerTests.cs +++ b/tests/BugsnagUnity.Tests/SessionTrackerTests.cs @@ -1,4 +1,4 @@ -using NUnit.Framework; +using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Linq; using System.Threading; @@ -6,11 +6,10 @@ namespace BugsnagUnity.Payload.Tests { - [TestFixture] - class SessionTrackerTests + [TestClass] + public class SessionTrackerTests { - - public SessionTracker Tracker { get; set; } + private SessionTracker Tracker { get; set; } public SessionTrackerTests() { @@ -22,7 +21,7 @@ public SessionTrackerTests() /** * Verifies that a session can be resumed after it is stopped */ - [Test] + [TestMethod] public void ResumeFromStoppedSession() { Tracker.StartSession(); @@ -39,7 +38,7 @@ public void ResumeFromStoppedSession() /** * Verifies that the previous session is resumed when calling SessionTracker.ResumeSession */ - [Test] + [TestMethod] public void ResumeWithNoStoppedSession() { Tracker.StartSession(); @@ -51,7 +50,7 @@ public void ResumeWithNoStoppedSession() /** * Verifies that a new session can be created after the previous one is stopped */ - [Test] + [TestMethod] public void StartNewAfterStoppedSession() { Tracker.StartSession(); @@ -65,7 +64,7 @@ public void StartNewAfterStoppedSession() /** * Verifies that calling SessionTracker.ResumeSession multiple times only starts one session */ - [Test] + [TestMethod] public void MultipleResumesHaveNoEffect() { Tracker.StartSession(); @@ -74,16 +73,15 @@ public void MultipleResumesHaveNoEffect() Assert.IsTrue(Tracker.ResumeSession()); Assert.IsTrue(SessionsAreTheSame(original, Tracker.CurrentSession)); - + Assert.IsFalse(Tracker.ResumeSession()); Assert.IsTrue(SessionsAreTheSame(original, Tracker.CurrentSession)); - } /** * Verifies that calling SessionTracker.StopSession multiple times only stops one session */ - [Test] + [TestMethod] public void MultipleStopsHaveNoEffect() { Tracker.StartSession(); diff --git a/tests/BugsnagUnity.Tests/StackFrameParsingTests.cs b/tests/BugsnagUnity.Tests/StackFrameParsingTests.cs index d016a6464..bca19c09d 100644 --- a/tests/BugsnagUnity.Tests/StackFrameParsingTests.cs +++ b/tests/BugsnagUnity.Tests/StackFrameParsingTests.cs @@ -1,14 +1,13 @@ -using NUnit.Framework; +using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Threading; using UnityEngine; namespace BugsnagUnity.Payload.Tests { - [TestFixture] - class StackFrameParsingTests + [TestClass] + public class StackFrameParsingTests { - - [Test] + [TestMethod] public void ParseMethodWithAt() { var stackframe = Payload.StackTraceLine.FromLogMessage( @@ -17,7 +16,7 @@ public void ParseMethodWithAt() Assert.AreEqual("UnityEngine.Events.InvokableCall.Invoke()", stackframe.Method); } - [Test] + [TestMethod] public void ParseMethodNameWithColon() { var stackframe = Payload.StackTraceLine.FromLogMessage( @@ -28,18 +27,18 @@ public void ParseMethodNameWithColon() Assert.AreEqual("/Users/gameserver/parky/Assets/ReporterBehavior.cs", stackframe.File); } - [Test] + [TestMethod] public void ParseMethodNameWithColonWithoutFileInfo() { var stackframe = Payload.StackTraceLine.FromLogMessage( "UnityEngine.EventSystems.EventSystem:Update()" ); Assert.AreEqual("UnityEngine.EventSystems.EventSystem:Update()", stackframe.Method); - Assert.AreEqual(null, stackframe.LineNumber); - Assert.AreEqual(null, stackframe.File); + Assert.IsNull(stackframe.LineNumber); + Assert.IsNull(stackframe.File); } - [Test] + [TestMethod] public void ParseMethodNameWithSpace() { var stackframe = Payload.StackTraceLine.FromLogMessage( @@ -50,7 +49,7 @@ public void ParseMethodNameWithSpace() Assert.AreEqual("/Users/gameserver/parky/Assets/ReporterBehavior.cs", stackframe.File); } - [Test] + [TestMethod] public void ParseFilePathWithSpace() { var stackframe = Payload.StackTraceLine.FromLogMessage( @@ -61,7 +60,7 @@ public void ParseFilePathWithSpace() Assert.AreEqual("/Users/game server/parky/Assets/ReporterBehavior.cs", stackframe.File); } - [Test] + [TestMethod] public void ParseMethodArgument() { var stackframe = Payload.StackTraceLine.FromLogMessage( @@ -72,7 +71,7 @@ public void ParseMethodArgument() Assert.AreEqual("/Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs", stackframe.File); } - [Test] + [TestMethod] public void ParseMultipleMethodArguments() { var stackframe = Payload.StackTraceLine.FromLogMessage( @@ -83,7 +82,7 @@ public void ParseMultipleMethodArguments() Assert.AreEqual("/Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs", stackframe.File); } - [Test] + [TestMethod] public void ParseInterfaceMethod() { var stackframe = Payload.StackTraceLine.FromLogMessage( @@ -94,18 +93,18 @@ public void ParseInterfaceMethod() Assert.AreEqual("/Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs", stackframe.File); } - [Test] + [TestMethod] public void ParseGenericMethod() { var stackframe = Payload.StackTraceLine.FromLogMessage( "UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1].Invoke (.T1 handler, UnityEngine.EventSystems.BaseEventData eventData)" ); Assert.AreEqual("UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1].Invoke(.T1 handler, UnityEngine.EventSystems.BaseEventData eventData)", stackframe.Method); - Assert.AreEqual(null, stackframe.LineNumber); - Assert.AreEqual(null, stackframe.File); + Assert.IsNull(stackframe.LineNumber); + Assert.IsNull(stackframe.File); } - [Test] + [TestMethod] public void ParseUnknownManagedToNative() { var stackframe = Payload.StackTraceLine.FromLogMessage("at (wrapper managed-to-native) Program.NativeMethod(Program/StructToMarshal)"); @@ -113,15 +112,14 @@ public void ParseUnknownManagedToNative() stackframe = Payload.StackTraceLine.FromLogMessage("at (wrapper scoop-de-woop) SomeClass.SomeMethod(Program / Something else)"); Assert.AreEqual("(wrapper scoop-de-woop) SomeClass.SomeMethod(Program / Something else)", stackframe.Method); - } - [Test] + [TestMethod] public void ParseAndroidMethod() { var stackframe = Payload.StackTraceLine.FromAndroidJavaMessage("at com.example.lib.BugsnagCrash.throwJvmException(BugsnagCrash.java:14)"); Assert.AreEqual("com.example.lib.BugsnagCrash.throwJvmException()", stackframe.Method); - Assert.AreEqual("BugsnagCrash.java",stackframe.File); + Assert.AreEqual("BugsnagCrash.java", stackframe.File); Assert.AreEqual(14, stackframe.LineNumber); } } diff --git a/tests/BugsnagUnity.Tests/UniqueLogCounterTests.cs b/tests/BugsnagUnity.Tests/UniqueLogCounterTests.cs index d7b321198..61406f9b1 100644 --- a/tests/BugsnagUnity.Tests/UniqueLogCounterTests.cs +++ b/tests/BugsnagUnity.Tests/UniqueLogCounterTests.cs @@ -1,13 +1,13 @@ -using NUnit.Framework; +using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Threading; using UnityEngine; namespace BugsnagUnity.Tests { - [TestFixture] + [TestClass] public class UniqueLogCounterTests { - [Test] + [TestMethod] public void ShouldNotSendDuplicateMessages() { var counter = new UniqueLogThrottle(new Configuration("foo")); @@ -16,20 +16,20 @@ public void ShouldNotSendDuplicateMessages() var message2 = new UnityLogMessage("", "", LogType.Error); counter.ShouldSend(message1); - Assert.False(counter.ShouldSend(message2)); + Assert.IsFalse(counter.ShouldSend(message2)); } - [Test] + [TestMethod] public void SendsSingleMessage() { var counter = new UniqueLogThrottle(new Configuration("foo")); var message = new UnityLogMessage("", "", LogType.Error); - Assert.True(counter.ShouldSend(message)); + Assert.IsTrue(counter.ShouldSend(message)); } - [Test] + [TestMethod] public void FlushesCorrectly() { var configuration = new Configuration("foo"); @@ -43,7 +43,7 @@ public void FlushesCorrectly() message = new UnityLogMessage("", "", LogType.Error); - Assert.True(counter.ShouldSend(message)); + Assert.IsTrue(counter.ShouldSend(message)); } } } diff --git a/tests/UnityEngine/UnityEngine.csproj b/tests/UnityEngine/UnityEngine.csproj index de20ab24c..30cd5a42e 100644 --- a/tests/UnityEngine/UnityEngine.csproj +++ b/tests/UnityEngine/UnityEngine.csproj @@ -1,14 +1,8 @@  - net35 - 7.1 + netstandard2.0 - - 8.0 - - - 8.0 - + From 8c7b65bfcc56ad56371357fe416df88bcc3405c7 Mon Sep 17 00:00:00 2001 From: Richard Elms Date: Mon, 8 Jul 2024 18:02:15 +0200 Subject: [PATCH 06/18] PLAT-12309 Network breadcrumbs (#817) --- .gitmodules | 3 + CHANGELOG.md | 4 + features/csharp/csharp_breadcrumbs.feature | 40 ++ .../maze_runner/Assets/Scenes/MainScene.unity | 377 +++++++++++++----- .../maze_runner/Assets/Scripts/Main.cs | 16 +- .../maze_runner/Assets/Scripts/Scenario.cs | 2 + .../Breadcrumbs/NetworkBreadcrumbsFail.cs | 20 + .../NetworkBreadcrumbsFail.cs.meta | 11 + .../Breadcrumbs/NetworkBreadcrumbsSuccess.cs | 32 ++ .../NetworkBreadcrumbsSuccess.cs.meta | 11 + .../Editor/BugsnagAddScriptingSymbol.cs | 38 ++ .../Editor/BugsnagAddScriptingSymbol.cs.meta | 11 + src/BugsnagUnity/Bugsnag.cs | 3 + src/BugsnagUnity/BugsnagUnityWebRequest | 1 + src/BugsnagUnity/Client.cs | 130 +++++- tests/UnityEngine/UnityAction.cs | 5 +- 16 files changed, 571 insertions(+), 133 deletions(-) create mode 100644 features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsFail.cs create mode 100644 features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsFail.cs.meta create mode 100644 features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs create mode 100644 features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs.meta create mode 100644 src/Assets/Bugsnag/Editor/BugsnagAddScriptingSymbol.cs create mode 100644 src/Assets/Bugsnag/Editor/BugsnagAddScriptingSymbol.cs.meta create mode 160000 src/BugsnagUnity/BugsnagUnityWebRequest diff --git a/.gitmodules b/.gitmodules index 67f106eda..feddaa92c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "bugsnag-android"] path = bugsnag-android url = https://github.com/bugsnag/bugsnag-android +[submodule "src/BugsnagUnity/BugsnagUnityWebRequest"] + path = src/BugsnagUnity/BugsnagUnityWebRequest + url = https://github.com/bugsnag/bugsnag-unity-web-request diff --git a/CHANGELOG.md b/CHANGELOG.md index 992421002..cc8098a15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ ### Dependencies +### Enhancements + +- Added automatic and manual network request breadcrumbs. [#817](https://github.com/bugsnag/bugsnag-unity/pull/817) + - Update bugsnag-cocoa to [v6.29.0](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.29.0) [#814](https://github.com/bugsnag/bugsnag-unity/pull/814) ## 8.0.0 (2024-06-12) diff --git a/features/csharp/csharp_breadcrumbs.feature b/features/csharp/csharp_breadcrumbs.feature index 9808a4744..d73be1996 100644 --- a/features/csharp/csharp_breadcrumbs.feature +++ b/features/csharp/csharp_breadcrumbs.feature @@ -77,3 +77,43 @@ Feature: Csharp Breadcrumbs And the error payload field "events.0.breadcrumbs" is an array with 99 elements And the event "breadcrumbs.98.name" equals "Removed, along with 2 older breadcrumbs, to reduce payload size" And the event "breadcrumbs.98.type" equals "manual" + + Scenario: Network breadcrumb success + When I run the game in the "NetworkBreadcrumbsSuccess" state + And I wait to receive an error + Then the error is valid for the error reporting API sent by the Unity notifier + And the exception "message" equals "NetworkBreadcrumbsSuccess" + + And the event "breadcrumbs.1.name" equals "UnityWebRequest succeeded" + And the event "breadcrumbs.1.type" equals "request" + And the event "breadcrumbs.1.metaData.method" equals "GET" + And the error payload field "events.0.breadcrumbs.1.metaData.url" matches the regex "^http:\/\/\S*:\d{4}(\/.*)?" + And the event "breadcrumbs.1.metaData.status" equals 200 + And the event "breadcrumbs.1.metaData.urlParams.success" equals "true" + And the event "breadcrumbs.1.metaData.urlParams.redactthis" equals "[REDACTED]" + And the event "breadcrumbs.1.metaData.duration" is greater than 0 + And the event "breadcrumbs.1.metaData.responseContentLength" is greater than 0 + + And the event "breadcrumbs.2.name" equals "UnityWebRequest succeeded" + And the event "breadcrumbs.2.type" equals "request" + And the event "breadcrumbs.2.metaData.method" equals "POST" + And the error payload field "events.0.breadcrumbs.2.metaData.url" matches the regex "^http:\/\/\S*:\d{4}(\/.*)?" + And the event "breadcrumbs.2.metaData.status" equals 200 + And the event "breadcrumbs.2.metaData.duration" is greater than 0 + And the event "breadcrumbs.2.metaData.responseContentLength" is greater than 0 + And the event "breadcrumbs.2.metaData.requestContentLength" is greater than 0 + + + Scenario: Network breadcrumb fails + When I run the game in the "NetworkBreadcrumbsFail" state + And I wait to receive an error + Then the error is valid for the error reporting API sent by the Unity notifier + And the exception "message" equals "NetworkBreadcrumbsFail" + And the event "breadcrumbs.1.name" equals "UnityWebRequest failed" + And the event "breadcrumbs.1.type" equals "request" + And the event "breadcrumbs.1.metaData.method" equals "GET" + And the error payload field "events.0.breadcrumbs.1.metaData.url" equals "https://localhost:994/?success=false" + And the event "breadcrumbs.1.metaData.status" equals 0 + And the event "breadcrumbs.1.metaData.urlParams.success" equals "false" + And the event "breadcrumbs.1.metaData.duration" is greater than 0 + diff --git a/features/fixtures/maze_runner/Assets/Scenes/MainScene.unity b/features/fixtures/maze_runner/Assets/Scenes/MainScene.unity index f024c13a2..c18310998 100644 --- a/features/fixtures/maze_runner/Assets/Scenes/MainScene.unity +++ b/features/fixtures/maze_runner/Assets/Scenes/MainScene.unity @@ -38,12 +38,12 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.3731316, g: 0.38074902, b: 0.3587254, a: 1} + m_IndirectSpecularColor: {r: 0.37311932, g: 0.38073996, b: 0.3587271, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 12 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 @@ -54,7 +54,7 @@ LightmapSettings: m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 10 + serializedVersion: 12 m_Resolution: 2 m_BakeResolution: 40 m_AtlasSize: 1024 @@ -62,6 +62,7 @@ LightmapSettings: m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 @@ -76,10 +77,16 @@ LightmapSettings: m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 2 + m_PVREnvironmentMIS: 0 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 @@ -87,9 +94,12 @@ LightmapSettings: m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 + m_LightingSettings: {fileID: 4890085278179872738, guid: e7a03624f4ce4430090b5b8a0b8729b5, + type: 2} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -109,6 +119,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} @@ -153,6 +165,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1419179097} m_RootOrder: 8 @@ -171,7 +184,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371095 MonoBehaviour: m_ObjectHideFlags: 0 @@ -186,7 +200,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371096 MonoBehaviour: m_ObjectHideFlags: 0 @@ -201,7 +216,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371097 MonoBehaviour: m_ObjectHideFlags: 0 @@ -216,7 +232,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371098 MonoBehaviour: m_ObjectHideFlags: 0 @@ -231,7 +248,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371099 MonoBehaviour: m_ObjectHideFlags: 0 @@ -246,7 +264,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371100 MonoBehaviour: m_ObjectHideFlags: 0 @@ -261,7 +280,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371101 MonoBehaviour: m_ObjectHideFlags: 0 @@ -276,7 +296,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371102 MonoBehaviour: m_ObjectHideFlags: 0 @@ -291,7 +312,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371103 MonoBehaviour: m_ObjectHideFlags: 0 @@ -306,7 +328,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371104 MonoBehaviour: m_ObjectHideFlags: 0 @@ -321,7 +344,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371105 MonoBehaviour: m_ObjectHideFlags: 0 @@ -336,7 +360,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371106 MonoBehaviour: m_ObjectHideFlags: 0 @@ -351,7 +376,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371107 MonoBehaviour: m_ObjectHideFlags: 0 @@ -366,7 +392,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &355371108 MonoBehaviour: m_ObjectHideFlags: 0 @@ -381,7 +408,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &372057234 GameObject: m_ObjectHideFlags: 0 @@ -429,9 +457,10 @@ Camera: m_ClearFlags: 2 m_BackGroundColor: {r: 0.6281589, g: 0.30449826, b: 0.64705884, a: 0} m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} - m_GateFitMode: 2 m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 @@ -469,6 +498,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -505,6 +535,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1754371141} m_RootOrder: 1 @@ -523,7 +554,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &425821761 MonoBehaviour: m_ObjectHideFlags: 0 @@ -538,7 +570,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &425821762 MonoBehaviour: m_ObjectHideFlags: 0 @@ -553,7 +586,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &425821763 MonoBehaviour: m_ObjectHideFlags: 0 @@ -568,7 +602,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &425821764 MonoBehaviour: m_ObjectHideFlags: 0 @@ -583,7 +618,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &425821765 MonoBehaviour: m_ObjectHideFlags: 0 @@ -598,7 +634,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &547010188 GameObject: m_ObjectHideFlags: 0 @@ -628,6 +665,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1419179097} m_RootOrder: 7 @@ -646,7 +684,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &547010191 MonoBehaviour: m_ObjectHideFlags: 0 @@ -661,7 +700,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &547010192 MonoBehaviour: m_ObjectHideFlags: 0 @@ -676,7 +716,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &555502126 GameObject: m_ObjectHideFlags: 0 @@ -705,6 +746,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1419179097} m_RootOrder: 0 @@ -723,7 +765,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &555502129 MonoBehaviour: m_ObjectHideFlags: 0 @@ -738,7 +781,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &700367034 GameObject: m_ObjectHideFlags: 0 @@ -771,6 +815,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1419179097} m_RootOrder: 6 @@ -789,7 +834,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &700367037 MonoBehaviour: m_ObjectHideFlags: 0 @@ -804,7 +850,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &700367038 MonoBehaviour: m_ObjectHideFlags: 0 @@ -819,7 +866,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &700367039 MonoBehaviour: m_ObjectHideFlags: 0 @@ -834,7 +882,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &700367040 MonoBehaviour: m_ObjectHideFlags: 0 @@ -849,7 +898,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &700367041 MonoBehaviour: m_ObjectHideFlags: 0 @@ -864,7 +914,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &992980886 GameObject: m_ObjectHideFlags: 0 @@ -895,6 +946,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} m_Name: m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 m_HorizontalAxis: Horizontal m_VerticalAxis: Vertical m_SubmitButton: Submit @@ -927,6 +979,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -961,6 +1014,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1754371141} m_RootOrder: 5 @@ -979,7 +1033,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1105517634 MonoBehaviour: m_ObjectHideFlags: 0 @@ -994,7 +1049,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1105517635 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1009,7 +1065,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1105517636 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1024,7 +1081,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &1114049719 GameObject: m_ObjectHideFlags: 0 @@ -1052,6 +1110,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1754371141} m_RootOrder: 6 @@ -1070,7 +1129,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &1160627402 GameObject: m_ObjectHideFlags: 0 @@ -1103,6 +1163,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1419179097} m_RootOrder: 5 @@ -1121,7 +1182,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1160627405 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1136,7 +1198,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1160627406 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1151,7 +1214,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1160627407 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1166,7 +1230,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1160627408 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1181,7 +1246,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1160627409 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1196,7 +1262,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &1338701864 GameObject: m_ObjectHideFlags: 0 @@ -1211,6 +1278,8 @@ GameObject: - component: {fileID: 1338701868} - component: {fileID: 1338701869} - component: {fileID: 1338701870} + - component: {fileID: 1338701872} + - component: {fileID: 1338701871} m_Layer: 0 m_Name: Breadcrumbs m_TagString: Untagged @@ -1228,6 +1297,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1419179097} m_RootOrder: 1 @@ -1246,7 +1316,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1338701867 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1261,7 +1332,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1338701868 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1276,7 +1348,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1338701869 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1291,7 +1364,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1338701870 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1306,7 +1380,32 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' +--- !u!114 &1338701871 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1338701864} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3cbe76e3ceae047ee85769786e2840dd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1338701872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1338701864} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 36160400d18884e48983505794649646, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1388241496 GameObject: m_ObjectHideFlags: 0 @@ -1342,6 +1441,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1754371141} m_RootOrder: 3 @@ -1360,7 +1460,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1388241499 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1375,7 +1476,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1388241500 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1390,7 +1492,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1388241501 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1405,7 +1508,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1388241502 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1420,7 +1524,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1388241503 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1435,7 +1540,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1388241504 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1450,7 +1556,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1388241505 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1465,7 +1572,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1388241506 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1480,7 +1588,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &1419179096 GameObject: m_ObjectHideFlags: 0 @@ -1507,6 +1616,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 555502127} - {fileID: 1338701865} @@ -1555,6 +1665,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1419179097} m_RootOrder: 3 @@ -1573,7 +1684,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1523264804 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1588,7 +1700,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1523264805 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1603,7 +1716,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1523264806 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1618,7 +1732,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1523264807 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1633,7 +1748,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1523264808 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1648,7 +1764,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1523264809 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1663,7 +1780,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1523264810 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1678,7 +1796,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1523264811 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1693,7 +1812,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &1746155638 GameObject: m_ObjectHideFlags: 0 @@ -1731,6 +1851,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1419179097} m_RootOrder: 4 @@ -1749,7 +1870,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1746155641 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1764,7 +1886,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1746155642 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1779,7 +1902,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1746155643 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1794,7 +1918,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1746155644 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1809,7 +1934,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1746155645 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1824,7 +1950,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1746155646 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1839,7 +1966,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1746155647 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1854,7 +1982,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1746155648 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1869,7 +1998,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1746155649 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1884,7 +2014,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1746155650 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1899,7 +2030,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &1754371139 GameObject: m_ObjectHideFlags: 0 @@ -1939,6 +2071,7 @@ Transform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1419179097} - {fileID: 425821759} @@ -1990,6 +2123,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1754371141} m_Father: {fileID: 0} @@ -2028,6 +2162,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1754371141} m_RootOrder: 4 @@ -2046,7 +2181,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1947744088 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2061,7 +2197,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1947744089 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2076,7 +2213,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1947744090 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2091,7 +2229,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1947744091 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2106,7 +2245,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1947744092 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2121,7 +2261,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &1947744093 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2136,7 +2277,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &2039813460 GameObject: m_ObjectHideFlags: 0 @@ -2179,6 +2321,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1419179097} m_RootOrder: 2 @@ -2197,7 +2340,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813463 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2212,7 +2356,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813464 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2227,7 +2372,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813465 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2242,7 +2388,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813466 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2257,7 +2404,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813467 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2272,7 +2420,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813468 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2287,7 +2436,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813469 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2302,7 +2452,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813470 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2317,7 +2468,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813471 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2332,7 +2484,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813472 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2347,7 +2500,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813473 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2362,7 +2516,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813474 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2377,7 +2532,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813475 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2392,7 +2548,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813476 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2407,7 +2564,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!114 &2039813477 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2422,7 +2580,8 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' --- !u!1 &2059449697 GameObject: m_ObjectHideFlags: 0 @@ -2450,6 +2609,7 @@ Transform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1754371141} m_RootOrder: 2 @@ -2468,4 +2628,5 @@ MonoBehaviour: m_EditorClassIdentifier: CustomStacktrace: 'Main.CUSTOM1 () (at Assets/Scripts/Main.cs:123) - Main.CUSTOM2 () (at Assets/Scripts/Main.cs:123)' + Main.CUSTOM2 + () (at Assets/Scripts/Main.cs:123)' diff --git a/features/fixtures/maze_runner/Assets/Scripts/Main.cs b/features/fixtures/maze_runner/Assets/Scripts/Main.cs index 9bb13f874..c42ecd5e7 100644 --- a/features/fixtures/maze_runner/Assets/Scripts/Main.cs +++ b/features/fixtures/maze_runner/Assets/Scripts/Main.cs @@ -34,7 +34,7 @@ public class Main : MonoBehaviour private string _fixtureConfigFileName = "/fixture_config.json"; private const string API_KEY = "a35a2a72bd230ac0aa0f52715bbdc6aa"; - private string _mazeHost; + public static string MazeHost; private const int MAX_CONFIG_GET_TRIES = 15; @@ -66,7 +66,7 @@ private IEnumerator GetFixtureConfig() var configJson = File.ReadAllText(configPath); Log("Mazerunner got fixture config json: " + configJson); var config = JsonUtility.FromJson(configJson); - _mazeHost = "http://" + config.maze_address; + MazeHost = "http://" + config.maze_address; break; } else @@ -78,18 +78,18 @@ private IEnumerator GetFixtureConfig() } } - if (string.IsNullOrEmpty(_mazeHost)) + if (string.IsNullOrEmpty(MazeHost)) { Log("Host not set from config file, using hard coded"); - _mazeHost = "http://localhost:9339"; + MazeHost = "http://localhost:9339"; if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) { - _mazeHost = "http://bs-local.com:9339"; + MazeHost = "http://bs-local.com:9339"; } } - Log("Mazerunner host set to: " + _mazeHost); + Log("Mazerunner host set to: " + MazeHost); } private void DoRunNextMazeCommand() @@ -99,7 +99,7 @@ private void DoRunNextMazeCommand() IEnumerator RunNextMazeCommand() { - var url = _mazeHost + "/command"; + var url = MazeHost + "/command"; Log("Requesting maze command from: " + url); using (UnityWebRequest request = UnityWebRequest.Get(url)) { @@ -136,7 +136,7 @@ IEnumerator RunNextMazeCommand() } else if ("run_scenario".Equals(command.action)) { - ScenarioRunner.RunScenario(command.scenarioName, API_KEY, _mazeHost); + ScenarioRunner.RunScenario(command.scenarioName, API_KEY, MazeHost); } else if ("close_application".Equals(command.action)) { diff --git a/features/fixtures/maze_runner/Assets/Scripts/Scenario.cs b/features/fixtures/maze_runner/Assets/Scripts/Scenario.cs index f124b5a58..dd7686691 100644 --- a/features/fixtures/maze_runner/Assets/Scripts/Scenario.cs +++ b/features/fixtures/maze_runner/Assets/Scripts/Scenario.cs @@ -25,6 +25,8 @@ public class Scenario : MonoBehaviour #endif + public const string FAIL_URL = "https://localhost:994"; + public Configuration Configuration; [HideInInspector] diff --git a/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsFail.cs b/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsFail.cs new file mode 100644 index 000000000..bd5b59bc7 --- /dev/null +++ b/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsFail.cs @@ -0,0 +1,20 @@ +using System.Collections; +using BugsnagNetworking; +using UnityEngine; + +public class NetworkBreadcrumbsFail: Scenario +{ + + public override void Run() + { + StartCoroutine(DoRun()); + } + + private IEnumerator DoRun() + { + var www = BugsnagUnityWebRequest.Get(FAIL_URL + "?success=false"); + yield return www.SendWebRequest(); + yield return new WaitForSeconds(1); + throw new System.Exception("NetworkBreadcrumbsFail"); + } +} diff --git a/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsFail.cs.meta b/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsFail.cs.meta new file mode 100644 index 000000000..c4b42247d --- /dev/null +++ b/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsFail.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 36160400d18884e48983505794649646 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs b/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs new file mode 100644 index 000000000..d8dbeafbb --- /dev/null +++ b/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs @@ -0,0 +1,32 @@ +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using BugsnagNetworking; +using UnityEngine; + +public class NetworkBreadcrumbsSuccess : Scenario +{ + + public override void PrepareConfig(string apiKey, string host) + { + base.PrepareConfig(apiKey, host); + Configuration.RedactedKeys = new List { new Regex("redactthis") }; + } + public override void Run() + { + StartCoroutine(DoRun()); + } + + private IEnumerator DoRun() + { + var get = BugsnagUnityWebRequest.Get(Main.MazeHost + "?success=true&redactthis=notRedacted"); + yield return get.SendWebRequest(); + yield return new WaitForSeconds(1); + + var post = BugsnagUnityWebRequest.Post(Main.MazeHost, "{\"action\":\"success\"}"); + yield return post.SendWebRequest(); + yield return new WaitForSeconds(1); + + throw new System.Exception("NetworkBreadcrumbsSuccess"); + } +} diff --git a/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs.meta b/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs.meta new file mode 100644 index 000000000..ab0f16169 --- /dev/null +++ b/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3cbe76e3ceae047ee85769786e2840dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/Assets/Bugsnag/Editor/BugsnagAddScriptingSymbol.cs b/src/Assets/Bugsnag/Editor/BugsnagAddScriptingSymbol.cs new file mode 100644 index 000000000..9f2474ce4 --- /dev/null +++ b/src/Assets/Bugsnag/Editor/BugsnagAddScriptingSymbol.cs @@ -0,0 +1,38 @@ +using UnityEditor; +using UnityEngine; +[InitializeOnLoad] +public class BugsnagAddScriptingSymbol : MonoBehaviour +{ + private const string DEFINE_SYMBOL = "BUGSNAG_UNITY_WEB_REQUEST"; + + private static BuildTargetGroup[] _supportedPlatforms = { BuildTargetGroup.Android, BuildTargetGroup.Standalone, BuildTargetGroup.iOS, BuildTargetGroup.WebGL }; + + static BugsnagAddScriptingSymbol() + { + foreach (var target in _supportedPlatforms) + { + try + { + SetScriptingSymbol(target); + } + catch + { + // Some users might not have a platform installed, in that case ignore the error + } + } + } + + static void SetScriptingSymbol(BuildTargetGroup buildTargetGroup) + { + var existingSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(buildTargetGroup); + if (string.IsNullOrEmpty(existingSymbols)) + { + existingSymbols = DEFINE_SYMBOL; + } + else if (!existingSymbols.Contains(DEFINE_SYMBOL)) + { + existingSymbols += ";" + DEFINE_SYMBOL; + } + PlayerSettings.SetScriptingDefineSymbolsForGroup(buildTargetGroup, existingSymbols); + } +} diff --git a/src/Assets/Bugsnag/Editor/BugsnagAddScriptingSymbol.cs.meta b/src/Assets/Bugsnag/Editor/BugsnagAddScriptingSymbol.cs.meta new file mode 100644 index 000000000..671526312 --- /dev/null +++ b/src/Assets/Bugsnag/Editor/BugsnagAddScriptingSymbol.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8e3c9a6b6e3c84299b5a658c6849d7ac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/BugsnagUnity/Bugsnag.cs b/src/BugsnagUnity/Bugsnag.cs index 8a4df502c..34622f97a 100644 --- a/src/BugsnagUnity/Bugsnag.cs +++ b/src/BugsnagUnity/Bugsnag.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using BugsnagUnity.Payload; +using UnityEngine.Networking; namespace BugsnagUnity { @@ -55,6 +56,8 @@ public static bool IsStarted() public static void LeaveBreadcrumb(string message, Dictionary metadata = null, BreadcrumbType type = BreadcrumbType.Manual ) => InternalClient.Breadcrumbs.Leave(message, metadata, type); + public static void LeaveBreadcrumb(UnityWebRequest request, TimeSpan? duration) => InternalClient.LeaveNetworkBreadcrumb(request, duration); + public static User GetUser() => Client.GetUser(); public static void SetUser(string id, string email, string name) => Client.SetUser(id, email, name); diff --git a/src/BugsnagUnity/BugsnagUnityWebRequest b/src/BugsnagUnity/BugsnagUnityWebRequest new file mode 160000 index 000000000..7fcd78f89 --- /dev/null +++ b/src/BugsnagUnity/BugsnagUnityWebRequest @@ -0,0 +1 @@ +Subproject commit 7fcd78f89d1f999f10d9245c4e7e3d8f8e224a5a diff --git a/src/BugsnagUnity/Client.cs b/src/BugsnagUnity/Client.cs index d63e4e633..a81676171 100644 --- a/src/BugsnagUnity/Client.cs +++ b/src/BugsnagUnity/Client.cs @@ -8,6 +8,8 @@ using UnityEngine.SceneManagement; using System; using System.Collections; +using BugsnagNetworking; +using UnityEngine.Networking; namespace BugsnagUnity { @@ -115,7 +117,7 @@ public Client(INativeClient nativeClient) NativeClient = nativeClient; CacheManager = new CacheManager(Configuration); PayloadManager = new PayloadManager(CacheManager); - _delivery = new Delivery(this, Configuration,CacheManager,PayloadManager); + _delivery = new Delivery(this, Configuration, CacheManager, PayloadManager); MainThread = Thread.CurrentThread; SessionTracking = new SessionTracker(this); _isUnity2019OrHigher = IsUnity2019OrHigher(); @@ -129,11 +131,12 @@ public Client(INativeClient nativeClient) SetupAdvancedExceptionInterceptor(); } InitTimingTracker(); - StartInitialSession(); + StartInitialSession(); CheckForMisconfiguredEndpointsWarning(); AddBugsnagLoadedBreadcrumb(); _delivery.StartDeliveringCachedPayloads(); ListenForSceneLoad(); + SetupNetworkListeners(); InitLogHandlers(); } @@ -257,14 +260,15 @@ public bool IsUsingFallback() private void ListenForSceneLoad() { - SceneManager.sceneLoaded += (Scene scene, LoadSceneMode loadSceneMode) => { + SceneManager.sceneLoaded += (Scene scene, LoadSceneMode loadSceneMode) => + { if (Configuration.IsBreadcrumbTypeEnabled(BreadcrumbType.Navigation)) { Breadcrumbs.Leave("Scene Loaded", new Dictionary { { "sceneName", scene.name } }, BreadcrumbType.Navigation); } - _storedMetadata.AddMetadata("app", "lastLoadedUnityScene",scene.name); + _storedMetadata.AddMetadata("app", "lastLoadedUnityScene", scene.name); }; - } + } public void Send(IPayload payload) { @@ -319,7 +323,7 @@ private void NotifyFromUnityLog(string condition, string stackTrace, LogType log { {"logLevel" , logType.ToString() } }; - Breadcrumbs.Leave(condition, metadata, BreadcrumbType.Log ); + Breadcrumbs.Leave(condition, metadata, BreadcrumbType.Log); } } @@ -385,8 +389,8 @@ private void Notify(Error[] exceptions, HandledState handledState, Func callback, LogType? logType) @@ -406,7 +410,7 @@ private void NotifyOnMainThread(Error[] exceptions, HandledState handledState, F NativeClient.PopulateAppWithState(app); - var device = new DeviceWithState(Configuration,CacheManager.GetCachedDeviceId()); + var device = new DeviceWithState(Configuration, CacheManager.GetCachedDeviceId()); NativeClient.PopulateDeviceWithState(device); @@ -486,7 +490,7 @@ private void NotifyOnMainThread(Error[] exceptions, HandledState handledState, F if (!report.Ignored) { //if serialisation fails, then we ignore the event - if (PayloadManager.AddPendingPayload(report)) + if (PayloadManager.AddPendingPayload(report)) { Send(report); if (Configuration.IsBreadcrumbTypeEnabled(BreadcrumbType.Error)) @@ -498,7 +502,7 @@ private void NotifyOnMainThread(Error[] exceptions, HandledState handledState, F } } - + private bool ShouldAddProjectPackagesToEvent(Payload.Event theEvent) { return Application.platform.Equals(RuntimePlatform.Android) @@ -575,10 +579,10 @@ public void SetContext(string context) public string GetContext() { return Configuration.Context; - } + } public void MarkLaunchCompleted() => NativeClient.MarkLaunchCompleted(); - + public void AddOnError(Func bugsnagCallback) => Configuration.AddOnError(bugsnagCallback); public void RemoveOnError(Func bugsnagCallback) => Configuration.RemoveOnError(bugsnagCallback); @@ -593,13 +597,13 @@ public void AddOnSession(Func callback) public void AddMetadata(string section, string key, object value) => _storedMetadata.AddMetadata(section, key, value); - public void AddMetadata(string section, IDictionary metadata) => _storedMetadata.AddMetadata(section,metadata); + public void AddMetadata(string section, IDictionary metadata) => _storedMetadata.AddMetadata(section, metadata); public void ClearMetadata(string section) => _storedMetadata.ClearMetadata(section); public void ClearMetadata(string section, string key) => _storedMetadata.ClearMetadata(section, key); - public IDictionary GetMetadata(string section) => _storedMetadata.GetMetadata(section); + public IDictionary GetMetadata(string section) => _storedMetadata.GetMetadata(section); public object GetMetadata(string section, string key) => _storedMetadata.GetMetadata(section, key); @@ -626,7 +630,7 @@ public void AddFeatureFlags(FeatureFlag[] featureFlags) { AddFeatureFlag(flag.Name, flag.Variant); } - } + } public void ClearFeatureFlag(string name) { @@ -639,5 +643,99 @@ public void ClearFeatureFlags() _featureFlags.Clear(); NativeClient.ClearFeatureFlags(); } + + private void SetupNetworkListeners() + { + // Currently network breadcrumb are the only feature using the web events. + // If we add more features that use web request events, we will need to move this check + if (!Configuration.IsBreadcrumbTypeEnabled(BreadcrumbType.Request)) + { + return; + } + BugsnagUnityWebRequest.OnSend.AddListener(OnWebRequestSend); + BugsnagUnityWebRequest.OnComplete.AddListener(OnWebRequestComplete); + BugsnagUnityWebRequest.OnAbort.AddListener(OnWebRequestAbort); + } + + private readonly Dictionary _requestStartTimes = new Dictionary(); + + + private void OnWebRequestComplete(BugsnagUnityWebRequest request) + { + if (_requestStartTimes.TryGetValue(request, out DateTimeOffset startTime)) + { + TimeSpan duration = DateTimeOffset.UtcNow - startTime; + LeaveNetworkBreadcrumb(request.UnityWebRequest, duration); + _requestStartTimes.Remove(request); + } + else + { + LeaveNetworkBreadcrumb(request.UnityWebRequest, null); + } + } + + private void OnWebRequestSend(BugsnagUnityWebRequest request) + { + _requestStartTimes[request] = DateTimeOffset.UtcNow; + } + + private void OnWebRequestAbort(BugsnagUnityWebRequest request) + { + if (_requestStartTimes.ContainsKey(request)) + { + _requestStartTimes.Remove(request); + } + } + + public void LeaveNetworkBreadcrumb(UnityWebRequest request, TimeSpan? duration) + { + string statusMessage = request.result == UnityWebRequest.Result.Success ? "succeeded" : "failed"; + string fullMessage = $"UnityWebRequest {statusMessage}"; + var metadata = new Dictionary(); + metadata["status"] = request.responseCode; + metadata["method"] = request.method; + metadata["url"] = request.url; + var urlParams = ExtractUrlParams(request.uri); + if (urlParams.Count > 0) + { + metadata["urlParams"] = urlParams; + } + metadata["duration"] = duration?.TotalMilliseconds; + if (request.uploadHandler != null && request.uploadHandler.data != null) + { + metadata["requestContentLength"] = request.uploadHandler.data.Length; + } + if (request.downloadHandler != null && request.downloadHandler.data != null) + { + metadata["responseContentLength"] = request.downloadHandler.data.Length; + } + Breadcrumbs.Leave(fullMessage, metadata, BreadcrumbType.Request); + } + + private Dictionary ExtractUrlParams(Uri uri) + { + var queryParams = new Dictionary(); + var querySegments = uri.Query.TrimStart('?').Split('&'); + + foreach (var segment in querySegments) + { + var parts = segment.Split('='); + if (parts.Length == 2) + { + if (Configuration.KeyIsRedacted(parts[0])) + { + queryParams[parts[0]] = "[REDACTED]"; + } + else + { + queryParams[parts[0]] = parts[1]; + } + } + } + + return queryParams; + } + + } } diff --git a/tests/UnityEngine/UnityAction.cs b/tests/UnityEngine/UnityAction.cs index 9ae339a36..6173ac000 100644 --- a/tests/UnityEngine/UnityAction.cs +++ b/tests/UnityEngine/UnityAction.cs @@ -7,7 +7,10 @@ public void AddListener(UnityAction action) { } public void Invoke() { } } - + public class UnityEvent { + public void AddListener(UnityAction action) { } + public void Invoke(T0 arg0) { } + } public delegate void UnityAction(); public delegate void UnityAction(T0 arg0); From d03d70f714fe88dff393c9d1da844c3e23e7756c Mon Sep 17 00:00:00 2001 From: JamesLindsay0 Date: Tue, 9 Jul 2024 10:37:42 +0100 Subject: [PATCH 07/18] Fix timing issues when Bugsnag started after the focus event (#825) --- CHANGELOG.md | 4 ++++ src/BugsnagUnity/Client.cs | 2 ++ src/BugsnagUnity/Native/Fallback/NativeClient.cs | 2 +- src/BugsnagUnity/Native/Windows/NativeClient.cs | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc8098a15..f184804e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ - Update bugsnag-cocoa to [v6.29.0](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.29.0) [#814](https://github.com/bugsnag/bugsnag-unity/pull/814) +### Bug Fixes + +- Fix timing issues when Bugsnag is started after the focus event. [#821](https://github.com/bugsnag/bugsnag-unity/pull/821) + ## 8.0.0 (2024-06-12) ### Enhancements diff --git a/src/BugsnagUnity/Client.cs b/src/BugsnagUnity/Client.cs index a81676171..93911c05c 100644 --- a/src/BugsnagUnity/Client.cs +++ b/src/BugsnagUnity/Client.cs @@ -206,6 +206,8 @@ private void InitStopwatches() { _foregroundStopwatch = new Stopwatch(); _backgroundStopwatch = new Stopwatch(); + // Required in case the focus event is not recieved (if Bugsnag is started after it is sent) + _foregroundStopwatch.Start(); } private void InitUserObject() diff --git a/src/BugsnagUnity/Native/Fallback/NativeClient.cs b/src/BugsnagUnity/Native/Fallback/NativeClient.cs index b57a08212..fad9b85e7 100644 --- a/src/BugsnagUnity/Native/Fallback/NativeClient.cs +++ b/src/BugsnagUnity/Native/Fallback/NativeClient.cs @@ -50,7 +50,7 @@ private void AddIsLaunching(AppWithState app) } else { - isLaunching = app.DurationInForeground?.TotalMilliseconds < Configuration.LaunchDurationMillis; + isLaunching = app.Duration?.TotalMilliseconds < Configuration.LaunchDurationMillis; } app.IsLaunching = isLaunching; } diff --git a/src/BugsnagUnity/Native/Windows/NativeClient.cs b/src/BugsnagUnity/Native/Windows/NativeClient.cs index 85d985019..4a62868e7 100644 --- a/src/BugsnagUnity/Native/Windows/NativeClient.cs +++ b/src/BugsnagUnity/Native/Windows/NativeClient.cs @@ -44,7 +44,7 @@ private void AddIsLaunching(AppWithState app) } else { - isLaunching = app.DurationInForeground?.TotalMilliseconds < Configuration.LaunchDurationMillis; + isLaunching = app.Duration?.TotalMilliseconds < Configuration.LaunchDurationMillis; } app.IsLaunching = isLaunching; } From 4e67a6b174869a1d57e444b505a31e0543fc753d Mon Sep 17 00:00:00 2001 From: JamesLindsay0 Date: Tue, 9 Jul 2024 14:16:58 +0100 Subject: [PATCH 08/18] Display BugsnagUnity version in the configuration panel (#824) --- CHANGELOG.md | 4 ++++ src/Assets/Bugsnag/Editor/BugsnagEditor.cs | 3 +++ src/BugsnagUnity/Configuration.cs | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f184804e2..546314ae3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## TBD +### Enhancements + +- Added the BugsnagUnity version to the configuration window. [#819](https://github.com/bugsnag/bugsnag-unity/pull/819) + ### Dependencies ### Enhancements diff --git a/src/Assets/Bugsnag/Editor/BugsnagEditor.cs b/src/Assets/Bugsnag/Editor/BugsnagEditor.cs index fd598d838..609d0c815 100644 --- a/src/Assets/Bugsnag/Editor/BugsnagEditor.cs +++ b/src/Assets/Bugsnag/Editor/BugsnagEditor.cs @@ -78,6 +78,9 @@ private void DrawSettingsEditorWindow() var settings = GetSettingsObject(); var so = new SerializedObject(settings); + var assemblyName = BugsnagUnity.Configuration.GetAssemblyName(); + var version = assemblyName.Version; + EditorGUILayout.LabelField($"{assemblyName.Name} version {version.Major}.{version.Minor}.{version.Build}"); _showBasicConfig = EditorGUILayout.Foldout(_showBasicConfig, "Basic Configuration", true); if (_showBasicConfig) diff --git a/src/BugsnagUnity/Configuration.cs b/src/BugsnagUnity/Configuration.cs index 3f624291e..7fb87127a 100644 --- a/src/BugsnagUnity/Configuration.cs +++ b/src/BugsnagUnity/Configuration.cs @@ -1,4 +1,5 @@ using System; +using System.Reflection; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; @@ -361,6 +362,10 @@ public void ClearFeatureFlags() { FeatureFlags.Clear(); } + + public static AssemblyName GetAssemblyName() { + return typeof(Configuration).Assembly.GetName(); + } } [Serializable] From bd28e4b10dc6e7d8043e15a508be7f3e5735c76a Mon Sep 17 00:00:00 2001 From: JamesLindsay0 Date: Tue, 9 Jul 2024 14:19:05 +0100 Subject: [PATCH 09/18] Remove unnecessary ToArray() when constructing an error (#822) --- CHANGELOG.md | 11 ++++++----- src/BugsnagUnity/Payload/Error.cs | 16 ++++++++-------- src/BugsnagUnity/Payload/StackTraceLine.cs | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 546314ae3..2b936cbe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,18 +6,19 @@ - Added the BugsnagUnity version to the configuration window. [#819](https://github.com/bugsnag/bugsnag-unity/pull/819) -### Dependencies - -### Enhancements - - Added automatic and manual network request breadcrumbs. [#817](https://github.com/bugsnag/bugsnag-unity/pull/817) -- Update bugsnag-cocoa to [v6.29.0](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.29.0) [#814](https://github.com/bugsnag/bugsnag-unity/pull/814) +- Remove unnecessary ToArray() call when constructing an error. [#822](https://github.com/bugsnag/bugsnag-unity/pull/822) ### Bug Fixes - Fix timing issues when Bugsnag is started after the focus event. [#821](https://github.com/bugsnag/bugsnag-unity/pull/821) +### Dependencies + +- Update bugsnag-cocoa to [v6.29.0](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.29.0) [#814](https://github.com/bugsnag/bugsnag-unity/pull/814) + + ## 8.0.0 (2024-06-12) ### Enhancements diff --git a/src/BugsnagUnity/Payload/Error.cs b/src/BugsnagUnity/Payload/Error.cs index b194feb13..e5711a405 100644 --- a/src/BugsnagUnity/Payload/Error.cs +++ b/src/BugsnagUnity/Payload/Error.cs @@ -144,7 +144,7 @@ internal static Error FromSystemException(System.Exception exception, System.Dia var androidErrorData = ProcessAndroidError(exception.Message); var androidErrorClass = androidErrorData[0]; var androidErrorMessage = androidErrorData[1]; - var lines = new StackTrace(exception.StackTrace, StackTraceFormat.AndroidJava).ToArray(); + var lines = new StackTrace(exception.StackTrace, StackTraceFormat.AndroidJava).StackTraceLines; return new Error(androidErrorClass, androidErrorMessage, lines, HandledState.ForUnhandledException(), true); } else @@ -152,11 +152,11 @@ internal static Error FromSystemException(System.Exception exception, System.Dia StackTraceLine[] lines; if (!string.IsNullOrEmpty(exception.StackTrace)) { - lines = new StackTrace(exception.StackTrace).ToArray(); + lines = new StackTrace(exception.StackTrace).StackTraceLines; } else { - lines = new StackTrace(alternativeStackTrace).ToArray(); + lines = new StackTrace(alternativeStackTrace).StackTraceLines; } return new Error(errorClass, exception.Message, lines); } @@ -165,14 +165,14 @@ internal static Error FromSystemException(System.Exception exception, System.Dia internal static Error FromStringInfo(string name, string message, string stacktrace) { - var stackFrames = new StackTrace(stacktrace).ToArray(); + var stackFrames = new StackTrace(stacktrace).StackTraceLines; return new Error(name, message, stackFrames); } internal static Error FromSystemException(System.Exception exception, string stackTrace) { var errorClass = exception.GetType().Name; - var lines = new StackTrace(stackTrace).ToArray(); + var lines = new StackTrace(stackTrace).StackTraceLines; return new Error(errorClass, exception.Message, lines); } @@ -209,10 +209,10 @@ public static Error FromUnityLogMessage(UnityLogMessage logMessage, System.Diagn { var match = Regex.Match(logMessage.Condition, ERROR_CLASS_MESSAGE_PATTERN, RegexOptions.Singleline); - var lines = new StackTrace(logMessage.StackTrace).ToArray(); + var lines = new StackTrace(logMessage.StackTrace).StackTraceLines; if (lines.Length == 0) { - lines = new StackTrace(fallbackStackFrames).ToArray(); + lines = new StackTrace(fallbackStackFrames).StackTraceLines; } var handledState = forceUnhandled @@ -231,7 +231,7 @@ public static Error FromUnityLogMessage(UnityLogMessage logMessage, System.Diagn var androidErrorData = ProcessAndroidError(message); errorClass = androidErrorData[0]; message = androidErrorData[1]; - lines = new StackTrace(logMessage.StackTrace, StackTraceFormat.AndroidJava).ToArray(); + lines = new StackTrace(logMessage.StackTrace, StackTraceFormat.AndroidJava).StackTraceLines; handledState = HandledState.ForUnhandledException(); } return new Error(errorClass, message, lines, handledState, isAndroidJavaException); diff --git a/src/BugsnagUnity/Payload/StackTraceLine.cs b/src/BugsnagUnity/Payload/StackTraceLine.cs index 063da00c4..d98bd02f4 100644 --- a/src/BugsnagUnity/Payload/StackTraceLine.cs +++ b/src/BugsnagUnity/Payload/StackTraceLine.cs @@ -16,7 +16,7 @@ internal enum StackTraceFormat { Standard, AndroidJava }; /// class StackTrace : IEnumerable { - private StackTraceLine[] StackTraceLines { get; } + public StackTraceLine[] StackTraceLines { get; private set; } internal StackTrace(StackFrame[] stackFrames) { From e8f4dcac14759be41db8665c01557c06f405fc39 Mon Sep 17 00:00:00 2001 From: JamesLindsay0 Date: Thu, 11 Jul 2024 08:48:31 +0100 Subject: [PATCH 10/18] Release automation (#823) --- CONTRIBUTING.md | 33 +++----- Rakefile | 203 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 214 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0a5e7ce0b..36fe23181 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -108,21 +108,20 @@ bundle exec maze-runner features/handled_errors.feature 1. Make sure any changes made since last release in `master` are merged into `next`. -2. Checkout the `next` branch. Set the version number in the change log and `build.sh`. +2. Checkout the `next` branch. -3. Commit the changelog and version updates: +3. To bump the version in `build.sh` and `CHANGELOG.md`, run: + + ``` + rake "plugin:bump[1.2.3]" + ``` - ``` - git add CHANGELOG.md build.sh - git commit -m "Release v7.x.x" - ``` 4. Make a pull request to merge the changes into `master` -5. Once merged, tag the new release version, pushing the tag to GitHub: +5. Once merged, tag the new release version, pushing the tag to GitHub using: ``` - git tag v7.x.x - git push origin v7.x.x + rake plugin:release ``` 6. Wait. The CI build will build the new package and create a draft release. @@ -135,20 +134,10 @@ Once the UnityPackage release is confirmed a UPM release should be deployed 1. Make sure that the package used in the github release is present in the root of the repo. -2. Build the upm package by running the `build-upm-package.sh` script in the upm-tools directory. You should pass the version number of the release like so `./build-upm-package.sh 7.x.x`. You must run the script from within the upm-tools folder. This will build the upm package in a directory called `upm-package` - -3. Test that the built package installs by using the install local package option in unity package manager. - -4. Clone the `bugsnag-unity-upm` repo and make sure you are in the `main` branch. - -5. Replace the contents of the repo with the contents of the `upm-package` directory in the `bugsnag-unity` repo -6. Commit these changes to main with the message `Release V7.x.x` -7. Tag the release and push the tag - ``` - git tag v7.x.x - git push origin v7.x.x +2. Run: + ``` + rake plugin:package ``` -8. Run the script `./build-edm-package.sh` , this will convert the built package to the EDM4U support version. Repeat the UPM release steps but with the `bugsnag-unity-upm-edm4u` repo. #### Post-release diff --git a/Rakefile b/Rakefile index 65ecef444..456c7a2fb 100644 --- a/Rakefile +++ b/Rakefile @@ -2,6 +2,8 @@ require "open3" require "xcodeproj" require "rbconfig" require 'fileutils' +require 'tmpdir' +require "json" unless ENV['GITHUB_ACTIONS'].nil? require "bumpsnag" @@ -144,6 +146,116 @@ def assemble_android filter_abis=true end +def get_current_version() + version_line = File.open("build.sh").read.lines.find { |line| line.start_with?("VERSION=\"") }.strip + return version_line.delete_prefix("VERSION=\"").delete_suffix("\"") +end + +# Generate the upm package by importing the package file +def create_upm(package_dir, upm_tools, package_file, cli_args) + # Clone upm package + if File.directory?(package_dir) + FileUtils.remove_dir(package_dir) + end + system("git clone --recursive --depth 1 https://github.com/bugsnag/bugsnag-unity-upm.git #{package_dir}") + + version = get_current_version() + + # Check for the release package + if not File.file?(package_file) + throw "#{package_file} not found, please build the package." + end + puts "SDK package found" + + + if ENV["UNITY_UPM_VERSION"] != nil and ENV["UNITY_UPM_VERSION"].length > 0 + unity_executable = "/Applications/Unity/Hub/Editor/#{ENV["UNITY_UPM_VERSION"]}/Unity.app/Contents/MacOS" + elsif ENV["UNITY_PATH"] != nil and ENV["UNITY_PATH"].length > 0 + unity_executable = File.join(ENV["UNITY_PATH"], "Unity") + end + + puts "Unity executable #{unity_executable}" + # Importing the .unitypackage into the import project + project_path = File.join(upm_tools, "UPMImportProject") + system("#{unity_executable} #{cli_args} -projectPath #{project_path} -ignoreCompilerErrors -importPackage #{package_file}") + + puts "Copying over the unpacked sdk files" + import_project = File.join(project_path, "Assets", "Bugsnag", ".") + + # Copying the unpacked sdk files + FileUtils.cp_r(import_project, package_dir) + + # Copying the package manifest, assembly definitions, and README + ["package.json", "package.json.meta", "README.md", "README.md.meta"].each { |file| FileUtils.cp(File.join(upm_tools, file), package_dir)} + FileUtils.cp(File.join(upm_tools, "AssemblyDefinitions", "Bugsnag.asmdef"), File.join(package_dir, "Scripts")) + FileUtils.cp(File.join(upm_tools, "AssemblyDefinitions", "Bugsnag.asmdef.meta"), File.join(package_dir, "Scripts")) + FileUtils.cp(File.join(upm_tools, "AssemblyDefinitions", "BugsnagEditor.asmdef"), File.join(package_dir, "Editor")) + FileUtils.cp(File.join(upm_tools, "AssemblyDefinitions", "BugsnagEditor.asmdef.meta"), File.join(package_dir, "Editor")) + + # Remove EDM menu from package + if File.file?(File.join(package_dir, "Editor", "BugsnagEditor.EDM.cs")) + File.delete(File.join(package_dir, "Editor", "BugsnagEditor.EDM.cs")) + File.delete(File.join(package_dir, "Editor", "BugsnagEditor.EDM.cs.meta")) + end + + # Set version in manifest and README + puts "Setting the version #{version} in copied manifest and readme" + File.write(File.join(package_dir, "README.md"), File.read(File.join(package_dir, "README.md")).gsub("VERSION_STRING", "v#{version}")) + File.write(File.join(package_dir, "package.json"), File.read(File.join(package_dir, "package.json")).gsub("VERSION_STRING", version)) +end + +# Generate the upm-edm4u based on the upm package_dir +def create_edm(package_dir, upm_tools, edm_package) + if File.directory?(edm_package) + FileUtils.remove_dir(edm_package) + end + system("git clone --recursive --depth 1 https://github.com/bugsnag/bugsnag-unity-upm-edm4u.git #{edm_package}") + FileUtils.cp_r(package_dir, edm_package) + + # Remove bundled kotlin libs + if File.directory?(File.join(edm_package, "Plugins", "Android", "Kotlin")) + FileUtils.remove_dir(File.join(edm_package, "Plugins", "Android", "Kotlin")) + File.delete(File.join(edm_package, "Plugins", "Android", "Kotlin.meta")) + end + + # Copy in the EDM4U manifest + FileUtils.cp(File.join(upm_tools, "EDM", "BugsnagAndroidDependencies.xml"), File.join(edm_package, "Editor")) + FileUtils.cp(File.join(upm_tools, "EDM", "BugsnagAndroidDependencies.xml.meta"), File.join(edm_package, "Editor")) + + # Change the readme title to reference EDM4U + updated_readme = File.read(File.join(edm_package, "README.md")).gsub("Bugsnag SDK for Unity", "Bugsnag SDK for Unity Including EDM4U Support").gsub("bugsnag-unity-upm.git", "bugsnag-unity-upm-edm4u.git") + File.write(File.join(edm_package, "README.md"), updated_readme) +end + +# Test the UPM package by adding the file to the dependencies of the minimalapp +def test_package(cli_args, package_dir) + project_root = File.join(File.dirname(__FILE__), "features", "fixtures", "minimalapp") + manifest = File.join(project_root, "Packages", "manifest.json") + File.write(manifest, "{\"dependencies\": {\"com.bugsnag.unitynotifier\": \"file:#{package_dir}\"}}") + system("#{unity_executable} #{cli_args} -logFile unity.log -projectPath #{project_root}") + if $?.exitstatus == 1 + throw "Failed to import UPM" + end +end + +# Commit and tag the release +def update_package_git(package_dir) + version = get_current_version() + Dir.chdir(package_dir) do + system("git add -A") + system("git commit -m \"Release V#{version}\"") + system("git push") + if $?.exitstatus != 0 + throw "Cannot push." + end + system("git tag v#{version}") + system("git push origin v#{version}") + if $?.exitstatus != 0 + throw "Cannot push tag." + end + end +end + namespace :plugin do namespace :build do cocoa_build_dir = "bugsnag-cocoa-build" @@ -352,6 +464,97 @@ namespace :plugin do Rake::Task["plugin:build:all_android64"].invoke export_package("Bugsnag.unitypackage") end + + desc "Create a PR for the release. Usage: `rake \"plugin:bump[8.1.0]\"`. Quotes required around args in zsh." + task :bump, [:version] do |task, args| + new_version = args[:version] + if new_version == nil or new_version.length < 5 or new_version.chars.any? { |letter| !"0123456789.".include? letter } + throw "New version required e.g. `rake \"plugin:bump[8.1.0]\"`." + end + + branch = %x|git rev-parse --abbrev-ref HEAD|.strip + if branch != "next" + throw "Must be on the 'next' branch. Current branch is #{branch}." + end + + # Update CHANGELOG.md if it doesn't already have the new version + changelog = File.open("CHANGELOG.md").read + if not changelog.include? "## #{new_version}" + insert_index = changelog.index("## TBD") + 6 + changelog.insert(insert_index, "\n\n\n## #{new_version} (#{Time.now.strftime("%Y-%m-%d")})") + File.write("CHANGELOG.md", changelog) + puts "Updated CHANGELOG.md" + end + + # Update build.sh + build_sh = File.open("build.sh").read.lines.map { |line| line.start_with?("VERSION=\"") ? "VERSION=\"#{new_version}\"\n" : line }.join + File.write("build.sh", build_sh) + + # Commit + %x|git add CHANGELOG.md build.sh| + %x|git diff --exit-code| + if $?.exitstatus == 1 + throw "You have unstaged changes." + end + system("git commit -m \"Release v#{new_version}\"") + system("git push origin next") + system("open", "https://github.com/bugsnag/bugsnag-unity/compare/master...next?expand=1&title=Release%20v#{new_version}") + puts "Once you have merged the PR you can run `rake plugin:release`" + end + + desc "Releases the current master branch" + task :release do + version = get_current_version() + + system("git fetch origin") + if %x|git rev-parse --abbrev-ref HEAD|.strip != "master" + puts "Switching to the 'master' branch..." + system("git switch master") + if $?.exitstatus != 0 + throw "Cannot switch to 'master'." + end + system("git rebase origin/master") + if $?.exitstatus != 0 + throw "Cannot rebase." + end + end + system("git diff origin/master..master") + if $?.exitstatus != 0 + throw "You have unpushed commits." + end + system("git tag v#{version}") + if $?.exitstatus != 0 + throw "Cannot create tag." + end + system("git push origin tag v#{version}") + if $?.exitstatus != 0 + throw "Cannot push tag." + end + end + + desc "Create UPM and EDM packages" + task :package do + pwd = File.dirname(__FILE__) + upm_tools = File.join(pwd, "upm-tools") + package_file = File.join(pwd, "Bugsnag.unitypackage") + cli_args = "-quit -batchmode -nographics -logFile unity.log" + package_dir = File.join(pwd, "bugsnag-unity-upm") + edm_package = File.join(pwd, "bugsnag-unity-upm-edm4u") + + + + + puts "Creating UPM package" + create_upm(package_dir, upm_tools, package_file, cli_args) + puts "Creating EDM package" + create_edm(package_dir, upm_tools, edm_package) + puts "Testing generated package" + test_package(cli_args, package_dir) + puts "Committing changes" + update_package_git(package_dir) + update_package_git(edm_package) + + end end namespace :example do From 51851fb7efc27e9b3fdac9eeb07e7ceeb74dc15d Mon Sep 17 00:00:00 2001 From: JamesLindsay0 Date: Tue, 16 Jul 2024 14:33:09 +0100 Subject: [PATCH 11/18] Bump the NDK version in bugsnag-android-unity to match android (#827) --- bugsnag-android-unity/build.gradle | 2 +- features/fixtures/maze_runner/nativeplugin/android/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bugsnag-android-unity/build.gradle b/bugsnag-android-unity/build.gradle index 696356b9d..bcebd874b 100644 --- a/bugsnag-android-unity/build.gradle +++ b/bugsnag-android-unity/build.gradle @@ -28,7 +28,7 @@ android { abiFilters "arm64-v8a", "armeabi-v7a", "x86", "x86_64" } } - ndkVersion = "16.1.4479499" + ndkVersion = "21.4.7075529" } externalNativeBuild { diff --git a/features/fixtures/maze_runner/nativeplugin/android/build.gradle b/features/fixtures/maze_runner/nativeplugin/android/build.gradle index 687601e47..6c5ab09b8 100644 --- a/features/fixtures/maze_runner/nativeplugin/android/build.gradle +++ b/features/fixtures/maze_runner/nativeplugin/android/build.gradle @@ -21,7 +21,7 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 30 - ndkVersion = "16.1.4479499" + ndkVersion = "21.4.7075529" } externalNativeBuild.cmake.path "CMakeLists.txt" } From c667ade899ba8dd92bd4672960b6e9eb53082e54 Mon Sep 17 00:00:00 2001 From: JamesLindsay0 Date: Wed, 17 Jul 2024 15:55:11 +0100 Subject: [PATCH 12/18] Fix network breadcrumb test (#829) --- features/csharp/csharp_breadcrumbs.feature | 26 +++++++++---------- .../Breadcrumbs/NetworkBreadcrumbsSuccess.cs | 2 ++ features/steps/unity_steps.rb | 6 +++++ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/features/csharp/csharp_breadcrumbs.feature b/features/csharp/csharp_breadcrumbs.feature index d73be1996..c3253b52b 100644 --- a/features/csharp/csharp_breadcrumbs.feature +++ b/features/csharp/csharp_breadcrumbs.feature @@ -84,24 +84,24 @@ Feature: Csharp Breadcrumbs Then the error is valid for the error reporting API sent by the Unity notifier And the exception "message" equals "NetworkBreadcrumbsSuccess" + And the event "breadcrumbs.0.name" equals "UnityWebRequest succeeded" + And the event "breadcrumbs.0.type" equals "request" + And the event "breadcrumbs.0.metaData.method" equals "GET" + And the error payload field "events.0.breadcrumbs.0.metaData.url" matches the regex "^http:\/\/\S*:\d{4}(\/.*)?" + And the event "breadcrumbs.0.metaData.status" equals 200 + And the event "breadcrumbs.0.metaData.urlParams.success" equals "true" + And the event "breadcrumbs.0.metaData.urlParams.redactthis" equals "[REDACTED]" + And the event "breadcrumbs.0.metaData.duration" is greater than 0 + And the event "breadcrumbs.0.metaData.responseContentLength" is greater than 0 + And the event "breadcrumbs.1.name" equals "UnityWebRequest succeeded" And the event "breadcrumbs.1.type" equals "request" - And the event "breadcrumbs.1.metaData.method" equals "GET" + And the event "breadcrumbs.1.metaData.method" equals "POST" And the error payload field "events.0.breadcrumbs.1.metaData.url" matches the regex "^http:\/\/\S*:\d{4}(\/.*)?" And the event "breadcrumbs.1.metaData.status" equals 200 - And the event "breadcrumbs.1.metaData.urlParams.success" equals "true" - And the event "breadcrumbs.1.metaData.urlParams.redactthis" equals "[REDACTED]" And the event "breadcrumbs.1.metaData.duration" is greater than 0 And the event "breadcrumbs.1.metaData.responseContentLength" is greater than 0 - - And the event "breadcrumbs.2.name" equals "UnityWebRequest succeeded" - And the event "breadcrumbs.2.type" equals "request" - And the event "breadcrumbs.2.metaData.method" equals "POST" - And the error payload field "events.0.breadcrumbs.2.metaData.url" matches the regex "^http:\/\/\S*:\d{4}(\/.*)?" - And the event "breadcrumbs.2.metaData.status" equals 200 - And the event "breadcrumbs.2.metaData.duration" is greater than 0 - And the event "breadcrumbs.2.metaData.responseContentLength" is greater than 0 - And the event "breadcrumbs.2.metaData.requestContentLength" is greater than 0 + And the event "breadcrumbs.1.metaData.requestContentLength" is greater than 0 Scenario: Network breadcrumb fails @@ -113,7 +113,7 @@ Feature: Csharp Breadcrumbs And the event "breadcrumbs.1.type" equals "request" And the event "breadcrumbs.1.metaData.method" equals "GET" And the error payload field "events.0.breadcrumbs.1.metaData.url" equals "https://localhost:994/?success=false" - And the event "breadcrumbs.1.metaData.status" equals 0 + And the event "breadcrumbs.1.metaData.status" has failed And the event "breadcrumbs.1.metaData.urlParams.success" equals "false" And the event "breadcrumbs.1.metaData.duration" is greater than 0 diff --git a/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs b/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs index d8dbeafbb..500035180 100644 --- a/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs +++ b/features/fixtures/maze_runner/Assets/Scripts/Scenarios/Csharp/Breadcrumbs/NetworkBreadcrumbsSuccess.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using BugsnagNetworking; +using BugsnagUnity; using UnityEngine; public class NetworkBreadcrumbsSuccess : Scenario @@ -11,6 +12,7 @@ public override void PrepareConfig(string apiKey, string host) { base.PrepareConfig(apiKey, host); Configuration.RedactedKeys = new List { new Regex("redactthis") }; + Configuration.EnabledBreadcrumbTypes = new BugsnagUnity.Payload.BreadcrumbType[] { BugsnagUnity.Payload.BreadcrumbType.Request }; } public override void Run() { diff --git a/features/steps/unity_steps.rb b/features/steps/unity_steps.rb index e132bc4e8..aaf3c9ce2 100644 --- a/features/steps/unity_steps.rb +++ b/features/steps/unity_steps.rb @@ -141,6 +141,12 @@ def check_error_reporting_api(notifier_name) check_error_reporting_api notifier_name end +Then('the event "breadcrumbs.1.metaData.status" has failed') do + status = Maze::Helper.read_key_path(Maze::Server.errors.current[:body], 'events.0.breadcrumbs.1.metaData.status') + # 500 may be returned due to browser CORs + Maze.check.true(status == 0 || status == 500, "Expected an error status of 0 or 500 but got #{status}") +end + Then('the stack frame methods should match:') do |expected_values| stacktrace = Maze::Helper.read_key_path(Maze::Server.errors.current[:body], 'events.0.exceptions.0.stacktrace') expected_frame_values = expected_values.raw From 4992887dfcdc616a4172c8f5faca6469a7cfc991 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 11:16:52 +0200 Subject: [PATCH 13/18] Update bugsnag-android to v6.6.1 [full ci] (#818) Co-authored-by: Bumpsnag bot <> --- CHANGELOG.md | 7 +------ bugsnag-android | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b936cbe0..6715f0cb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ ### Dependencies - Update bugsnag-cocoa to [v6.29.0](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.29.0) [#814](https://github.com/bugsnag/bugsnag-unity/pull/814) +Update bugsnag-android to [v6.6.1](https://github.com/bugsnag/bugsnag-android/releases/tag/v6.6.1) [#818](https://github.com/bugsnag/bugsnag-unity/pull/818) ## 8.0.0 (2024-06-12) @@ -24,30 +25,24 @@ ### Enhancements - Added the `Bugsnag-Integrity` header to outgoing Bugsnag requests to avoid extraneous releases being generated if payloads are altered. [#797](https://github.com/bugsnag/bugsnag-unity/pull/797) - - Changed `Configuration.DiscardClasses` and `Configuration.RedactedKeys` to Regex types. [#807](https://github.com/bugsnag/bugsnag-unity/pull/807) - - `Event.Unhandled` is (accessed via OnError and OnSend callbacks) is now non-nullable. [#813](https://github.com/bugsnag/bugsnag-unity/pull/813) ### Bug Fixes - Added a null check to the Bugsnag client to prevent crashes when accessing the client before it has been initialised [#788](https://github.com/bugsnag/bugsnag-unity/pull/788) - - Made all callback collections within the Configuration class thread safe. [#810](https://github.com/bugsnag/bugsnag-unity/pull/810) - - Added GenerateAnonymousId to the BugsnagSettingsObject. This fixes a null object reference error on GenerateAnonymousId when using both the performance SDK and Error monitoring SDK, where the error monitoring SDK shares the confirguration with the performance monitoring SDK. [#812](https://github.com/bugsnag/bugsnag-unity/pull/812) ### Dependencies - Update bugsnag-cocoa to [v6.28.1](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.28.1) [#774](https://github.com/bugsnag/bugsnag-unity/pull/774) - - Update bugsnag-android from [v5.30.0](https://github.com/bugsnag/bugsnag-android/releases/tag/v5.30.0) to [v6.5.0](https://github.com/bugsnag/bugsnag-android/releases/tag/v6.5.0) ### Deprecations - Bugsnag Unity will no longer officially support Unity versions below Unity 2020. Older versions may work, but we will not test against them during development. - ## 7.7.6 (2024-05-17) ### Bug Fixes diff --git a/bugsnag-android b/bugsnag-android index 594600185..d1d2eeeb4 160000 --- a/bugsnag-android +++ b/bugsnag-android @@ -1 +1 @@ -Subproject commit 59460018551750dfcce4fd4e9f612eae7826559e +Subproject commit d1d2eeeb426b896c8fb4e0229651378ac8f8d302 From c92a0b57932357cec58320999f8ea23c5c0fab71 Mon Sep 17 00:00:00 2001 From: Richard Elms Date: Thu, 18 Jul 2024 13:09:28 +0200 Subject: [PATCH 14/18] enable windows builds again (#828) --- .buildkite/pipeline.yml | 19 +++ Gemfile.lock | 194 ++++++++++++--------------- build.ps1 | 268 +++++++------------------------------- src/Directory.build.props | 20 ++- 4 files changed, 167 insertions(+), 334 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index abf00f89c..5b5012273 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -35,6 +35,25 @@ steps: commands: features/scripts/do_size_test.sh + - label: Ensure notifier builds on Windows (for development) + timeout_in_minutes: 30 + agents: + queue: windows-unity-wsl + env: + UNITY_VERSION: *2021 + WSLENV: UNITY_VERSION + command: + - /mnt/c/Windows/System32/cmd.exe /c .\\scripts\\ci-build-windows-plugin.bat + plugins: + artifacts#v1.5.0: + upload: + - from: Bugsnag.unitypackage + to: Bugsnag_WindowsBuilt.unitypackage + retry: + automatic: + - exit_status: "*" + limit: 1 + # Build Android test fixtures - label: ":android: Build Android test fixture for Unity 2021" timeout_in_minutes: 30 diff --git a/Gemfile.lock b/Gemfile.lock index 20e1113fa..a6eda2cae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,124 +3,93 @@ GEM specs: CFPropertyList (3.0.6) rexml - appium_lib (12.0.1) - appium_lib_core (~> 5.0) - nokogiri (~> 1.8, >= 1.8.1) - tomlrb (>= 1.1, < 3.0) - appium_lib_core (5.4.0) - faye-websocket (~> 0.11.0) - selenium-webdriver (~> 4.2, < 4.6) + activesupport (7.1.3.4) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) atomos (0.1.3) - bugsnag (6.26.4) - concurrent-ruby (~> 1.0) - bugsnag-maze-runner (9.6.0) - appium_lib (~> 12.0.0) - appium_lib_core (~> 5.4.0) - bugsnag (~> 6.24) - cucumber (~> 7.1) - cucumber-expressions (~> 6.0.0) - curb (~> 0.9.6) - dogstatsd-ruby (~> 5.5.0) - json_schemer (~> 0.2.24) - optimist (~> 3.0.1) - os (~> 1.0.0) - rack (~> 2.2) - rake (~> 12.3.3) - rubyzip (~> 2.3.2) - selenium-webdriver (~> 4.0) - test-unit (~> 3.5.2) - webrick (~> 1.7.0) - builder (3.2.4) - childprocess (4.1.0) + base64 (0.2.0) + bigdecimal (3.1.8) claide (1.1.0) + cocoapods (1.15.2) + addressable (~> 2.8) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.15.2) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.8.0) + nap (~> 1.0) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.15.2) + activesupport (>= 5.0, < 8) + addressable (~> 2.8) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix (~> 4.0) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (2.1) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) colored2 (3.1.2) - concurrent-ruby (1.2.3) - cucumber (7.1.0) - builder (~> 3.2, >= 3.2.4) - cucumber-core (~> 10.1, >= 10.1.0) - cucumber-create-meta (~> 6.0, >= 6.0.1) - cucumber-cucumber-expressions (~> 14.0, >= 14.0.0) - cucumber-gherkin (~> 22.0, >= 22.0.0) - cucumber-html-formatter (~> 17.0, >= 17.0.0) - cucumber-messages (~> 17.1, >= 17.1.1) - cucumber-wire (~> 6.2, >= 6.2.0) - diff-lcs (~> 1.4, >= 1.4.4) - mime-types (~> 3.3, >= 3.3.1) - multi_test (~> 0.1, >= 0.1.2) - sys-uname (~> 1.2, >= 1.2.2) - cucumber-core (10.1.1) - cucumber-gherkin (~> 22.0, >= 22.0.0) - cucumber-messages (~> 17.1, >= 17.1.1) - cucumber-tag-expressions (~> 4.1, >= 4.1.0) - cucumber-create-meta (6.0.4) - cucumber-messages (~> 17.1, >= 17.1.1) - sys-uname (~> 1.2, >= 1.2.2) - cucumber-cucumber-expressions (14.0.0) - cucumber-expressions (6.0.1) - cucumber-gherkin (22.0.0) - cucumber-messages (~> 17.1, >= 17.1.1) - cucumber-html-formatter (17.0.0) - cucumber-messages (~> 17.1, >= 17.1.0) - cucumber-messages (17.1.1) - cucumber-tag-expressions (4.1.0) - cucumber-wire (6.2.1) - cucumber-core (~> 10.1, >= 10.1.0) - cucumber-cucumber-expressions (~> 14.0, >= 14.0.0) - curb (0.9.11) - diff-lcs (1.5.1) - dogstatsd-ruby (5.5.0) - ecma-re-validator (0.4.0) - regexp_parser (~> 2.2) - eventmachine (1.2.7) - faye-websocket (0.11.3) - eventmachine (>= 0.12.0) - websocket-driver (>= 0.5.1) - ffi (1.16.3) - hana (1.3.7) - json_schemer (0.2.25) - ecma-re-validator (~> 0.3) - hana (~> 1.3) - regexp_parser (~> 2.0) - simpleidn (~> 0.2) - uri_template (~> 0.7) - mime-types (3.5.2) - mime-types-data (~> 3.2015) - mime-types-data (3.2024.0305) - multi_test (0.1.2) + concurrent-ruby (1.3.3) + connection_pool (2.4.1) + drb (2.2.1) + escape (0.0.4) + ethon (0.16.0) + ffi (>= 1.15.0) + ffi (1.17.0-x64-mingw-ucrt) + ffi (1.17.0-x86_64-darwin) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + httpclient (2.8.3) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + json (2.7.2) + minitest (5.24.1) + molinillo (0.8.0) + mutex_m (0.2.0) nanaimo (0.3.0) - nokogiri (1.16.3-x86_64-darwin) - racc (~> 1.4) - optimist (3.0.1) - os (1.0.1) - power_assert (2.0.3) - racc (1.7.3) - rack (2.2.9) + nap (1.1.0) + netrc (0.11.0) + public_suffix (4.0.7) rake (12.3.3) - regexp_parser (2.9.0) rexml (3.2.6) rouge (2.0.7) - rubyzip (2.3.2) - selenium-webdriver (4.5.0) - childprocess (>= 0.5, < 5.0) - rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 3.0) - websocket (~> 1.0) - simpleidn (0.2.1) - unf (~> 0.1.4) - sys-uname (1.2.3) - ffi (~> 1.1) - test-unit (3.5.9) - power_assert - tomlrb (2.0.3) - unf (0.1.4) - unf_ext - unf_ext (0.0.9.1) - uri_template (0.7.0) - webrick (1.7.0) - websocket (1.2.10) - websocket-driver (0.7.6) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) + ruby-macho (2.5.1) + typhoeus (1.4.1) + ethon (>= 0.9.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) xcodeproj (1.23.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) @@ -132,11 +101,12 @@ GEM rouge (~> 2.0.7) PLATFORMS + x64-mingw-ucrt x86_64-darwin-19 x86_64-darwin-20 DEPENDENCIES - bugsnag-maze-runner (~> 9.0) + cocoapods rake xcodeproj xcpretty diff --git a/build.ps1 b/build.ps1 index 82529cf60..89f0c1706 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,235 +1,61 @@ -########################################################################## -# This is the Cake bootstrapper script for PowerShell. -# This file was downloaded from https://github.com/cake-build/resources -# Feel free to change this file to fit your needs. -########################################################################## - -<# - -.SYNOPSIS -This is a Powershell script to bootstrap a Cake build. - -.DESCRIPTION -This Powershell script will download NuGet if missing, restore NuGet tools (including Cake) -and execute your Cake build script with the parameters you provide. - -.PARAMETER Script -The build script to execute. -.PARAMETER Target -The build script target to run. -.PARAMETER Configuration -The build configuration to use. -.PARAMETER Verbosity -Specifies the amount of information to be displayed. -.PARAMETER ShowDescription -Shows description about tasks. -.PARAMETER DryRun -Performs a dry run. -.PARAMETER Experimental -Uses the nightly builds of the Roslyn script engine. -.PARAMETER Mono -Uses the Mono Compiler rather than the Roslyn script engine. -.PARAMETER SkipToolPackageRestore -Skips restoring of packages. -.PARAMETER ScriptArgs -Remaining arguments are added here. - -.LINK -https://cakebuild.net - -#> - -[CmdletBinding()] -Param( - [string]$Script = "build.cake", - [string]$Target, - [string]$Configuration, - [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")] - [string]$Verbosity, - [switch]$ShowDescription, - [Alias("WhatIf", "Noop")] - [switch]$DryRun, - [switch]$Experimental, - [switch]$Mono, - [switch]$SkipToolPackageRestore, - [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] - [string[]]$ScriptArgs +#!/usr/bin/env pwsh +# Parse arguments. Must be the first non commented line for reasons of powershell. +param ( + [string]$configuration = "Release", + [string]$version = "8.0.0" ) -[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null -function MD5HashFile([string] $filePath) -{ - if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf)) - { - return $null - } - - [System.IO.Stream] $file = $null; - [System.Security.Cryptography.MD5] $md5 = $null; - try - { - $md5 = [System.Security.Cryptography.MD5]::Create() - $file = [System.IO.File]::OpenRead($filePath) - return [System.BitConverter]::ToString($md5.ComputeHash($file)) - } - finally - { - if ($file -ne $null) - { - $file.Dispose() +# Define default arguments. +$CONFIGURATION = "Release" +$SOLUTION = "./BugsnagUnity.sln" +$VERSION = "8.0.0" + +# Set arguments if passed +if ($args) { + for ($i = 0; $i -lt $args.Length; $i++) { + switch ($args[$i]) { + '-c' { $CONFIGURATION = $args[$i + 1]; $i++ } + '--configuration' { $CONFIGURATION = $args[$i + 1]; $i++ } + '-v' { $VERSION = $args[$i + 1]; $i++ } + '--version' { $VERSION = $args[$i + 1]; $i++ } } } } -function GetProxyEnabledWebClient -{ - $wc = New-Object System.Net.WebClient - $proxy = [System.Net.WebRequest]::GetSystemWebProxy() - $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials - $wc.Proxy = $proxy - return $wc -} - -Write-Host "Preparing to run build script..." - -if(!$PSScriptRoot){ - $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent -} - -$TOOLS_DIR = Join-Path $PSScriptRoot "tools" -$ADDINS_DIR = Join-Path $TOOLS_DIR "Addins" -$MODULES_DIR = Join-Path $TOOLS_DIR "Modules" -$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe" -$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" -$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config" -$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum" -$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config" -$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config" - -# Make sure tools folder exists -if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) { - Write-Verbose -Message "Creating tools directory..." - New-Item -Path $TOOLS_DIR -Type directory | out-null -} - -# Make sure that packages.config exist. -if (!(Test-Path $PACKAGES_CONFIG)) { - Write-Verbose -Message "Downloading packages.config..." - try { - $wc = GetProxyEnabledWebClient - $wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch { - Throw "Could not download packages.config." - } -} - -# Try find NuGet.exe in path if not exists -if (!(Test-Path $NUGET_EXE)) { - Write-Verbose -Message "Trying to find nuget.exe in PATH..." - $existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) } - $NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1 - if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) { - Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)." - $NUGET_EXE = $NUGET_EXE_IN_PATH.FullName - } -} - -# Try download NuGet.exe if not exists -if (!(Test-Path $NUGET_EXE)) { - Write-Verbose -Message "Downloading NuGet.exe..." - try { - $wc = GetProxyEnabledWebClient - $wc.DownloadFile($NUGET_URL, $NUGET_EXE) - } catch { - Throw "Could not download NuGet.exe." - } -} - -# Save nuget.exe path to environment to be available to child processed -$ENV:NUGET_EXE = $NUGET_EXE - -# Restore tools from NuGet? -if(-Not $SkipToolPackageRestore.IsPresent) { - Push-Location - Set-Location $TOOLS_DIR - - # Check for changes in packages.config and remove installed tools if true. - [string] $md5Hash = MD5HashFile($PACKAGES_CONFIG) - if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or - ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { - Write-Verbose -Message "Missing or changed package.config hash..." - Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery | - Remove-Item -Recurse - } - - Write-Verbose -Message "Restoring tools from NuGet..." - $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" - - if ($LASTEXITCODE -ne 0) { - Throw "An error occurred while restoring NuGet tools." - } - else - { - $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII" - } - Write-Verbose -Message ($NuGetOutput | out-string) - - Pop-Location -} +# Ensure configuration is set to provided argument value +$CONFIGURATION = $configuration +$VERSION = $version -# Restore addins from NuGet -if (Test-Path $ADDINS_PACKAGES_CONFIG) { - Push-Location - Set-Location $ADDINS_DIR +# Restore NuGet packages +# NOTE it is necessary to call restore on every project, not just the solution! +# Builds will intermittently fail if this is not done every time. +Write-Output "Restoring NuGet packages..." +dotnet restore $SOLUTION +dotnet restore "src/BugsnagUnity/BugsnagUnity.csproj" +dotnet restore "src/BugsnagUnity/BugsnagUnity.Android.csproj" +dotnet restore "src/BugsnagUnity/BugsnagUnity.iOS.csproj" +dotnet restore "src/BugsnagUnity/BugsnagUnity.MacOS.csproj" +dotnet restore "src/BugsnagUnity/BugsnagUnity.Windows.csproj" - Write-Verbose -Message "Restoring addins from NuGet..." - $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`"" - - if ($LASTEXITCODE -ne 0) { - Throw "An error occurred while restoring NuGet addins." - } - - Write-Verbose -Message ($NuGetOutput | out-string) - - Pop-Location +if ($LASTEXITCODE -ne 0) { + Write-Output "An error occurred while restoring NuGet packages." + exit 1 } -# Restore modules from NuGet -if (Test-Path $MODULES_PACKAGES_CONFIG) { - Push-Location - Set-Location $MODULES_DIR - - Write-Verbose -Message "Restoring modules from NuGet..." - $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`"" - - if ($LASTEXITCODE -ne 0) { - Throw "An error occurred while restoring NuGet modules." - } - - Write-Verbose -Message ($NuGetOutput | out-string) - - Pop-Location +# Build the solution +Write-Output "Building the solution..." +dotnet build $SOLUTION -c $CONFIGURATION -p:Version=$VERSION -p:Platform="Any CPU" +if ($LASTEXITCODE -ne 0) { + Write-Output "An error occurred while building the solution." + exit 1 } -# Make sure that Cake has been installed. -if (!(Test-Path $CAKE_EXE)) { - Throw "Could not find Cake.exe at $CAKE_EXE" +# Run tests +Write-Output "Running tests..." +dotnet test $SOLUTION -c $CONFIGURATION --no-build +if ($LASTEXITCODE -ne 0) { + Write-Output "An error occurred while running tests." + exit 1 } - - -# Build Cake arguments -$cakeArguments = @("$Script"); -if ($Target) { $cakeArguments += "-target=$Target" } -if ($Configuration) { $cakeArguments += "-configuration=$Configuration" } -if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" } -if ($ShowDescription) { $cakeArguments += "-showdescription" } -if ($DryRun) { $cakeArguments += "-dryrun" } -if ($Experimental) { $cakeArguments += "-experimental" } -if ($Mono) { $cakeArguments += "-mono" } -$cakeArguments += $ScriptArgs - -# Start Cake -Write-Host "Running build script..." -&$CAKE_EXE $cakeArguments -exit $LASTEXITCODE +Write-Output "Build and tests completed successfully." diff --git a/src/Directory.build.props b/src/Directory.build.props index c4391e71a..d7da6dba5 100644 --- a/src/Directory.build.props +++ b/src/Directory.build.props @@ -4,7 +4,14 @@ 8.0 1.0.0 - + + + + true + true + + + /Applications/Unity/Hub/Editor/$(UNITY_VERSION)/Unity.app/Contents/Managed/UnityEngine.dll false @@ -14,4 +21,15 @@ false + + + + C:\Program Files\Unity\Hub\Editor\$(UNITY_VERSION)\Editor\Data\Managed\UnityEngine.dll + false + + + C:\Program Files\Unity\Hub\Editor\$(UNITY_VERSION)\Editor\Data\Managed\UnityEditor.dll + false + + From a2e683ba76d50bf9775c31853e94e08e561f2ae4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 09:50:56 +0200 Subject: [PATCH 15/18] Update bugsnag-android to v6.7.0 [full ci] (#833) Co-authored-by: Bumpsnag bot <> --- CHANGELOG.md | 5 +---- bugsnag-android | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d389304b..941d3285a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,8 @@ ### Enhancements - Added the BugsnagUnity version to the configuration window. [#819](https://github.com/bugsnag/bugsnag-unity/pull/819) - - Added automatic and manual network request breadcrumbs. [#817](https://github.com/bugsnag/bugsnag-unity/pull/817) - - Remove unnecessary ToArray() call when constructing an error. [#822](https://github.com/bugsnag/bugsnag-unity/pull/822) - - Updated BugSnag UI branding. [#701](https://github.com/bugsnag/bugsnag-unity/pull/701) ### Bug Fixes @@ -20,7 +17,7 @@ - Update bugsnag-cocoa to [v6.29.0](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.29.0) [#814](https://github.com/bugsnag/bugsnag-unity/pull/814) Update bugsnag-android to [v6.6.1](https://github.com/bugsnag/bugsnag-android/releases/tag/v6.6.1) [#818](https://github.com/bugsnag/bugsnag-unity/pull/818) - +Update bugsnag-android to [v6.7.0](https://github.com/bugsnag/bugsnag-android/releases/tag/v6.7.0) [#833](https://github.com/bugsnag/bugsnag-unity/pull/833) ## 8.0.0 (2024-06-12) diff --git a/bugsnag-android b/bugsnag-android index d1d2eeeb4..874d9e385 160000 --- a/bugsnag-android +++ b/bugsnag-android @@ -1 +1 @@ -Subproject commit d1d2eeeb426b896c8fb4e0229651378ac8f8d302 +Subproject commit 874d9e385787c5a13c0a0c0d007ffeb1639a9f21 From 3d7e4aa778fdd0b163d8dd14a2416f67b42cdbd4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 10:48:19 +0200 Subject: [PATCH 16/18] Update bugsnag-cocoa to v6.30.1 [full ci] (#832) Co-authored-by: Bumpsnag bot <> Co-authored-by: Richard Elms --- CHANGELOG.md | 4 ++-- bugsnag-cocoa | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 941d3285a..9843e571d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,8 @@ ### Dependencies - Update bugsnag-cocoa to [v6.29.0](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.29.0) [#814](https://github.com/bugsnag/bugsnag-unity/pull/814) -Update bugsnag-android to [v6.6.1](https://github.com/bugsnag/bugsnag-android/releases/tag/v6.6.1) [#818](https://github.com/bugsnag/bugsnag-unity/pull/818) -Update bugsnag-android to [v6.7.0](https://github.com/bugsnag/bugsnag-android/releases/tag/v6.7.0) [#833](https://github.com/bugsnag/bugsnag-unity/pull/833) +- Update bugsnag-cocoa to [v6.30.1](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.30.1) [#832](https://github.com/bugsnag/bugsnag-unity/pull/832) + ## 8.0.0 (2024-06-12) diff --git a/bugsnag-cocoa b/bugsnag-cocoa index cd3a27c2d..b29cdabec 160000 --- a/bugsnag-cocoa +++ b/bugsnag-cocoa @@ -1 +1 @@ -Subproject commit cd3a27c2d7ad344c102bd7ec168c0584939ab7b1 +Subproject commit b29cdabec2f0d396a6a80ca1cfe7ee0bfdf04992 From 72273ccfec99e20b8d6c5af4f23f56a746eb2297 Mon Sep 17 00:00:00 2001 From: Richard Elms Date: Mon, 12 Aug 2024 11:58:53 +0200 Subject: [PATCH 17/18] Release v8.1.0 --- CHANGELOG.md | 3 +++ build.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9843e571d..4d254cd50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## TBD + +## 8.1.0 (2024-08-12) + ### Enhancements - Added the BugsnagUnity version to the configuration window. [#819](https://github.com/bugsnag/bugsnag-unity/pull/819) diff --git a/build.sh b/build.sh index 9b618e661..4f2940e66 100755 --- a/build.sh +++ b/build.sh @@ -3,7 +3,7 @@ # Define default arguments. CONFIGURATION="Release" SOLUTION="./BugsnagUnity.sln" -VERSION="8.0.0" +VERSION="8.1.0" # Parse arguments. for i in "$@"; do From f264f86a16dcd36c55e4b0c3ed36e739074409df Mon Sep 17 00:00:00 2001 From: Richard Elms Date: Mon, 12 Aug 2024 12:01:22 +0200 Subject: [PATCH 18/18] Update CHANGELOG.md --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d254cd50..c544a4383 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,5 @@ # Changelog -## TBD - - ## 8.1.0 (2024-08-12) ### Enhancements