Skip to content

Commit

Permalink
Merge branch 'next' into PLAT-11914-InternalClientNullRefFix
Browse files Browse the repository at this point in the history
  • Loading branch information
clr182 authored May 3, 2024
2 parents 9713136 + 1ce7100 commit 07fc159
Show file tree
Hide file tree
Showing 20 changed files with 373 additions and 541 deletions.
690 changes: 228 additions & 462 deletions .buildkite/pipeline.full.yml

Large diffs are not rendered by default.

82 changes: 41 additions & 41 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
aliases:
- &2018 "2018.4.36f1"
- &2020 "2020.3.48f1"
- &2021 "2021.3.36f1"

agents:
queue: macos-14

steps:
#
# Build notifier. We run tests for all Unity versions with the 2018 artifacts, as that is what we ship.
# Build notifier. We run tests for all Unity versions with the 2020 artifacts, as that is what we ship.
#
- label: Build released notifier artifact
timeout_in_minutes: 30
key: "build-artifacts"
env:
UNITY_VERSION: *2018
UNITY_VERSION: *2021
commands:
- bundle install
- bundle exec rake plugin:export
Expand All @@ -29,7 +28,7 @@ steps:
# agents:
# queue: windows-unity-wsl
# env:
# UNITY_VERSION: "2018.4.36f1"
# UNITY_VERSION: *2020
# WSLENV: UNITY_VERSION
# command:
# - /mnt/c/Windows/System32/cmd.exe /c .\\scripts\\ci-build-windows-plugin.bat
Expand All @@ -47,7 +46,7 @@ steps:
timeout_in_minutes: 10
depends_on: build-artifacts
env:
UNITY_VERSION: *2020
UNITY_VERSION: *2021
plugins:
'artifacts#v1.9.0':
download:
Expand All @@ -56,18 +55,18 @@ steps:
features/scripts/do_size_test.sh

# Build Android test fixtures
- label: ":android: Build Android test fixture for Unity 2020"
- label: ":android: Build Android test fixture for Unity 2021"
timeout_in_minutes: 30
key: "build-android-fixture-2020"
key: "build-android-fixture-2021"
depends_on: "build-artifacts"
env:
UNITY_VERSION: *2020
UNITY_VERSION: *2021
plugins:
artifacts#v1.5.0:
artifacts#v1.9.0:
download:
- Bugsnag.unitypackage
upload:
- features/fixtures/maze_runner/mazerunner_2020.3.48f1.apk
- features/fixtures/maze_runner/mazerunner_2021.apk
- features/fixtures/build_android_apk.log
commands:
- bundle install
Expand All @@ -77,18 +76,18 @@ steps:
- exit_status: "*"
limit: 1

# - label: ':android: Build Android EDM test fixture for Unity 2020'
# - label: ':android: Build Android EDM test fixture for Unity 2021'
# timeout_in_minutes: 30
# key: 'build-edm-fixture-2020'
# key: 'build-edm-fixture-2021'
# depends_on: 'build-artifacts'
# env:
# UNITY_VERSION: "2020.3.48f1"
# UNITY_VERSION: *2021
# plugins:
# artifacts#v1.5.0:
# download:
# - Bugsnag.unitypackage
# upload:
# - features/fixtures/EDM_Fixture/edm_2020.3.48f1.apk
# - features/fixtures/EDM_Fixture/edm_2021.3.36f1.apk
# - features/scripts/buildEdmFixture.log
# - features/scripts/edmImport.log
# - features/scripts/enableEdm.log
Expand All @@ -102,17 +101,17 @@ steps:
#
# Run Android tests
#
- label: ":bitbar: :android: Run Android e2e tests for Unity 2020"
- label: ":bitbar: :android: Run Android e2e tests for Unity 2021"
timeout_in_minutes: 60
depends_on: "build-android-fixture-2020"
depends_on: "build-android-fixture-2021"
agents:
queue: opensource
env:
UNITY_VERSION: *2020
UNITY_VERSION: *2021
plugins:
artifacts#v1.5.0:
download:
- "features/fixtures/maze_runner/mazerunner_2020.3.48f1.apk"
- "features/fixtures/maze_runner/mazerunner_2021.apk"
upload:
- "maze_output/**/*"
- "maze_output/metrics.csv"
Expand All @@ -123,7 +122,7 @@ steps:
command:
- "features/csharp"
- "features/android"
- "--app=features/fixtures/maze_runner/mazerunner_2020.3.48f1.apk"
- "--app=features/fixtures/maze_runner/mazerunner_2021.apk"
- "--farm=bb"
- "--appium-version=1.22"
- "--device=ANDROID_10|ANDROID_11|ANDROID_12|ANDROID_13"
Expand All @@ -136,24 +135,24 @@ steps:

