From d2febb4c5d209a36608ad9b886b0098eeeecb5e1 Mon Sep 17 00:00:00 2001 From: James Lindsay Date: Mon, 22 Jul 2024 13:43:23 +0100 Subject: [PATCH 01/21] Compile on linux --- Gemfile | 4 +- Gemfile.lock | 112 ++++++++++++++++++ Rakefile | 3 + ...tory.build.props => Directory.Build.props} | 16 ++- 4 files changed, 131 insertions(+), 4 deletions(-) rename src/{Directory.build.props => Directory.Build.props} (64%) diff --git a/Gemfile b/Gemfile index ef58191c0..d543ef0d9 100644 --- a/Gemfile +++ b/Gemfile @@ -8,10 +8,10 @@ gem 'rake' unless Gem.win_platform? # Use official Maze Runner release - gem 'bugsnag-maze-runner', '~>9.0' + gem 'bugsnag-maze-runner', '~>9.11.2' # Use a specific Maze Runner branch - # gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', branch: 'master' + # gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', branch: 'main' # Use a local copy of Maze Runner for development purposes #gem 'bugsnag-maze-runner', path: '../maze-runner' diff --git a/Gemfile.lock b/Gemfile.lock index a6eda2cae..9d8d2fa9e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,9 +18,37 @@ GEM algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) + 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) atomos (0.1.3) base64 (0.2.0) bigdecimal (3.1.8) + bugsnag (6.27.1) + concurrent-ruby (~> 1.0) + bugsnag-maze-runner (9.11.2) + appium_lib (~> 12.0.0) + appium_lib_core (~> 5.4.0) + bugsnag (~> 6.24) + cucumber (~> 7.1) + cucumber-expressions (~> 6.0.0) + curb (~> 1.0.5) + 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.3.0) + childprocess (4.1.0) claide (1.1.0) cocoapods (1.15.2) addressable (~> 2.8) @@ -62,34 +90,116 @@ GEM colored2 (3.1.2) concurrent-ruby (1.3.3) connection_pool (2.4.1) + 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 (1.0.5) + diff-lcs (1.5.1) + dogstatsd-ruby (5.5.0) drb (2.2.1) + ecma-re-validator (0.4.0) + regexp_parser (~> 2.2) escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) + eventmachine (1.2.7) + faye-websocket (0.11.3) + eventmachine (>= 0.12.0) + websocket-driver (>= 0.5.1) ffi (1.17.0-x64-mingw-ucrt) ffi (1.17.0-x86_64-darwin) + ffi (1.17.0-x86_64-linux-gnu) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) + hana (1.3.7) httpclient (2.8.3) i18n (1.14.5) concurrent-ruby (~> 1.0) json (2.7.2) + 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.0702) minitest (5.24.1) molinillo (0.8.0) + multi_test (0.1.2) mutex_m (0.2.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) + nokogiri (1.16.6-x64-mingw-ucrt) + racc (~> 1.4) + nokogiri (1.16.6-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.6-x86_64-linux) + racc (~> 1.4) + optimist (3.0.1) + os (1.0.1) + power_assert (2.0.3) public_suffix (4.0.7) + racc (1.8.0) + rack (2.2.9) rake (12.3.3) + regexp_parser (2.9.2) rexml (3.2.6) rouge (2.0.7) ruby-macho (2.5.1) + 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.3) + sys-uname (1.3.0) + ffi (~> 1.1) + test-unit (3.5.9) + power_assert + tomlrb (2.0.3) typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + uri_template (0.7.0) + webrick (1.7.0) + websocket (1.2.11) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) xcodeproj (1.23.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) @@ -104,8 +214,10 @@ PLATFORMS x64-mingw-ucrt x86_64-darwin-19 x86_64-darwin-20 + x86_64-linux DEPENDENCIES + bugsnag-maze-runner (~> 9.11.2) cocoapods rake xcodeproj diff --git a/Rakefile b/Rakefile index 456c7a2fb..b73b7fb4b 100644 --- a/Rakefile +++ b/Rakefile @@ -12,6 +12,7 @@ end HOST_OS = RbConfig::CONFIG['host_os'] def is_mac?; HOST_OS =~ /darwin/i; end def is_windows?; HOST_OS =~ /mingw|mswin|windows/i; end +def is_linux?; HOST_OS.strip =~ /linux/i; end ## # @@ -26,6 +27,8 @@ def unity_directory "/Applications/Unity/Hub/Editor/#{ENV['UNITY_VERSION']}" elsif is_windows? "C:\\Program Files\\Unity\\Hub\\Editor\\#{ENV['UNITY_VERSION']}" + elsif is_linux? + "#{ENV['HOME']}/Unity/Hub/Editor/#{ENV['UNITY_VERSION']}" end else raise 'No unity version set - use $UNITY_VERSION' diff --git a/src/Directory.build.props b/src/Directory.Build.props similarity index 64% rename from src/Directory.build.props rename to src/Directory.Build.props index d7da6dba5..08d68adf0 100644 --- a/src/Directory.build.props +++ b/src/Directory.Build.props @@ -7,8 +7,9 @@ - true - true + true + true + true @@ -32,4 +33,15 @@ false + + + + $(HOME)/Unity/Hub/Editor/$(UNITY_VERSION)/Editor/Data/Managed/UnityEngine.dll + false + + + $(HOME)/Unity/Hub/Editor/$(UNITY_VERSION)/Editor/Data/Managed/UnityEditor.dll + false + + From 6963ed55b9d740607e2d3662a7e36636cf052bc4 Mon Sep 17 00:00:00 2001 From: JamesLindsay0 Date: Mon, 22 Jul 2024 13:55:55 +0100 Subject: [PATCH 02/21] Update CONTRIBUTING.md with ubuntu instructions --- CONTRIBUTING.md | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36fe23181..cfe9eeae0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,11 +9,13 @@ ## Set up a development environment -- Clone the repo including submodules +Clone the repo including submodules - ``` - git clone --recursive git@github.com:bugsnag/bugsnag-unity - ``` +``` +git clone --recursive git@github.com:bugsnag/bugsnag-unity +``` + +### OSX - Install Unity - Set up your Xcode (requires being a member of the Apple Developer Program) @@ -21,6 +23,30 @@ - Open the example app in Unity - You can build the app for iPhone or Android using the custom Build menu. +### Ubuntu 22.04 + +- Set up unity + - Download unity hub with the custom repository using https://docs.unity3d.com/hub/manual/InstallHub.html. Note that Ubuntu 24.04 doesn't work currently. + - Install a unity version. + - Set the `UNITY_VERSION` environment variables based on the unity version; for example: + ``` + export UNITY_VERSION=2021.3.40f1 + ``` + - Install the required libssl version with https://stackoverflow.com/a/72137153 +- Install dotnet with sudo apt install dotnet-sdk-8.0. The snap release doesn't work. +- Install Ruby 3.3.4 and bundler via https://stackoverflow.com/a/37956249. The snap release doesn't work. +- Setup android + - `sudo apt-get install openjdk-11-jdk` + - `sudo snap install android-studio --classic` + - Use Andoroid Studio open any project, click the hamburger menu -> Tools -> SDK -> SDK Tools. Then select and download NDK (side by side) and Android SDK Command-line Tools. + - Set `ANDROID_SDK_ROOT` to the path from Andoroid Studio's hamburger menu -> Tools -> SDK -> Path. For example: + ``` + export ANDROID_SDK_ROOT=/home/username/Android/Sdk + ``` +- `bundle install` +- `bundle exec rake plugin:export` + + ## Installing and using multiple versions of Unity You can install as many versions of Unity as you like on the same computer. On a Mac the installer creates a folder From 8da43317b6ed4a9956aa3d8f16c0ed844d14848d Mon Sep 17 00:00:00 2001 From: James Lindsay Date: Tue, 23 Jul 2024 10:28:41 +0100 Subject: [PATCH 03/21] Add custom linux data --- BugsnagUnity.sln | 6 + CONTRIBUTING.md | 5 + Rakefile | 9 + UPGRADING.md | 1 + build.ps1 | 1 + build.sh | 1 + src/BugsnagUnity/BugsnagUnity.Linux.csproj | 8 + src/BugsnagUnity/Native/Linux/NativeClient.cs | 229 ++++++++++++++++++ .../Bugsnag/Plugins/BugsnagUnity.dll.meta | 16 +- .../Assets/Bugsnag/Plugins/Linux.meta | 8 + .../Plugins/Linux/BugsnagUnity.Linux.dll.meta | 69 ++++++ 11 files changed, 345 insertions(+), 8 deletions(-) create mode 100644 src/BugsnagUnity/BugsnagUnity.Linux.csproj create mode 100644 src/BugsnagUnity/Native/Linux/NativeClient.cs create mode 100644 unity/PackageProject/Assets/Bugsnag/Plugins/Linux.meta create mode 100644 unity/PackageProject/Assets/Bugsnag/Plugins/Linux/BugsnagUnity.Linux.dll.meta diff --git a/BugsnagUnity.sln b/BugsnagUnity.sln index a94adf20e..1a378f5e5 100644 --- a/BugsnagUnity.sln +++ b/BugsnagUnity.sln @@ -22,6 +22,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BugsnagUnity.MacOS", "src\B EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BugsnagUnity.Windows", "src\BugsnagUnity\BugsnagUnity.Windows.csproj", "{B8C265A4-657B-4378-8726-0BEC774108D1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BugsnagUnity.Linux", "src\BugsnagUnity\BugsnagUnity.Linux.csproj", "{B8C265A4-657B-4378-8726-0BEC774108D2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -56,6 +58,10 @@ Global {B8C265A4-657B-4378-8726-0BEC774108D1}.Debug|Any CPU.Build.0 = Debug|Any CPU {B8C265A4-657B-4378-8726-0BEC774108D1}.Release|Any CPU.ActiveCfg = Release|Any CPU {B8C265A4-657B-4378-8726-0BEC774108D1}.Release|Any CPU.Build.0 = Release|Any CPU + {B8C265A4-657B-4378-8726-0BEC774108D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8C265A4-657B-4378-8726-0BEC774108D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8C265A4-657B-4378-8726-0BEC774108D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8C265A4-657B-4378-8726-0BEC774108D2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36fe23181..70f3af94d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,6 +72,11 @@ The plugin can be built with a cache using `rake plugin:quick_export`. bundle exec rake plugin:rebuild ``` +To compile and export without the Android and iOS plugins (which is much faster), use: +``` +bundle exec rake plugin:export_minimal +`` + List available tasks using `rake -T`. ## Building Example diff --git a/Rakefile b/Rakefile index b73b7fb4b..61bea8f90 100644 --- a/Rakefile +++ b/Rakefile @@ -269,6 +269,7 @@ namespace :plugin do task all: [:assets, :cocoa, :android, :csharp, ] task all_android64: [:assets, :cocoa, :android_64bit, :csharp ] end + task minimal: [:assets, :csharp] desc "Delete all build artifacts" @@ -440,6 +441,9 @@ namespace :plugin 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 + linux_dir = File.join(assets_path, "Linux") + FileUtils.mkpath linux_dir + FileUtils.cp File.realpath("BugsnagUnity.Linux.dll"), linux_dir FileUtils.cp File.realpath("BugsnagUnity.iOS.dll"), File.join(assets_path, "tvOS") FileUtils.cp File.realpath("BugsnagUnity.iOS.dll"), File.join(assets_path, "iOS") FileUtils.cp File.realpath("BugsnagUnity.MacOS.dll"), File.join(assets_path, "OSX") @@ -462,6 +466,11 @@ namespace :plugin do export_package("Bugsnag.unitypackage") end + task export_minimal: ["plugin:build:minimal"] do + Rake::Task["plugin:build:minimal"].invoke + export_package("Bugsnag.unitypackage") + end + desc "Generate release artifacts from cache (using Android 64-bit)" task :quick_export do Rake::Task["plugin:build:all_android64"].invoke diff --git a/UPGRADING.md b/UPGRADING.md index 9430c9daa..09bf4769a 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -65,6 +65,7 @@ If you wish to do it manually, please remove the following directories and files - File: `Assets/Plugins/OSX/BugsnagUnity.MacOS.dll` - File: `Assets/Plugins/tvOS/BugsnagUnity.iOS.dll` - File: `Assets/Plugins/Windows/BugsnagUnity.Windows.dll` +- File: `Assets/Plugins/Windows/BugsnagUnity.Linux.dll` - Directory: `Assets/Plugins/iOS/Bugsnag` - Directory: `Assets/Plugins/OSX/Bugsnag` - Directory: `Assets/Plugins/tvOS/Bugsnag` diff --git a/build.ps1 b/build.ps1 index 89f0c1706..815eff94d 100644 --- a/build.ps1 +++ b/build.ps1 @@ -36,6 +36,7 @@ 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" +dotnet restore "src/BugsnagUnity/BugsnagUnity.Linux.csproj" if ($LASTEXITCODE -ne 0) { Write-Output "An error occurred while restoring NuGet packages." diff --git a/build.sh b/build.sh index 9b618e661..a02e7d774 100755 --- a/build.sh +++ b/build.sh @@ -25,6 +25,7 @@ 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 +dotnet restore src/BugsnagUnity/BugsnagUnity.Linux.csproj if [ $? -ne 0 ]; then echo "An error occurred while restoring NuGet packages." diff --git a/src/BugsnagUnity/BugsnagUnity.Linux.csproj b/src/BugsnagUnity/BugsnagUnity.Linux.csproj new file mode 100644 index 000000000..e148e7851 --- /dev/null +++ b/src/BugsnagUnity/BugsnagUnity.Linux.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/BugsnagUnity/Native/Linux/NativeClient.cs b/src/BugsnagUnity/Native/Linux/NativeClient.cs new file mode 100644 index 000000000..a6518c675 --- /dev/null +++ b/src/BugsnagUnity/Native/Linux/NativeClient.cs @@ -0,0 +1,229 @@ +using System; +using System.IO; +using System.Linq; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using BugsnagUnity.Payload; +using UnityEngine; +using System.Collections.Specialized; + +namespace BugsnagUnity +{ + class NativeClient : INativeClient + { + public Configuration Configuration { get; } + + public IBreadcrumbs Breadcrumbs { get; } + + private bool _launchMarkedAsCompleted = false; + + private bool _hasReceivedLowMemoryWarning = false; + + private Metadata _metadata = new Metadata(); + private OrderedDictionary _featureFlags = new OrderedDictionary(); + + public NativeClient(Configuration configuration) + { + Configuration = configuration; + Breadcrumbs = new Breadcrumbs(configuration); + Application.lowMemory += () => { _hasReceivedLowMemoryWarning = true; }; + if (configuration.FeatureFlags != null) + { + _featureFlags = configuration.FeatureFlags; + } + } + + public void PopulateApp(App app) + { + } + + public void PopulateAppWithState(AppWithState app) + { + AddIsLaunching(app); + app.Add("lowMemory", _hasReceivedLowMemoryWarning); + } + + private void AddIsLaunching(AppWithState app) + { + bool isLaunching; + if (Configuration.LaunchDurationMillis == 0) + { + isLaunching = !_launchMarkedAsCompleted; + } + else + { + isLaunching = app.Duration?.TotalMilliseconds < Configuration.LaunchDurationMillis; + } + app.IsLaunching = isLaunching; + } + + public void PopulateDevice(Device device) + { + device.Manufacturer = "Linux"; + device.Model = SystemInfo.deviceModel; + } + + // Struct based on https://man7.org/linux/man-pages/man3/statvfs.3.html + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] + private class StatvfsBuffer + { + + public ulong f_bsize; + public ulong f_frsize; + public long f_blocks; + public long f_bfree; + public long f_bavailable; + } + + [return: MarshalAs(UnmanagedType.SysInt)] + [DllImport("libc", CharSet = CharSet.Auto, SetLastError = true)] + static extern int statvfs(string path, [In, Out] StatvfsBuffer lpBuffer); + + public void PopulateDeviceWithState(DeviceWithState device) + { + PopulateDevice(device); + if (Application.platform != RuntimePlatform.LinuxPlayer) + { + return; + } + + // See https://man7.org/linux/man-pages/man5/proc_meminfo.5.html + StreamReader sr = new StreamReader("/proc/meminfo"); + string line; + while ((line = sr.ReadLine()) != null) + { + // Values are listed in kibibytes + if (line.StartsWith("MemFree")) + { + device.FreeMemory = long.Parse(new string(line.Where(c => char.IsNumber(c)).ToArray())) * 1024; + } + if (line.StartsWith("MemTotal")) + { + device.TotalMemory = long.Parse(new string(line.Where(c => char.IsNumber(c)).ToArray())) * 1024; + } + } + sr.Close(); + + // See https://man7.org/linux/man-pages/man3/statvfs.3.html + StatvfsBuffer buffer = new StatvfsBuffer(); + if (statvfs(Environment.CurrentDirectory, buffer) == 0) { + device.FreeDisk = buffer.f_bavailable * (long)buffer.f_bsize; + } + } + + public void PopulateMetadata(Metadata metadata) + { + } + + public void PopulateUser(User user) + { + } + + public void SetMetadata(string section, Dictionary metadata) + { + } + + public void SetSession(Session session) + { + } + + public void SetUser(User user) + { + } + public void SetContext(string context) + { + } + public void SetAutoDetectErrors(bool autoDetectErrors) + { + } + + public void SetAutoDetectAnrs(bool autoDetectAnrs) + { + } + + public void StartSession() + { + } + + public void PauseSession() + { + } + + public bool ResumeSession() + { + return false; + } + + public void UpdateSession(Session session) + { + } + + public Session GetCurrentSession() + { + return null; + } + + public void MarkLaunchCompleted() + { + _launchMarkedAsCompleted = true; + } + + public LastRunInfo GetLastRunInfo() + { + return null; + } + + public void ClearNativeMetadata(string section) + { + _metadata.ClearMetadata(section); + } + + public void ClearNativeMetadata(string section, string key) + { + _metadata.ClearMetadata(section, key); + } + + public void AddNativeMetadata(string section, IDictionary data) + { + _metadata.AddMetadata(section, data); + } + + public IDictionary GetNativeMetadata() + { + return _metadata.Payload; + } + + public void AddFeatureFlag(string name, string variant = null) + { + _featureFlags[name] = variant; + } + + public void AddFeatureFlags(FeatureFlag[] featureFlags) + { + foreach (var flag in featureFlags) + { + _featureFlags[flag.Name] = flag.Variant; + } + } + + public void ClearFeatureFlag(string name) + { + _featureFlags.Remove(name); + } + + public void ClearFeatureFlags() + { + _featureFlags.Clear(); + } + + public bool ShouldAttemptDelivery() + { + return true; + } + + public void RegisterForOnSessionCallbacks() + { + // Not Used on this platform + } + } +} diff --git a/unity/PackageProject/Assets/Bugsnag/Plugins/BugsnagUnity.dll.meta b/unity/PackageProject/Assets/Bugsnag/Plugins/BugsnagUnity.dll.meta index 9116eba74..48b2b0c2a 100644 --- a/unity/PackageProject/Assets/Bugsnag/Plugins/BugsnagUnity.dll.meta +++ b/unity/PackageProject/Assets/Bugsnag/Plugins/BugsnagUnity.dll.meta @@ -12,15 +12,15 @@ PluginImporter: validateReferences: 1 platformData: - first: - '': Any + : Any second: enabled: 0 settings: Exclude Android: 1 Exclude Editor: 0 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 Exclude OSXUniversal: 1 Exclude WebGL: 0 Exclude Win: 1 @@ -61,19 +61,19 @@ PluginImporter: - first: Standalone: Linux second: - enabled: 1 + enabled: 0 settings: CPU: x86 - first: Standalone: Linux64 second: - enabled: 1 + enabled: 0 settings: - CPU: x86_64 + CPU: None - first: Standalone: LinuxUniversal second: - enabled: 1 + enabled: 0 settings: CPU: AnyCPU - first: diff --git a/unity/PackageProject/Assets/Bugsnag/Plugins/Linux.meta b/unity/PackageProject/Assets/Bugsnag/Plugins/Linux.meta new file mode 100644 index 000000000..d9d0b8d7a --- /dev/null +++ b/unity/PackageProject/Assets/Bugsnag/Plugins/Linux.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5b5dbe042d2cad8d2ac6b0507ee177bd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/PackageProject/Assets/Bugsnag/Plugins/Linux/BugsnagUnity.Linux.dll.meta b/unity/PackageProject/Assets/Bugsnag/Plugins/Linux/BugsnagUnity.Linux.dll.meta new file mode 100644 index 000000000..7151303bb --- /dev/null +++ b/unity/PackageProject/Assets/Bugsnag/Plugins/Linux/BugsnagUnity.Linux.dll.meta @@ -0,0 +1,69 @@ +fileFormatVersion: 2 +guid: 14e3f25c468bdebc785bbd59d710836f +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Editor: 1 + Exclude Linux64: 0 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: From af978fb8ddfb1bab37c52fd7e0bd4ebf5e8b18f4 Mon Sep 17 00:00:00 2001 From: James Lindsay Date: Tue, 6 Aug 2024 10:37:00 +0100 Subject: [PATCH 04/21] Maze runner tests --- .buildkite/block.full.yml | 1 + .buildkite/pipeline.linux.full.yml | 197 ++++++++++++++++++ .buildkite/pipeline_trigger.sh | 1 + TESTING.md | 27 ++- features/csharp/csharp_config.feature | 4 +- features/csharp/csharp_persistence.feature | 2 +- features/csharp/csharp_sessions.feature | 6 + .../maze_runner/Assets/Editor/Builder.cs | 15 ++ features/scripts/build_maze_runner.sh | 10 +- features/steps/unity_steps.rb | 13 ++ features/support/env.rb | 10 + scripts/ci-build-linux-fixture.sh | 29 +++ scripts/ci-run-linux-tests.sh | 26 +++ src/BugsnagUnity/Native/Linux/NativeClient.cs | 17 +- 14 files changed, 348 insertions(+), 10 deletions(-) create mode 100644 .buildkite/pipeline.linux.full.yml create mode 100755 scripts/ci-build-linux-fixture.sh create mode 100755 scripts/ci-run-linux-tests.sh diff --git a/.buildkite/block.full.yml b/.buildkite/block.full.yml index 88c22efae..4c2dddb06 100644 --- a/.buildkite/block.full.yml +++ b/.buildkite/block.full.yml @@ -9,4 +9,5 @@ steps: 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.linux.full.yml && buildkite-agent pipeline upload .buildkite/pipeline.webgl.full.yml diff --git a/.buildkite/pipeline.linux.full.yml b/.buildkite/pipeline.linux.full.yml new file mode 100644 index 000000000..990f517ff --- /dev/null +++ b/.buildkite/pipeline.linux.full.yml @@ -0,0 +1,197 @@ +aliases: + - &2020 "2020.3.48f1" + - &2021 "2021.3.36f1" + - &2022 "2022.3.22f1" + - &2023 "2023.2.19f1" + +agents: + queue: macos-14 + +steps: + # + # Build Linux test fixtures + # + - label: Build Unity 2020 Linux test fixture + timeout_in_minutes: 30 + key: "linux-2020-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2020 + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - unity.log + - features/fixtures/maze_runner/build/linux-release-2020.zip + commands: + - scripts/ci-build-linux-fixture.sh release + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2021 linux test fixture + timeout_in_minutes: 30 + key: "linux-2021-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2021 + commands: + - scripts/ci-build-linux-fixture.sh release + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - unity.log + - unity_import.log + - c/linux-release-2021.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2021 linux DEV test fixture + timeout_in_minutes: 30 + key: "linux-2021-dev-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2021 + commands: + - scripts/ci-build-linux-fixture.sh dev + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - unity.log + - unity_import.log + - features/fixtures/maze_runner/build/linux-dev-2021.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2022 linux test fixture + timeout_in_minutes: 30 + key: "linux-2022-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2022 + commands: + - scripts/ci-build-linux-fixture.sh release + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - unity.log + - unity_import.log + - features/fixtures/maze_runner/build/linux-release-2022.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: Build Unity 2023 linux test fixture + skip: Pending PLAT-12072 + timeout_in_minutes: 30 + key: "linux-2023-fixture" + depends_on: "build-artifacts" + env: + UNITY_VERSION: *2023 + commands: + - scripts/ci-build-linux-fixture.sh release + plugins: + artifacts#v1.9.0: + download: + - Bugsnag.unitypackage + upload: + - unity.log + - unity_import.log + - features/fixtures/maze_runner/build/linux-release-2023.zip + retry: + automatic: + - exit_status: "*" + limit: 1 + + # + # Run linux e2e tests + # + - label: Run linux e2e tests for Unity 2020 + timeout_in_minutes: 30 + depends_on: "linux-2020-fixture" + env: + UNITY_VERSION: *2020 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/linux-release-2020.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + + command: + - scripts/ci-run-linux-tests.sh release + + - label: Run linux e2e tests for Unity 2021 + timeout_in_minutes: 30 + depends_on: "linux-2021-fixture" + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/linux-release-2021.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + commands: + - scripts/ci-run-linux-tests.sh release + + - label: Run linux e2e DEV tests for Unity 2021 + timeout_in_minutes: 30 + depends_on: "linux-2021-dev-fixture" + env: + UNITY_VERSION: *2021 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/linux-dev-2021.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + commands: + - scripts/ci-run-linux-tests.sh dev + + - label: Run linux e2e tests for Unity 2022 + timeout_in_minutes: 30 + depends_on: "linux-2022-fixture" + env: + UNITY_VERSION: *2022 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/linux-release-2022.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + commands: + - scripts/ci-run-linux-tests.sh release + + - label: Run linux e2e tests for Unity 2023 + skip: Pending PLAT-12072 + timeout_in_minutes: 30 + depends_on: "linux-2023-fixture" + env: + UNITY_VERSION: *2023 + plugins: + artifacts#v1.9.0: + download: + - features/fixtures/maze_runner/build/linux-release-2023.zip + upload: + - maze_output/**/* + - maze_output/metrics.csv + commands: + - scripts/ci-run-linux-tests.sh release diff --git a/.buildkite/pipeline_trigger.sh b/.buildkite/pipeline_trigger.sh index 8be39d688..d5c032b6f 100755 --- a/.buildkite/pipeline_trigger.sh +++ b/.buildkite/pipeline_trigger.sh @@ -10,6 +10,7 @@ if [[ "$BUILDKITE_MESSAGE" == *"[full ci]"* || 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.linux.full.yml buildkite-agent pipeline upload .buildkite/pipeline.webgl.full.yml else # Basic build, but allow a full build to be triggered diff --git a/TESTING.md b/TESTING.md index 3ff5bfbc6..29910fc3e 100644 --- a/TESTING.md +++ b/TESTING.md @@ -102,7 +102,7 @@ This will generate the following file: #### MacOS -1. `UNITY_VERSION=2018.4.36f1 ./features/scripts/build_maze_runner.sh macos` +1. `UNITY_VERSION=2018.4.36f1 ./features/scripts/build_maze_runner.sh release macos` Where `UNITY_VERSION` corresponds to the Unity installation path, e.g: ``` @@ -119,7 +119,7 @@ This will generate the test fixture app: Building the test fixture on Windows requires a Git bash terminal. In a Git bash terminal: -1. `UNITY_VERSION=2018.4.36f1 ./features/scripts/build_maze_runner.sh windows` +1. `UNITY_VERSION=2018.4.36f1 ./features/scripts/build_maze_runner.sh release windows` Where `UNITY_VERSION` corresponds to the Unity installation path, e.g: ``` @@ -132,6 +132,20 @@ dependencies: ./features/fixtures/maze_runner/build/Windows ``` +#### Linux + +1. `UNITY_VERSION=2021.3.40f1 ./features/scripts/build_maze_runner.sh release linux` + +Where `UNITY_VERSION` corresponds to the Unity installation path, e.g: +``` +$HOME/Unity/Hub/Editor/$UNITY_VERSION/Editor/Unity +``` +This will generate a build folder containing the test fixture executable, together with the UnityPlayer.so and other +dependencies: +``` +./features/fixtures/maze_runner/build/linux +``` + ### Running an end-to-end test #### MacOS @@ -155,6 +169,15 @@ In the Ubuntu terminal: bundle exec maze-runner --app=features/fixtures/maze_runner/build/Windows/Mazerunner.exe --os=windows ``` +#### Linux + +1. Check the contents of `Gemfile` to select the version of `maze-runner` to use +1. Run `bundle install` if you haven't run end-to-end tests before +1. To run the tests: + ```shell script + bundle exec maze-runner --app=features/fixtures/maze_runner/build/linux/Mazerunner --os=linux + ``` + #### WebGL The WebGL e2e tests depend on Chrome and `chromedriver` (available from Homebrew). diff --git a/features/csharp/csharp_config.feature b/features/csharp/csharp_config.feature index 5954f26d0..b592eb346 100644 --- a/features/csharp/csharp_config.feature +++ b/features/csharp/csharp_config.feature @@ -27,7 +27,7 @@ Feature: csharp events And the exception "message" equals "Error 2" And the event "app.isLaunching" is false - @skip_cocoa @skip_windows @skip_webgl # PLAT-9061 + @skip_cocoa @skip_windows @skip_linux @skip_webgl # PLAT-9061 Scenario: Set long launch time When I run the game in the "LongLaunchTime" state And I wait to receive 2 errors @@ -39,7 +39,7 @@ Feature: csharp events And the exception "message" equals "Error 2" And the event "app.isLaunching" is false - @skip_cocoa @skip_windows @skip_webgl # PLAT-9061 + @skip_cocoa @skip_windows @skip_linux @skip_webgl # PLAT-9061 Scenario: Set short launch time When I run the game in the "ShortLaunchTime" state And I wait to receive 2 errors diff --git a/features/csharp/csharp_persistence.feature b/features/csharp/csharp_persistence.feature index c56f2e2ad..8cf1b7acb 100644 --- a/features/csharp/csharp_persistence.feature +++ b/features/csharp/csharp_persistence.feature @@ -3,7 +3,7 @@ Feature: Unity Persistence Background: Given I clear the Bugsnag cache - @skip_windows @skip_webgl @skip_cocoa @skip_android #pending PLAT-8632 + @skip_windows @skip_linux @skip_webgl @skip_cocoa @skip_android #pending PLAT-8632 Scenario: Receive a persisted session When I set the HTTP status code for the next request to 408 And I run the game in the "PersistSession" state diff --git a/features/csharp/csharp_sessions.feature b/features/csharp/csharp_sessions.feature index ac5e29d9c..a9fac573b 100644 --- a/features/csharp/csharp_sessions.feature +++ b/features/csharp/csharp_sessions.feature @@ -37,6 +37,7 @@ Feature: Session Tracking And the session payload field "app.type" equals the platform-dependent string: | macos | MacOS | | windows | Windows | + | linux | Linux | | switch | nintendo-switch | | browser | WebGL | | android | android | @@ -45,6 +46,7 @@ Feature: Session Tracking And the session payload field "device.osName" equals the platform-dependent string: | macos | Mac OS | | windows | Microsoft Windows NT | + | linux | Unix | | switch | Nintendo Switch | | browser | Unix | | android | android | @@ -53,6 +55,7 @@ Feature: Session Tracking And the session payload field "device.manufacturer" equals the platform-dependent string: | macos | Apple | | windows | PC | + | linux | @skip | | switch | Nintendo | | browser | @skip | | android | @skip | @@ -72,6 +75,7 @@ Feature: Session Tracking And the session payload field "app.type" equals the platform-dependent string: | macos | MacOS | | windows | Windows | + | linux | Linux | | switch | nintendo-switch | | browser | WebGL | | android | android | @@ -80,6 +84,7 @@ Feature: Session Tracking And the session payload field "device.osName" equals the platform-dependent string: | macos | Mac OS | | windows | Microsoft Windows NT | + | linux | Unix | | switch | Nintendo Switch | | browser | Unix | | android | android | @@ -88,6 +93,7 @@ Feature: Session Tracking And the session payload field "device.manufacturer" equals the platform-dependent string: | macos | Apple | | windows | PC | + | linux | @skip | | switch | Nintendo | | browser | @skip | | android | @skip | diff --git a/features/fixtures/maze_runner/Assets/Editor/Builder.cs b/features/fixtures/maze_runner/Assets/Editor/Builder.cs index 59eea7505..147ca731f 100644 --- a/features/fixtures/maze_runner/Assets/Editor/Builder.cs +++ b/features/fixtures/maze_runner/Assets/Editor/Builder.cs @@ -31,6 +31,11 @@ public static void Win64Release() Win64(false); } + public static void Linux64Release() + { + Linux64(false); + } + public static void WebGLRelease() { WebGL(false); @@ -46,6 +51,11 @@ public static void Win64Dev() Win64(true); } + public static void Linux64Dev() + { + Linux64(true); + } + public static void WebGLDev() { WebGL(true); @@ -61,6 +71,11 @@ static void Win64(bool dev) BuildStandalone(dev ? "build/Windows/Mazerunner_dev.exe" : "build/Windows/Mazerunner.exe", BuildTarget.StandaloneWindows64, dev); } + static void Linux64(bool dev) + { + BuildStandalone(dev ? "build/linux/Mazerunner_dev" : "build/linux/Mazerunner", BuildTarget.StandaloneLinux64, dev); + } + static void WebGL(bool dev) { BuildStandalone("build/WebGL/Mazerunner" + (dev ? "_dev" : ""), BuildTarget.WebGL, dev); diff --git a/features/scripts/build_maze_runner.sh b/features/scripts/build_maze_runner.sh index 6bcce3ac4..52193b39c 100755 --- a/features/scripts/build_maze_runner.sh +++ b/features/scripts/build_maze_runner.sh @@ -6,7 +6,7 @@ if [ -z "$UNITY_VERSION" ]; then fi if [[ $# != 2 ]]; then - echo "Build type (release/dev) and platform (macos/webgl/windows/wsl) must be passed as parameters" + echo "Build type (release/dev) and platform (macos/webgl/windows/wsl/linux) must be passed as parameters" exit 2 fi @@ -36,6 +36,14 @@ elif [ "$PLATFORM_TYPE" == "wsl" ]; then fi set -m UNITY_PATH="/mnt/c/Program Files/Unity/Hub/Editor/$UNITY_VERSION/Editor/Unity.exe" +elif [ "$PLATFORM_TYPE" == "linux" ]; then + if [ "$BUILD_TYPE" == "release" ]; then + PLATFORM="Linux64Release" + else + PLATFORM="Linux64Dev" + fi + set -m + UNITY_PATH="$HOME/Unity/Hub/Editor/$UNITY_VERSION/Editor/Unity" elif [ "$PLATFORM_TYPE" == "webgl" ]; then if [ "$BUILD_TYPE" == "release" ]; then PLATFORM="WebGLRelease" diff --git a/features/steps/unity_steps.rb b/features/steps/unity_steps.rb index aaf3c9ce2..33454bb21 100644 --- a/features/steps/unity_steps.rb +++ b/features/steps/unity_steps.rb @@ -34,6 +34,12 @@ def execute_command(action, scenario_name = '') Maze::Runner.run_command(command, blocking: false) execute_command('clear_cache') + when 'linux' + log = File.join(Dir.pwd, 'mazerunner.log') + command = "#{Maze.config.app} --args -logfile #{log} > /dev/null" + Maze::Runner.run_command(command, blocking: false) + execute_command('clear_cache') + when 'android', 'ios' execute_command('clear_cache') when 'browser' @@ -80,6 +86,13 @@ def execute_command(action, scenario_name = '') execute_command('run_scenario', state) + when 'linux' + log = File.join(Dir.pwd, "#{state}-mazerunner.log") + command = "#{Maze.config.app} --args -logfile #{log} > /dev/null" + Maze::Runner.run_command(command, blocking: false) + + execute_command('run_scenario', state) + when 'android', 'ios' execute_command('run_scenario', state) diff --git a/features/support/env.rb b/features/support/env.rb index f3d75ae48..0a58cc211 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -48,6 +48,13 @@ skip_this_scenario("Skipping scenario") if Maze.config.os == 'windows' end +Before('@linux_only') do |_scenario| + skip_this_scenario('Skipping scenario') unless Maze.config.os == 'linux' +end +Before('@skip_linux') do |_scenario| + skip_this_scenario("Skipping scenario") if Maze.config.os == 'linux' +end + Before('@switch_only') do |_scenario| skip_this_scenario('Skipping scenario') unless Maze.config.os == 'switch' @@ -71,6 +78,7 @@ elsif Maze.config.os&.downcase == 'windows' # 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.os&.downcase == 'linux' elsif Maze.config.browser != nil # WebGL release_path = 'features/fixtures/maze_runner/build/WebGL/Mazerunner' @@ -138,6 +146,8 @@ case Maze::Helper.get_current_platform when 'macos' `killall Mazerunner` + when 'linux' + `killall Mazerunner` when 'webgl','windows' execute_command('close_application') when 'switch' diff --git a/scripts/ci-build-linux-fixture.sh b/scripts/ci-build-linux-fixture.sh new file mode 100755 index 000000000..6649b327f --- /dev/null +++ b/scripts/ci-build-linux-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 Linux fixture +./features/scripts/build_maze_runner.sh $BUILD_TYPE linux + +pushd features/fixtures/maze_runner/build + zip -r linux-${UNITY_VERSION:0:4}.zip linux +popd + + +pushd features/fixtures/maze_runner/build + if [ "$BUILD_TYPE" == "release" ]; then + zip -r linux-release-${UNITY_VERSION:0:4}.zip linux + else + zip -r linux-dev-${UNITY_VERSION:0:4}.zip linux + fi +popd diff --git a/scripts/ci-run-linux-tests.sh b/scripts/ci-run-linux-tests.sh new file mode 100755 index 000000000..ee35d719b --- /dev/null +++ b/scripts/ci-run-linux-tests.sh @@ -0,0 +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 + if [ "$BUILD_TYPE" == "release" ]; then + unzip linux-release-${UNITY_VERSION:0:4}.zip + APP_PATH="features/fixtures/maze_runner/build/linux/Mazerunner" + else + unzip linux-dev-${UNITY_VERSION:0:4}.zip + APP_PATH="features/fixtures/maze_runner/build/linux/Mazerunner_dev" + fi +popd + +bundle install +bundle exec maze-runner --app=$APP_PATH --os=linux features/csharp diff --git a/src/BugsnagUnity/Native/Linux/NativeClient.cs b/src/BugsnagUnity/Native/Linux/NativeClient.cs index a6518c675..e2aee56e9 100644 --- a/src/BugsnagUnity/Native/Linux/NativeClient.cs +++ b/src/BugsnagUnity/Native/Linux/NativeClient.cs @@ -70,9 +70,18 @@ private class StatvfsBuffer public ulong f_bsize; public ulong f_frsize; - public long f_blocks; - public long f_bfree; - public long f_bavailable; + public ulong f_blocks; + public ulong f_bfree; + public ulong f_bavailable; + + public ulong f_files; + public ulong f_ffree; + public ulong f_favail; + + public ulong f_fsid; + public ulong f_flag; + public ulong f_namemax; + } [return: MarshalAs(UnmanagedType.SysInt)] @@ -107,7 +116,7 @@ public void PopulateDeviceWithState(DeviceWithState device) // See https://man7.org/linux/man-pages/man3/statvfs.3.html StatvfsBuffer buffer = new StatvfsBuffer(); if (statvfs(Environment.CurrentDirectory, buffer) == 0) { - device.FreeDisk = buffer.f_bavailable * (long)buffer.f_bsize; + device.FreeDisk = (long)buffer.f_bavailable * (long)buffer.f_bsize; } } From c647a1f9edb30a6d58618c7497ad3679d309a7bc Mon Sep 17 00:00:00 2001 From: James Lindsay Date: Wed, 7 Aug 2024 10:12:27 +0100 Subject: [PATCH 05/21] Code review --- .buildkite/block.full.yml | 2 +- .buildkite/pipeline.linux.full.yml | 3 +- .buildkite/pipeline_trigger.sh | 3 +- .gitignore | 1 + CONTRIBUTING.md | 16 +- Gemfile | 3 +- Gemfile.lock | 227 ----------------------------- 7 files changed, 14 insertions(+), 241 deletions(-) delete mode 100644 Gemfile.lock diff --git a/.buildkite/block.full.yml b/.buildkite/block.full.yml index 4c2dddb06..f588545a0 100644 --- a/.buildkite/block.full.yml +++ b/.buildkite/block.full.yml @@ -9,5 +9,5 @@ steps: 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.linux.full.yml && + echo "Waiting on https://smartbear.atlassian.net/browse/PLAT-12563 buildkite-agent pipeline upload .buildkite/pipeline.linux.full.yml" && buildkite-agent pipeline upload .buildkite/pipeline.webgl.full.yml diff --git a/.buildkite/pipeline.linux.full.yml b/.buildkite/pipeline.linux.full.yml index 990f517ff..4cd301a8d 100644 --- a/.buildkite/pipeline.linux.full.yml +++ b/.buildkite/pipeline.linux.full.yml @@ -4,6 +4,7 @@ aliases: - &2022 "2022.3.22f1" - &2023 "2023.2.19f1" +# Waiting on https://smartbear.atlassian.net/browse/PLAT-12563 agents: queue: macos-14 @@ -95,7 +96,6 @@ steps: limit: 1 - label: Build Unity 2023 linux test fixture - skip: Pending PLAT-12072 timeout_in_minutes: 30 key: "linux-2023-fixture" depends_on: "build-artifacts" @@ -181,7 +181,6 @@ steps: - scripts/ci-run-linux-tests.sh release - label: Run linux e2e tests for Unity 2023 - skip: Pending PLAT-12072 timeout_in_minutes: 30 depends_on: "linux-2023-fixture" env: diff --git a/.buildkite/pipeline_trigger.sh b/.buildkite/pipeline_trigger.sh index d5c032b6f..8da45a0bf 100755 --- a/.buildkite/pipeline_trigger.sh +++ b/.buildkite/pipeline_trigger.sh @@ -10,7 +10,8 @@ if [[ "$BUILDKITE_MESSAGE" == *"[full ci]"* || 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.linux.full.yml + # Waiting on https://smartbear.atlassian.net/browse/PLAT-12563 + # buildkite-agent pipeline upload .buildkite/pipeline.linux.full.yml buildkite-agent pipeline upload .buildkite/pipeline.webgl.full.yml else # Basic build, but allow a full build to be triggered diff --git a/.gitignore b/.gitignore index fb9b9d51e..bc09cc022 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +Gemfile.lock build .DS_store .gradle diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 355c37a8b..48852b7ed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,21 +25,21 @@ git clone --recursive git@github.com:bugsnag/bugsnag-unity ### Ubuntu 22.04 -- Set up unity - - Download unity hub with the custom repository using https://docs.unity3d.com/hub/manual/InstallHub.html. Note that Ubuntu 24.04 doesn't work currently. - - Install a unity version. - - Set the `UNITY_VERSION` environment variables based on the unity version; for example: +- Set up Unity + - Download Unity Hub with the custom repository using https://docs.unity3d.com/hub/manual/InstallHub.html. Note that Ubuntu 24.04 doesn't work currently. + - Install a Unity version. + - Set the `UNITY_VERSION` environment variables based on the Unity version; for example: ``` export UNITY_VERSION=2021.3.40f1 ``` - Install the required libssl version with https://stackoverflow.com/a/72137153 -- Install dotnet with sudo apt install dotnet-sdk-8.0. The snap release doesn't work. +- Install .NET with `sudo apt install dotnet-sdk-8.0`. The snap release doesn't work. - Install Ruby 3.3.4 and bundler via https://stackoverflow.com/a/37956249. The snap release doesn't work. -- Setup android +- Setup Android - `sudo apt-get install openjdk-11-jdk` - `sudo snap install android-studio --classic` - - Use Andoroid Studio open any project, click the hamburger menu -> Tools -> SDK -> SDK Tools. Then select and download NDK (side by side) and Android SDK Command-line Tools. - - Set `ANDROID_SDK_ROOT` to the path from Andoroid Studio's hamburger menu -> Tools -> SDK -> Path. For example: + - Use Android Studio open any project, click the hamburger menu -> Tools -> SDK -> SDK Tools. Then select and download NDK (side by side) and Android SDK Command-line Tools. + - Set `ANDROID_SDK_ROOT` to the path from Android Studio's hamburger menu -> Tools -> SDK -> Path. For example: ``` export ANDROID_SDK_ROOT=/home/username/Android/Sdk ``` diff --git a/Gemfile b/Gemfile index d543ef0d9..01e899971 100644 --- a/Gemfile +++ b/Gemfile @@ -4,11 +4,10 @@ gem 'rake' gem 'xcpretty' gem 'xcodeproj' gem 'cocoapods' -gem 'rake' unless Gem.win_platform? # Use official Maze Runner release - gem 'bugsnag-maze-runner', '~>9.11.2' + gem 'bugsnag-maze-runner', '~>9.0' # Use a specific Maze Runner branch # gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', branch: 'main' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 9d8d2fa9e..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,227 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.6) - rexml - 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) - 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) - atomos (0.1.3) - base64 (0.2.0) - bigdecimal (3.1.8) - bugsnag (6.27.1) - concurrent-ruby (~> 1.0) - bugsnag-maze-runner (9.11.2) - appium_lib (~> 12.0.0) - appium_lib_core (~> 5.4.0) - bugsnag (~> 6.24) - cucumber (~> 7.1) - cucumber-expressions (~> 6.0.0) - curb (~> 1.0.5) - 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.3.0) - childprocess (4.1.0) - 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.3.3) - connection_pool (2.4.1) - 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 (1.0.5) - diff-lcs (1.5.1) - dogstatsd-ruby (5.5.0) - drb (2.2.1) - ecma-re-validator (0.4.0) - regexp_parser (~> 2.2) - escape (0.0.4) - ethon (0.16.0) - ffi (>= 1.15.0) - eventmachine (1.2.7) - faye-websocket (0.11.3) - eventmachine (>= 0.12.0) - websocket-driver (>= 0.5.1) - ffi (1.17.0-x64-mingw-ucrt) - ffi (1.17.0-x86_64-darwin) - ffi (1.17.0-x86_64-linux-gnu) - fourflusher (2.3.1) - fuzzy_match (2.0.4) - gh_inspector (1.1.3) - hana (1.3.7) - httpclient (2.8.3) - i18n (1.14.5) - concurrent-ruby (~> 1.0) - json (2.7.2) - 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.0702) - minitest (5.24.1) - molinillo (0.8.0) - multi_test (0.1.2) - mutex_m (0.2.0) - nanaimo (0.3.0) - nap (1.1.0) - netrc (0.11.0) - nokogiri (1.16.6-x64-mingw-ucrt) - racc (~> 1.4) - nokogiri (1.16.6-x86_64-darwin) - racc (~> 1.4) - nokogiri (1.16.6-x86_64-linux) - racc (~> 1.4) - optimist (3.0.1) - os (1.0.1) - power_assert (2.0.3) - public_suffix (4.0.7) - racc (1.8.0) - rack (2.2.9) - rake (12.3.3) - regexp_parser (2.9.2) - rexml (3.2.6) - rouge (2.0.7) - ruby-macho (2.5.1) - 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.3) - sys-uname (1.3.0) - ffi (~> 1.1) - test-unit (3.5.9) - power_assert - tomlrb (2.0.3) - typhoeus (1.4.1) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - uri_template (0.7.0) - webrick (1.7.0) - websocket (1.2.11) - websocket-driver (0.7.6) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - xcodeproj (1.23.0) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (~> 3.2.4) - xcpretty (0.3.0) - rouge (~> 2.0.7) - -PLATFORMS - x64-mingw-ucrt - x86_64-darwin-19 - x86_64-darwin-20 - x86_64-linux - -DEPENDENCIES - bugsnag-maze-runner (~> 9.11.2) - cocoapods - rake - xcodeproj - xcpretty - -BUNDLED WITH - 2.4.8 From b79798a6592ea11893b129152b560bcf3c90419c Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Mon, 19 Aug 2024 14:36:58 +0100 Subject: [PATCH 06/21] [full ci] --- .buildkite/pipeline.linux.full.yml | 10 ++++++++++ .buildkite/pipeline.yml | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.linux.full.yml b/.buildkite/pipeline.linux.full.yml index 4cd301a8d..89a59e738 100644 --- a/.buildkite/pipeline.linux.full.yml +++ b/.buildkite/pipeline.linux.full.yml @@ -124,6 +124,8 @@ steps: depends_on: "linux-2020-fixture" env: UNITY_VERSION: *2020 + agents: + queue: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -140,6 +142,8 @@ steps: depends_on: "linux-2021-fixture" env: UNITY_VERSION: *2021 + queue: + name: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -155,6 +159,8 @@ steps: depends_on: "linux-2021-dev-fixture" env: UNITY_VERSION: *2021 + queue: + name: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -170,6 +176,8 @@ steps: depends_on: "linux-2022-fixture" env: UNITY_VERSION: *2022 + queue: + name: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -185,6 +193,8 @@ steps: depends_on: "linux-2023-fixture" env: UNITY_VERSION: *2023 + queue: + name: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 5b5012273..0eeb9593d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -76,8 +76,6 @@ steps: - exit_status: "*" limit: 1 - - # - label: ':android: Build Android EDM test fixture for Unity 2021' # timeout_in_minutes: 30 # key: 'build-edm-fixture-2021' From cc6750c196c59b6f9cc24057d4176b5f135ce2d9 Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Mon, 19 Aug 2024 14:51:25 +0100 Subject: [PATCH 07/21] [full ci] --- .buildkite/pipeline_trigger.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline_trigger.sh b/.buildkite/pipeline_trigger.sh index 8da45a0bf..23c0cd3fb 100755 --- a/.buildkite/pipeline_trigger.sh +++ b/.buildkite/pipeline_trigger.sh @@ -11,7 +11,7 @@ if [[ "$BUILDKITE_MESSAGE" == *"[full ci]"* || buildkite-agent pipeline upload .buildkite/pipeline.windows.full.yml buildkite-agent pipeline upload .buildkite/pipeline.macos.full.yml # Waiting on https://smartbear.atlassian.net/browse/PLAT-12563 - # buildkite-agent pipeline upload .buildkite/pipeline.linux.full.yml + buildkite-agent pipeline upload .buildkite/pipeline.linux.full.yml buildkite-agent pipeline upload .buildkite/pipeline.webgl.full.yml else # Basic build, but allow a full build to be triggered From 94b172e7a93e37e045d209650481d433ca66a716 Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Mon, 19 Aug 2024 14:51:42 +0100 Subject: [PATCH 08/21] [full ci] --- bugsnag-android | 2 +- bugsnag-cocoa | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bugsnag-android b/bugsnag-android index d1d2eeeb4..2f5a9518c 160000 --- a/bugsnag-android +++ b/bugsnag-android @@ -1 +1 @@ -Subproject commit d1d2eeeb426b896c8fb4e0229651378ac8f8d302 +Subproject commit 2f5a9518cafba8664a942cec415f4ba08b9c0e7e 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 047f8c9e4d33f0667dcb2d9b9f3b05999fd6cd88 Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Mon, 19 Aug 2024 17:15:34 +0100 Subject: [PATCH 09/21] [full ci] --- .buildkite/pipeline.linux.full.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.buildkite/pipeline.linux.full.yml b/.buildkite/pipeline.linux.full.yml index 89a59e738..8b1b39899 100644 --- a/.buildkite/pipeline.linux.full.yml +++ b/.buildkite/pipeline.linux.full.yml @@ -133,7 +133,6 @@ steps: upload: - maze_output/**/* - maze_output/metrics.csv - command: - scripts/ci-run-linux-tests.sh release @@ -142,8 +141,8 @@ steps: depends_on: "linux-2021-fixture" env: UNITY_VERSION: *2021 - queue: - name: "opensource-ubuntu-1804-unity" + agents: + queue: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -159,8 +158,8 @@ steps: depends_on: "linux-2021-dev-fixture" env: UNITY_VERSION: *2021 - queue: - name: "opensource-ubuntu-1804-unity" + agents: + queue: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -176,8 +175,8 @@ steps: depends_on: "linux-2022-fixture" env: UNITY_VERSION: *2022 - queue: - name: "opensource-ubuntu-1804-unity" + agents: + queue: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -193,8 +192,8 @@ steps: depends_on: "linux-2023-fixture" env: UNITY_VERSION: *2023 - queue: - name: "opensource-ubuntu-1804-unity" + agents: + queue: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: From 93a14f53de1562e67e322e3339a314d8482feecf Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Tue, 20 Aug 2024 09:09:56 +0100 Subject: [PATCH 10/21] change where linux path is --- features/scripts/build_maze_runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/scripts/build_maze_runner.sh b/features/scripts/build_maze_runner.sh index 52193b39c..8a70d0155 100755 --- a/features/scripts/build_maze_runner.sh +++ b/features/scripts/build_maze_runner.sh @@ -43,7 +43,7 @@ elif [ "$PLATFORM_TYPE" == "linux" ]; then PLATFORM="Linux64Dev" fi set -m - UNITY_PATH="$HOME/Unity/Hub/Editor/$UNITY_VERSION/Editor/Unity" + UNITY_PATH="/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity" elif [ "$PLATFORM_TYPE" == "webgl" ]; then if [ "$BUILD_TYPE" == "release" ]; then PLATFORM="WebGLRelease" From b0fdae57012008d99aa58fbb69d8e94139aab72f Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Tue, 20 Aug 2024 09:10:05 +0100 Subject: [PATCH 11/21] [full ci] From 8c96a8cd52c2c10412ab5fb378c976f4752f5b91 Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Tue, 20 Aug 2024 09:32:39 +0100 Subject: [PATCH 12/21] [full ci] --- .buildkite/pipeline_trigger.sh | 10 +++++----- scripts/ci-build-linux-fixture.sh | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline_trigger.sh b/.buildkite/pipeline_trigger.sh index 23c0cd3fb..e2c393cf4 100755 --- a/.buildkite/pipeline_trigger.sh +++ b/.buildkite/pipeline_trigger.sh @@ -6,13 +6,13 @@ 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.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.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 # Waiting on https://smartbear.atlassian.net/browse/PLAT-12563 buildkite-agent pipeline upload .buildkite/pipeline.linux.full.yml - buildkite-agent pipeline upload .buildkite/pipeline.webgl.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/scripts/ci-build-linux-fixture.sh b/scripts/ci-build-linux-fixture.sh index 6649b327f..cfacd014c 100755 --- a/scripts/ci-build-linux-fixture.sh +++ b/scripts/ci-build-linux-fixture.sh @@ -1,5 +1,7 @@ #!/bin/bash -e +set -x + if [ -z "$UNITY_VERSION" ]; then echo "UNITY_VERSION must be set, to e.g. 2018.4.36f1" exit 1 @@ -15,6 +17,8 @@ BUILD_TYPE=$1 # Build the Linux fixture ./features/scripts/build_maze_runner.sh $BUILD_TYPE linux +pwd + pushd features/fixtures/maze_runner/build zip -r linux-${UNITY_VERSION:0:4}.zip linux popd From 974ba3a08b9f212d233214c4a71a98578974bd16 Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Tue, 20 Aug 2024 11:15:30 +0100 Subject: [PATCH 13/21] [full ci] --- .../ProjectSettings/ProjectSettings.asset | 187 ++++++++++++------ 1 file changed, 124 insertions(+), 63 deletions(-) diff --git a/features/fixtures/maze_runner/ProjectSettings/ProjectSettings.asset b/features/fixtures/maze_runner/ProjectSettings/ProjectSettings.asset index 13a273ae4..fda147625 100644 --- a/features/fixtures/maze_runner/ProjectSettings/ProjectSettings.asset +++ b/features/fixtures/maze_runner/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 18 + serializedVersion: 23 productGUID: 8f85d0b19dedd455facc164ff33e8123 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -17,7 +17,7 @@ PlayerSettings: defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} - m_ShowUnitySplashScreen: 0 + m_ShowUnitySplashScreen: 1 m_ShowUnitySplashLogo: 1 m_SplashScreenOverlayOpacity: 1 m_SplashScreenAnimation: 1 @@ -49,10 +49,11 @@ PlayerSettings: m_StereoRenderingPath: 0 m_ActiveColorSpace: 0 m_MTRendering: 1 + mipStripping: 0 + numberOfMipsStripped: 0 m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 - displayResolutionDialog: 0 iosUseCustomAppBackgroundBehavior: 0 iosAllowHTTPDownload: 1 allowedAutorotateToPortrait: 1 @@ -65,7 +66,14 @@ PlayerSettings: disableDepthAndStencilBuffers: 0 androidStartInFullscreen: 1 androidRenderOutsideSafeArea: 0 + androidUseSwappy: 0 androidBlitType: 0 + androidResizableWindow: 0 + androidDefaultWindowWidth: 1920 + androidDefaultWindowHeight: 1080 + androidMinimumWindowWidth: 400 + androidMinimumWindowHeight: 300 + androidFullscreenMode: 1 defaultIsNativeResolution: 1 macRetinaSupport: 1 runInBackground: 1 @@ -79,11 +87,11 @@ PlayerSettings: usePlayerLog: 1 bakeCollisionMeshes: 0 forceSingleInstance: 0 + useFlipModelSwapchain: 1 resizableWindow: 0 useMacAppStoreValidation: 0 macAppStoreCategory: public.app-category.games gpuSkinning: 0 - graphicsJobs: 0 xboxPIXTextureCapture: 0 xboxEnableAvatar: 0 xboxEnableKinect: 0 @@ -91,7 +99,6 @@ PlayerSettings: xboxEnableFitness: 0 visibleInBackground: 1 allowFullscreenSwitch: 1 - graphicsJobMode: 0 fullscreenMode: 0 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 @@ -114,7 +121,13 @@ PlayerSettings: switchNVNOtherPoolsGranularity: 16777216 switchNVNMaxPublicTextureIDCount: 0 switchNVNMaxPublicSamplerIDCount: 0 + stadiaPresentMode: 0 + stadiaTargetFramerate: 0 + vulkanNumSwapchainBuffers: 3 vulkanEnableSetSRGBWrite: 0 + vulkanEnablePreTransform: 0 + vulkanEnableLateAcquireNextImage: 0 + vulkanEnableCommandBufferRecycling: 1 m_SupportedAspectRatios: 4:3: 1 5:4: 1 @@ -128,45 +141,29 @@ PlayerSettings: m_HolographicPauseOnTrackingLoss: 1 xboxOneDisableKinectGpuReservation: 0 xboxOneEnable7thCore: 0 - isWsaHolographicRemotingEnabled: 0 vrSettings: - cardboard: - depthFormat: 0 - enableTransitionView: 0 - daydream: - depthFormat: 0 - useSustainedPerformanceMode: 0 - enableVideoLayer: 0 - useProtectedVideoMemory: 0 - minimumSupportedHeadTracking: 0 - maximumSupportedHeadTracking: 1 - hololens: - depthFormat: 1 - depthBufferSharingEnabled: 0 - oculus: - sharedDepthBuffer: 0 - dashSupport: 0 - lowOverheadMode: 0 - protectedContext: 0 - v2Signing: 0 enable360StereoCapture: 0 - protectGraphicsMemory: 0 + isWsaHolographicRemotingEnabled: 0 enableFrameTimingStats: 0 useHDRDisplay: 0 + D3DHDRBitDepth: 0 m_ColorGamuts: 00000000 targetPixelDensity: 30 resolutionScalingMode: 0 + resetResolutionOnWindowResize: 0 androidSupportedAspectRatio: 1 androidMaxAspectRatio: 2.1 applicationIdentifier: Android: com.bugsnag.fixtures.unity.notifier.android - iOS: com.bugsnag.fixtures.unity.notifier.ios + Standalone: com.bugsnag.Mazerunner iPhone: com.bugsnag.fixtures.unity.notifier.ios buildNumber: Standalone: 111 - iOS: 333 + iPhone: 333 + tvOS: 0 + overrideDefaultApplicationIdentifier: 0 AndroidBundleVersionCode: 444 - AndroidMinSdkVersion: 16 + AndroidMinSdkVersion: 19 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: @@ -181,28 +178,16 @@ PlayerSettings: StripUnusedMeshComponents: 0 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 9.0 + iOSTargetOSVersionString: 11.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: 9.0 + tvOSTargetOSVersionString: 11.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 uIRequiresFullScreen: 1 uIStatusBarHidden: 1 uIExitOnSuspend: 0 uIStatusBarStyle: 0 - iPhoneSplashScreen: {fileID: 0} - iPhoneHighResSplashScreen: {fileID: 0} - iPhoneTallHighResSplashScreen: {fileID: 0} - iPhone47inSplashScreen: {fileID: 0} - iPhone55inPortraitSplashScreen: {fileID: 0} - iPhone55inLandscapeSplashScreen: {fileID: 0} - iPhone58inPortraitSplashScreen: {fileID: 0} - iPhone58inLandscapeSplashScreen: {fileID: 0} - iPadPortraitSplashScreen: {fileID: 0} - iPadHighResPortraitSplashScreen: {fileID: 0} - iPadLandscapeSplashScreen: {fileID: 0} - iPadHighResLandscapeSplashScreen: {fileID: 0} appleTVSplashScreen: {fileID: 0} appleTVSplashScreen2x: {fileID: 0} tvOSSmallIconLayers: [] @@ -230,8 +215,8 @@ PlayerSettings: iOSLaunchScreeniPadFillPct: 100 iOSLaunchScreeniPadSize: 100 iOSLaunchScreeniPadCustomXibPath: - iOSUseLaunchScreenStoryboard: 0 iOSLaunchScreenCustomStoryboardPath: + iOSLaunchScreeniPadCustomStoryboardPath: iOSDeviceRequirements: [] iOSURLSchemes: [] iOSBackgroundModes: 0 @@ -249,10 +234,19 @@ PlayerSettings: iOSRequireARKit: 0 iOSAutomaticallyDetectAndAddCapabilities: 1 appleEnableProMotion: 0 + shaderPrecisionModel: 0 clonedFromGUID: 00000000000000000000000000000000 templatePackageId: templateDefaultScene: + useCustomMainManifest: 0 + useCustomLauncherManifest: 0 + useCustomMainGradleTemplate: 0 + useCustomLauncherGradleManifest: 0 + useCustomBaseGradleTemplate: 0 + useCustomGradlePropertiesTemplate: 0 + useCustomProguardFile: 0 AndroidTargetArchitectures: 7 + AndroidTargetDevices: 0 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} AndroidKeystoreName: @@ -263,12 +257,18 @@ PlayerSettings: AndroidEnableTango: 0 androidEnableBanner: 1 androidUseLowAccuracyLocation: 0 + androidUseCustomKeystore: 0 m_AndroidBanners: - width: 320 height: 180 banner: {fileID: 0} androidGamepadSupportLevel: 0 - resolutionDialogBanner: {fileID: 0} + chromeosInputEmulation: 1 + AndroidMinifyWithR8: 0 + AndroidMinifyRelease: 0 + AndroidMinifyDebug: 0 + AndroidValidateAppBundleSize: 1 + AndroidAppBundleSizeToValidate: 150 m_BuildTargetIcons: [] m_BuildTargetPlatformIcons: - m_BuildTarget: Android @@ -364,11 +364,54 @@ PlayerSettings: m_Kind: 1 m_SubKind: m_BuildTargetBatching: [] - m_BuildTargetGraphicsAPIs: [] + m_BuildTargetGraphicsJobs: + - m_BuildTarget: GameCoreScarlettSupport + m_GraphicsJobs: 0 + - m_BuildTarget: Switch + m_GraphicsJobs: 0 + - m_BuildTarget: iOSSupport + m_GraphicsJobs: 0 + - m_BuildTarget: LuminSupport + m_GraphicsJobs: 0 + - m_BuildTarget: MacStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: PS5Player + m_GraphicsJobs: 0 + - m_BuildTarget: WebGLSupport + m_GraphicsJobs: 0 + - m_BuildTarget: AppleTVSupport + m_GraphicsJobs: 0 + - m_BuildTarget: GameCoreXboxOneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: CloudRendering + m_GraphicsJobs: 0 + - m_BuildTarget: WindowsStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: PS4Player + m_GraphicsJobs: 0 + - m_BuildTarget: MetroSupport + m_GraphicsJobs: 0 + - m_BuildTarget: AndroidPlayer + m_GraphicsJobs: 0 + - m_BuildTarget: BJMSupport + m_GraphicsJobs: 0 + - m_BuildTarget: LinuxStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobs: 0 + m_BuildTargetGraphicsJobMode: + - m_BuildTarget: PS4Player + m_GraphicsJobMode: 0 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobMode: 0 + m_BuildTargetGraphicsAPIs: + - m_BuildTarget: iOSSupport + m_APIs: 10000000 + m_Automatic: 1 m_BuildTargetVRSettings: [] - m_BuildTargetEnableVuforiaSettings: [] openGLRequireES31: 0 openGLRequireES31AEP: 0 + openGLRequireES32: 0 m_TemplateCustomTags: {} mobileMTRendering: Android: 1 @@ -376,6 +419,7 @@ PlayerSettings: tvOS: 1 m_BuildTargetGroupLightmapEncodingQuality: [] m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetNormalMapEncoding: [] playModeTestRunnerEnabled: 0 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 @@ -385,6 +429,7 @@ PlayerSettings: cameraUsageDescription: locationUsageDescription: microphoneUsageDescription: + bluetoothUsageDescription: switchNMETAOverride: Application.aarch64.lp64.nmeta switchNetLibKey: switchSocketMemoryPoolSize: 6144 @@ -392,6 +437,7 @@ PlayerSettings: switchSocketConcurrencyLimit: 14 switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 + switchUseGOLDLinker: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: switchTitleNames_0: @@ -520,6 +566,12 @@ PlayerSettings: switchSocketInitializeEnabled: 1 switchNetworkInterfaceManagerInitializeEnabled: 1 switchPlayerConnectionEnabled: 1 + switchUseNewStyleFilepaths: 0 + switchUseLegacyFmodPriorities: 1 + switchUseMicroSleepForYield: 1 + switchEnableRamDiskSupport: 0 + switchMicroSleepForYieldTime: 25 + switchRamDiskSpaceSize: 12 ps4NPAgeRating: 12 ps4NPTitleSecret: ps4NPTrophyPackPath: @@ -559,6 +611,7 @@ PlayerSettings: ps4DownloadDataSize: 0 ps4GarlicHeapSize: 2048 ps4ProGarlicHeapSize: 2560 + playerPrefsMaxSize: 32768 ps4Passcode: 5PN2qmWqBlQ9wQj99nsQzldVI5ZuGXbE ps4pnSessions: 1 ps4pnPresence: 1 @@ -571,6 +624,7 @@ PlayerSettings: ps4UseResolutionFallback: 0 ps4ReprojectionSupport: 0 ps4UseAudio3dBackend: 0 + ps4UseLowGarlicFragmentationMode: 1 ps4SocialScreenEnabled: 0 ps4ScriptOptimizationLevel: 0 ps4Audio3dVirtualSpeakerCount: 14 @@ -588,12 +642,15 @@ PlayerSettings: ps4videoRecordingFeaturesUsed: 0 ps4contentSearchFeaturesUsed: 0 ps4CompatibilityPS5: 0 + ps4AllowPS5Detection: 0 ps4GPU800MHz: 1 ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] + ps4attribVROutputEnabled: 0 monoEnv: splashScreenBackgroundSourceLandscape: {fileID: 0} splashScreenBackgroundSourcePortrait: {fileID: 0} + blurSplashScreenBackground: 1 spritePackerPolicy: webGLMemorySize: 256 webGLExceptionSupport: 3 @@ -606,20 +663,31 @@ PlayerSettings: webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 webGLCompressionFormat: 2 + webGLWasmArithmeticExceptions: 0 webGLLinkerTarget: 1 webGLThreadsSupport: 0 + webGLDecompressionFallback: 0 scriptingDefineSymbols: 4: UNITY_ASSERTIONS 7: UNITY_ASSERTIONS + additionalCompilerArguments: {} platformArchitecture: {} scriptingBackend: Android: 1 + Standalone: 1 il2cppCompilerConfiguration: {} managedStrippingLevel: {} incrementalIl2cppBuild: {} + suppressCommonWarnings: 1 allowUnsafeCode: 0 + useDeterministicCompilation: 1 + useReferenceAssemblies: 1 + enableRoslynAnalyzers: 1 additionalIl2CppArgs: scriptingRuntimeVersion: 1 + gcIncremental: 1 + assemblyVersionValidation: 1 + gcWBarrierValidation: 0 apiCompatibilityLevelPerPlatform: {} m_RenderingPath: 1 m_MobileRenderingPath: 1 @@ -650,7 +718,7 @@ PlayerSettings: metroFTAName: metroFTAFileTypes: [] metroProtocolName: - metroCompilationOverrides: 1 + vcxProjDefaultLanguage: XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: @@ -669,18 +737,16 @@ PlayerSettings: XboxOneCapability: [] XboxOneGameRating: {} XboxOneIsContentPackage: 0 + XboxOneEnhancedXboxCompatibilityMode: 0 XboxOneEnableGPUVariability: 0 XboxOneSockets: {} XboxOneSplashScreen: {fileID: 0} XboxOneAllowedProductIds: [] XboxOnePersistentLocalStorageSize: 0 XboxOneXTitleMemory: 8 - xboxOneScriptCompiler: 0 XboxOneOverrideIdentityName: - vrEditorSettings: - daydream: - daydreamIconForeground: {fileID: 0} - daydreamIconBackground: {fileID: 0} + XboxOneOverrideIdentityPublisher: + vrEditorSettings: {} cloudServicesEnabled: {} luminIcon: m_Name: @@ -688,24 +754,19 @@ PlayerSettings: m_PortalFolderPath: luminCert: m_CertPath: - m_PrivateKeyPath: + m_SignPackage: 1 luminIsChannelApp: 0 luminVersion: m_VersionCode: 1 m_VersionName: - facebookSdkVersion: 7.9.4 - facebookAppId: - facebookCookies: 1 - facebookLogging: 1 - facebookStatus: 1 - facebookXfbml: 0 - facebookFrictionlessRequests: 1 apiCompatibilityLevel: 3 + activeInputHandler: 0 + windowsGamepadBackendHint: 0 cloudProjectId: framebufferDepthMemorylessMode: 0 + qualitySettingsNames: [] projectName: organizationId: cloudEnabled: 0 - enableNativePlatformBackendsForNewInputSystem: 0 - disableOldInputManagerSupport: 0 legacyClampBlendShapeWeights: 1 + virtualTexturingSupportEnabled: 0 From 68d2fa409a392d5fe8d5d80fbd72904c7a02b230 Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Wed, 21 Aug 2024 10:58:34 +0100 Subject: [PATCH 14/21] [full ci] --- .buildkite/pipeline.linux.full.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.linux.full.yml b/.buildkite/pipeline.linux.full.yml index 8b1b39899..6ee35efb3 100644 --- a/.buildkite/pipeline.linux.full.yml +++ b/.buildkite/pipeline.linux.full.yml @@ -47,7 +47,7 @@ steps: upload: - unity.log - unity_import.log - - c/linux-release-2021.zip + - features/fixtures/maze_runner/build/linux-release-2021.zip retry: automatic: - exit_status: "*" From 2f7beaef30f01e25fb646a4d8d7bc3e52398814f Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Thu, 22 Aug 2024 16:22:02 +0100 Subject: [PATCH 15/21] [full ci] --- .buildkite/pipeline.linux.full.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.linux.full.yml b/.buildkite/pipeline.linux.full.yml index 6ee35efb3..5f8c515c7 100644 --- a/.buildkite/pipeline.linux.full.yml +++ b/.buildkite/pipeline.linux.full.yml @@ -125,7 +125,7 @@ steps: env: UNITY_VERSION: *2020 agents: - queue: "opensource-ubuntu-1804-unity" + queue: "buildkite-unity-i-01d4fe46553eefabc-1" plugins: artifacts#v1.9.0: download: @@ -142,7 +142,7 @@ steps: env: UNITY_VERSION: *2021 agents: - queue: "opensource-ubuntu-1804-unity" + queue: "buildkite-unity-i-01d4fe46553eefabc-1" plugins: artifacts#v1.9.0: download: @@ -159,7 +159,7 @@ steps: env: UNITY_VERSION: *2021 agents: - queue: "opensource-ubuntu-1804-unity" + queue: "buildkite-unity-i-01d4fe46553eefabc-1" plugins: artifacts#v1.9.0: download: @@ -176,7 +176,7 @@ steps: env: UNITY_VERSION: *2022 agents: - queue: "opensource-ubuntu-1804-unity" + queue: "buildkite-unity-i-01d4fe46553eefabc-1" plugins: artifacts#v1.9.0: download: @@ -193,7 +193,7 @@ steps: env: UNITY_VERSION: *2023 agents: - queue: "opensource-ubuntu-1804-unity" + queue: "buildkite-unity-i-01d4fe46553eefabc-1" plugins: artifacts#v1.9.0: download: From effb21e0201a25a5420c43cd208c00a5a21fdec7 Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Fri, 23 Aug 2024 09:10:33 +0100 Subject: [PATCH 16/21] [full ci] --- .buildkite/pipeline.linux.full.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.linux.full.yml b/.buildkite/pipeline.linux.full.yml index 5f8c515c7..6ee35efb3 100644 --- a/.buildkite/pipeline.linux.full.yml +++ b/.buildkite/pipeline.linux.full.yml @@ -125,7 +125,7 @@ steps: env: UNITY_VERSION: *2020 agents: - queue: "buildkite-unity-i-01d4fe46553eefabc-1" + queue: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -142,7 +142,7 @@ steps: env: UNITY_VERSION: *2021 agents: - queue: "buildkite-unity-i-01d4fe46553eefabc-1" + queue: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -159,7 +159,7 @@ steps: env: UNITY_VERSION: *2021 agents: - queue: "buildkite-unity-i-01d4fe46553eefabc-1" + queue: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -176,7 +176,7 @@ steps: env: UNITY_VERSION: *2022 agents: - queue: "buildkite-unity-i-01d4fe46553eefabc-1" + queue: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: @@ -193,7 +193,7 @@ steps: env: UNITY_VERSION: *2023 agents: - queue: "buildkite-unity-i-01d4fe46553eefabc-1" + queue: "opensource-ubuntu-1804-unity" plugins: artifacts#v1.9.0: download: From 95406d5af85a72b02e3793812621d9dbde0a52ae Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Tue, 27 Aug 2024 10:05:35 +0100 Subject: [PATCH 17/21] [full ci] --- .buildkite/pipeline.linux.full.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.buildkite/pipeline.linux.full.yml b/.buildkite/pipeline.linux.full.yml index 6ee35efb3..d7c2456ee 100644 --- a/.buildkite/pipeline.linux.full.yml +++ b/.buildkite/pipeline.linux.full.yml @@ -8,6 +8,8 @@ aliases: agents: queue: macos-14 +timeout_in_minutes: 60 + steps: # # Build Linux test fixtures From 439ab03dff15a46849e1b81a0216df6b0cf3f61c Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Tue, 27 Aug 2024 10:36:30 +0100 Subject: [PATCH 18/21] skip failing linux builds --- .buildkite/pipeline.linux.full.yml | 148 +++++++++++++++-------------- 1 file changed, 77 insertions(+), 71 deletions(-) diff --git a/.buildkite/pipeline.linux.full.yml b/.buildkite/pipeline.linux.full.yml index d7c2456ee..e2a4f65ee 100644 --- a/.buildkite/pipeline.linux.full.yml +++ b/.buildkite/pipeline.linux.full.yml @@ -14,25 +14,27 @@ steps: # # Build Linux test fixtures # - - label: Build Unity 2020 Linux test fixture - timeout_in_minutes: 30 - key: "linux-2020-fixture" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2020 - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - unity.log - - features/fixtures/maze_runner/build/linux-release-2020.zip - commands: - - scripts/ci-build-linux-fixture.sh release - retry: - automatic: - - exit_status: "*" - limit: 1 + +# Skipped - PLAT-12628 +# - label: Build Unity 2020 Linux test fixture +# timeout_in_minutes: 30 +# key: "linux-2020-fixture" +# depends_on: "build-artifacts" +# env: +# UNITY_VERSION: *2020 +# plugins: +# artifacts#v1.9.0: +# download: +# - Bugsnag.unitypackage +# upload: +# - unity.log +# - features/fixtures/maze_runner/build/linux-release-2020.zip +# commands: +# - scripts/ci-build-linux-fixture.sh release +# retry: +# automatic: +# - exit_status: "*" +# limit: 1 - label: Build Unity 2021 linux test fixture timeout_in_minutes: 30 @@ -55,26 +57,27 @@ steps: - exit_status: "*" limit: 1 - - label: Build Unity 2021 linux DEV test fixture - timeout_in_minutes: 30 - key: "linux-2021-dev-fixture" - depends_on: "build-artifacts" - env: - UNITY_VERSION: *2021 - commands: - - scripts/ci-build-linux-fixture.sh dev - plugins: - artifacts#v1.9.0: - download: - - Bugsnag.unitypackage - upload: - - unity.log - - unity_import.log - - features/fixtures/maze_runner/build/linux-dev-2021.zip - retry: - automatic: - - exit_status: "*" - limit: 1 +# Skipped - PLAT-12629 +# - label: Build Unity 2021 linux DEV test fixture +# timeout_in_minutes: 30 +# key: "linux-2021-dev-fixture" +# depends_on: "build-artifacts" +# env: +# UNITY_VERSION: *2021 +# commands: +# - scripts/ci-build-linux-fixture.sh dev +# plugins: +# artifacts#v1.9.0: +# download: +# - Bugsnag.unitypackage +# upload: +# - unity.log +# - unity_import.log +# - features/fixtures/maze_runner/build/linux-dev-2021.zip +# retry: +# automatic: +# - exit_status: "*" +# limit: 1 - label: Build Unity 2022 linux test fixture timeout_in_minutes: 30 @@ -121,22 +124,24 @@ steps: # # Run linux e2e tests # - - label: Run linux e2e tests for Unity 2020 - timeout_in_minutes: 30 - depends_on: "linux-2020-fixture" - env: - UNITY_VERSION: *2020 - agents: - queue: "opensource-ubuntu-1804-unity" - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/linux-release-2020.zip - upload: - - maze_output/**/* - - maze_output/metrics.csv - command: - - scripts/ci-run-linux-tests.sh release + +# Skipped - PLAT-12628 +# - label: Run linux e2e tests for Unity 2020 +# timeout_in_minutes: 30 +# depends_on: "linux-2020-fixture" +# env: +# UNITY_VERSION: *2020 +# agents: +# queue: "opensource-ubuntu-1804-unity" +# plugins: +# artifacts#v1.9.0: +# download: +# - features/fixtures/maze_runner/build/linux-release-2020.zip +# upload: +# - maze_output/**/* +# - maze_output/metrics.csv +# command: +# - scripts/ci-run-linux-tests.sh release - label: Run linux e2e tests for Unity 2021 timeout_in_minutes: 30 @@ -172,22 +177,23 @@ steps: commands: - scripts/ci-run-linux-tests.sh dev - - label: Run linux e2e tests for Unity 2022 - timeout_in_minutes: 30 - depends_on: "linux-2022-fixture" - env: - UNITY_VERSION: *2022 - agents: - queue: "opensource-ubuntu-1804-unity" - plugins: - artifacts#v1.9.0: - download: - - features/fixtures/maze_runner/build/linux-release-2022.zip - upload: - - maze_output/**/* - - maze_output/metrics.csv - commands: - - scripts/ci-run-linux-tests.sh release +# Skipped - PLAT-12629 +# - label: Run linux e2e tests for Unity 2022 +# timeout_in_minutes: 30 +# depends_on: "linux-2022-fixture" +# env: +# UNITY_VERSION: *2022 +# agents: +# queue: "opensource-ubuntu-1804-unity" +# plugins: +# artifacts#v1.9.0: +# download: +# - features/fixtures/maze_runner/build/linux-release-2022.zip +# upload: +# - maze_output/**/* +# - maze_output/metrics.csv +# commands: +# - scripts/ci-run-linux-tests.sh release - label: Run linux e2e tests for Unity 2023 timeout_in_minutes: 30 From 313a489a1e62315550dea8f5b7ca7db7f11bde6c Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Tue, 27 Aug 2024 10:56:41 +0100 Subject: [PATCH 19/21] [full ci] --- .buildkite/block.full.yml | 1 + .buildkite/pipeline_trigger.sh | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.buildkite/block.full.yml b/.buildkite/block.full.yml index f588545a0..d4198254a 100644 --- a/.buildkite/block.full.yml +++ b/.buildkite/block.full.yml @@ -9,5 +9,6 @@ steps: 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.linux.full.yml && echo "Waiting on https://smartbear.atlassian.net/browse/PLAT-12563 buildkite-agent pipeline upload .buildkite/pipeline.linux.full.yml" && buildkite-agent pipeline upload .buildkite/pipeline.webgl.full.yml diff --git a/.buildkite/pipeline_trigger.sh b/.buildkite/pipeline_trigger.sh index e2c393cf4..d5c032b6f 100755 --- a/.buildkite/pipeline_trigger.sh +++ b/.buildkite/pipeline_trigger.sh @@ -6,13 +6,12 @@ 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.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 - # Waiting on https://smartbear.atlassian.net/browse/PLAT-12563 + 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.linux.full.yml -# buildkite-agent pipeline upload .buildkite/pipeline.webgl.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" From 7a532ae8e219597ba7845473754cadd29444f336 Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Mon, 2 Sep 2024 16:03:16 +0100 Subject: [PATCH 20/21] update linux build script --- scripts/ci-run-linux-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci-run-linux-tests.sh b/scripts/ci-run-linux-tests.sh index ee35d719b..a75ebeeb0 100755 --- a/scripts/ci-run-linux-tests.sh +++ b/scripts/ci-run-linux-tests.sh @@ -23,4 +23,4 @@ pushd features/fixtures/maze_runner/build popd bundle install -bundle exec maze-runner --app=$APP_PATH --os=linux features/csharp +bundle exec maze-runner --app=$APP_PATH --os=macos features/csharp From 8cb3f4eba1b42aa01050c534e02a8ee6f0f32a7a Mon Sep 17 00:00:00 2001 From: Josh Edney Date: Mon, 2 Sep 2024 16:19:20 +0100 Subject: [PATCH 21/21] [full ci] --- .buildkite/block.full.yml | 12 ++++++------ .buildkite/pipeline.linux.full.yml | 1 + .buildkite/pipeline_trigger.sh | 10 +++++----- scripts/ci-run-linux-tests.sh | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.buildkite/block.full.yml b/.buildkite/block.full.yml index d4198254a..8eb74d563 100644 --- a/.buildkite/block.full.yml +++ b/.buildkite/block.full.yml @@ -5,10 +5,10 @@ steps: - label: 'Upload the full test pipeline' depends_on: 'trigger-full-build' 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.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.linux.full.yml && - echo "Waiting on https://smartbear.atlassian.net/browse/PLAT-12563 buildkite-agent pipeline upload .buildkite/pipeline.linux.full.yml" && - buildkite-agent pipeline upload .buildkite/pipeline.webgl.full.yml +# echo "Waiting on https://smartbear.atlassian.net/browse/PLAT-12563 buildkite-agent pipeline upload .buildkite/pipeline.linux.full.yml" && +# buildkite-agent pipeline upload .buildkite/pipeline.webgl.full.yml diff --git a/.buildkite/pipeline.linux.full.yml b/.buildkite/pipeline.linux.full.yml index e2a4f65ee..48ccad5df 100644 --- a/.buildkite/pipeline.linux.full.yml +++ b/.buildkite/pipeline.linux.full.yml @@ -148,6 +148,7 @@ steps: depends_on: "linux-2021-fixture" env: UNITY_VERSION: *2021 + DEBUG: "true" agents: queue: "opensource-ubuntu-1804-unity" plugins: diff --git a/.buildkite/pipeline_trigger.sh b/.buildkite/pipeline_trigger.sh index d5c032b6f..40d254266 100755 --- a/.buildkite/pipeline_trigger.sh +++ b/.buildkite/pipeline_trigger.sh @@ -6,12 +6,12 @@ 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.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.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.linux.full.yml - buildkite-agent pipeline upload .buildkite/pipeline.webgl.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/scripts/ci-run-linux-tests.sh b/scripts/ci-run-linux-tests.sh index a75ebeeb0..ee35d719b 100755 --- a/scripts/ci-run-linux-tests.sh +++ b/scripts/ci-run-linux-tests.sh @@ -23,4 +23,4 @@ pushd features/fixtures/maze_runner/build popd bundle install -bundle exec maze-runner --app=$APP_PATH --os=macos features/csharp +bundle exec maze-runner --app=$APP_PATH --os=linux features/csharp