# Run Android EDM tests

# - label: ':android: Run Android EDM e2e tests for Unity 2020'
# - label: ':android: Run Android EDM e2e tests for Unity 2021'
# timeout_in_minutes: 30
# depends_on: 'build-edm-fixture-2020'
# depends_on: 'build-edm-fixture-2021'
# agents:
# queue: opensource
# env:
# UNITY_VERSION: "2020.3.48f1"
# UNITY_VERSION: "2021.3.36f1"
# plugins:
# artifacts#v1.5.0:
# download:
# - "features/fixtures/EDM_Fixture/edm_2020.3.48f1.apk"
# - "features/fixtures/EDM_Fixture/edm_2021.3.36f1.apk"
# upload:
# - "maze_output/**/*"
# docker-compose#v3.7.0:
# pull: maze-runner
# run: maze-runner
# command:
# - "--app=/app/features/fixtures/EDM_Fixture/edm_2020.3.48f1.apk"
# - "--app=/app/features/fixtures/EDM_Fixture/edm_2021.3.36f1.apk"
# - "--farm=bs"
# - "--device=ANDROID_11_0"
# - "features/edm"
Expand All @@ -164,45 +163,46 @@ steps:
#
# Build iOS test fixtures
#
- label: ":ios: Generate Xcode project - Unity 2020"
- label: ":ios: Generate Xcode project - Unity 2021"
timeout_in_minutes: 30
key: "generate-fixture-project-2020"
key: "generate-fixture-project-2021"
depends_on: "build-artifacts"
env:
UNITY_VERSION: *2020
UNITY_VERSION: *2021
plugins:
artifacts#v1.5.0:
download:
- Bugsnag.unitypackage
upload:
- features/fixtures/unity.log
- project_2020.tgz
- project_2021.tgz
commands:
- bundle install
- rake test:ios:generate_xcode
- tar -zvcf project_2020.tgz features/fixtures/maze_runner/mazerunner_xcode
- tar -zvcf project_2021.tgz features/fixtures/maze_runner/mazerunner_xcode
retry:
automatic:
- exit_status: "*"
limit: 1

- label: ":ios: Build iOS test fixture for Unity 2020"
- label: ":ios: Build iOS test fixture for Unity 2021"
timeout_in_minutes: 30
key: "build-ios-fixture-2020"
depends_on: "generate-fixture-project-2020"
key: "build-ios-fixture-2021"
depends_on: "generate-fixture-project-2021"
env:
UNITY_VERSION: *2020
UNITY_VERSION: *2021
XCODE_VERSION: "15.3.0"
plugins:
artifacts#v1.5.0:
download:
- Bugsnag.unitypackage
- project_2020.tgz
- project_2021.tgz
upload:
- features/fixtures/maze_runner/mazerunner_2020.3.48f1.ipa
- features/fixtures/maze_runner/mazerunner_2021.ipa
- features/fixtures/unity.log
commands:
- bundle install
- tar -zxf project_2020.tgz features/fixtures/maze_runner
- tar -zxf project_2021.tgz features/fixtures/maze_runner
- rake test:ios:build_xcode
retry:
automatic:
Expand All @@ -212,15 +212,15 @@ steps:
#
# Run iOS tests
#
- label: ":bitbar: :ios: Run iOS e2e tests for Unity 2020"
- label: ":bitbar: :ios: Run iOS e2e tests for Unity 2021"
timeout_in_minutes: 60
depends_on: "build-ios-fixture-2020"
depends_on: "build-ios-fixture-2021"
agents:
queue: opensource
plugins:
artifacts#v1.5.0:
download:
- "features/fixtures/maze_runner/mazerunner_2020.3.48f1.ipa"
- "features/fixtures/maze_runner/mazerunner_2021.ipa"
upload:
- "maze_output/**/*"
- "maze_output/metrics.csv"
Expand All @@ -232,7 +232,7 @@ steps:
command:
- "features/csharp"
- "features/ios"
- "--app=features/fixtures/maze_runner/mazerunner_2020.3.48f1.ipa"
- "--app=features/fixtures/maze_runner/mazerunner_2021.ipa"
- "--farm=bb"
- "--appium-version=1.22"
- "--device=IOS_13|IOS_14|IOS_15"
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@

- Added more null reference checking 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)

## 7.7.5 (2024-05-02)

### Bug Fixes

- Fixed issue where changes to device.TotalMemory and device.ModelNumber in cocoa on send callbacks were not respected. [#793](https://github.com/bugsnag/bugsnag-unity/pull/793)

## 7.7.4 (2024-04-19)

### Bug Fixes

- Fixed issue where iOS C# events reported the incorrect value for device.osName. [#791](https://github.com/bugsnag/bugsnag-unity/pull/791)


## 7.7.3 (2024-04-11)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var target = Argument("target", "Default");
var solution = File("./BugsnagUnity.sln");
var configuration = Argument("configuration", "Release");
var project = File("./src/BugsnagUnity/BugsnagUnity.csproj");
var version = "7.7.3";
var version = "7.7.5";

Task("Restore-NuGet-Packages")
.Does(() => NuGetRestore(solution));
Expand Down
3 changes: 2 additions & 1 deletion example/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
m_EditorVersion: 2018.4.34f1
m_EditorVersion: 2020.3.48f1
m_EditorVersionWithRevision: 2020.3.48f1 (b805b124c6b7)
21 changes: 20 additions & 1 deletion features/csharp/csharp_metadata.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,23 @@ Feature: Metadata
And the event "metaData.numberArray.testKey.1" equals 2
And the event "metaData.stringArray.testKey.1" equals "2"
And the event "metaData.dictionary.foo" equals "bar"
And the event "metaData.number.testKey" equals 123
And the event "metaData.number.testKey" equals 123

# these platform specific tests are smoke tests, if os name is wrong then it's a sign that the native information has not been properly retrieved from the native layer and the unity placeholder data is being used
@ios_only
Scenario: iOS specific metadata
When I run the game in the "NotifySmokeTest" state
And I wait to receive an error
Then the error is valid for the error reporting API sent by the Unity notifier
And expected device metadata is included in the event
And expected app metadata is included in the event
And the event "device.osName" equals "iOS"

@android_only
Scenario: Android specific metadata
When I run the game in the "NotifySmokeTest" state
And I wait to receive an error
Then the error is valid for the error reporting API sent by the Unity notifier
And expected device metadata is included in the event
And expected app metadata is included in the event
And the event "device.osName" equals "android"
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public override void PrepareConfig(string apiKey, string host)
device.Jailbroken = true;
device.Orientation = "Custom Orientation";
device.Time = new DateTimeOffset(1985, 08, 21, 01, 01, 01, TimeSpan.Zero);

device.TotalMemory = 999;
device.ModelNumber = "Custom ModelNumber";

// breadcrumbs
foreach (var crumb in @event.Breadcrumbs)
{
Expand Down
4 changes: 4 additions & 0 deletions features/ios/ios_callbacks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Feature: Callbacks
And the event "device.osVersion" equals "Custom OsVersion"
And the event "device.runtimeVersions.scoop" equals "dewoop"
And the event "device.orientation" equals "Custom Orientation"
And the event "device.modelNumber" equals "Custom ModelNumber"
And the event "device.totalMemory" equals 999



# Breadcrumbs
And the event "breadcrumbs.0.name" equals "Custom Message"
Expand Down
2 changes: 1 addition & 1 deletion features/scripts/build_android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ $UNITY_PATH/Unity $DEFAULT_CLI_ARGS -projectPath $project_path -executeMethod Bu
RESULT=$?
if [ $RESULT -ne 0 ]; then exit $RESULT; fi

mv $project_path/mazerunner.apk $project_path/mazerunner_$UNITY_VERSION.apk
mv $project_path/mazerunner.apk $project_path/mazerunner_${UNITY_VERSION:0:4}.apk
2 changes: 1 addition & 1 deletion features/scripts/build_edm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ $UNITY_PATH/Unity $DEFAULT_CLI_ARGS -buildTarget Android -logFile $script_path/b
RESULT=$?
if [ $RESULT -ne 0 ]; then exit $RESULT; fi

mv $project_path/edm.apk $project_path/edm_$UNITY_VERSION.apk
mv $project_path/edm.apk $project_path/edm_${UNITY_VERSION:0:4}.apk
2 changes: 1 addition & 1 deletion features/scripts/build_ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,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.ipa \;
find $project_path/output/ -name "*.ipa" -exec mv '{}' $project_path/mazerunner_${UNITY_VERSION:0:4}.ipa \;
8 changes: 8 additions & 0 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
end


Before('@ios_only') do |_scenario|
skip_this_scenario('Skipping scenario') unless Maze::Helper.get_current_platform == 'ios'
end

Before('@cocoa_only') do |_scenario|
skip_this_scenario('Skipping scenario') unless Maze.config.os == 'macos' || Maze::Helper.get_current_platform == 'ios'
end
Expand All @@ -53,6 +57,10 @@
skip_this_scenario("Skipping scenario") if Maze::Helper.get_current_platform == 'android'
end

Before('@android_only') do |_scenario|
skip_this_scenario('Skipping scenario') unless Maze::Helper.get_current_platform == 'android'
end


BeforeAll do
$api_key = 'a35a2a72bd230ac0aa0f52715bbdc6aa'
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci-build-macos-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
./features/scripts/build_maze_runner.sh webgl

pushd features/fixtures/maze_runner/build
zip -r MacOS-$UNITY_VERSION.zip MacOS
zip -r WebGL-$UNITY_VERSION.zip WebGL
zip -r MacOS-${UNITY_VERSION:0:4}.zip MacOS
zip -r WebGL-${UNITY_VERSION:0:4}.zip WebGL
popd
2 changes: 1 addition & 1 deletion scripts/ci-build-windows-fixture-wsl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
cd features/scripts
./build_maze_runner.sh wsl
cd ../fixtures/maze_runner/build
zip -r Windows-$UNITY_VERSION.zip Windows
zip -r Windows-${UNITY_VERSION:0:4}.zip Windows
2 changes: 1 addition & 1 deletion scripts/ci-run-macos-tests-csharp.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e
pushd features/fixtures/maze_runner/build
unzip MacOS-$UNITY_VERSION.zip
unzip MacOS-${UNITY_VERSION:0:4}.zip
popd

bundle install
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci-run-macos-tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e
pushd features/fixtures/maze_runner/build
unzip MacOS-$UNITY_VERSION.zip
unzip MacOS-${UNITY_VERSION:0:4}.zip
popd

bundle install
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci-run-webgl-tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -e

pushd features/fixtures/maze_runner/build
unzip WebGL-$UNITY_VERSION.zip
unzip WebGL-${UNITY_VERSION:0:4}.zip
popd

bundle install
Expand Down
Loading

0 comments on commit 07fc159

Please sign in to comment.