Jenkins macOS 빌드에서 Android Performance Tuner protoc 실행 권한 오류
Unity 프로젝트에 Android Performance Tuner(APT)를 설치한 뒤, Jenkins macOS 빌드 머신에서 스크립트 컴파일 시점에 아래 예외가 발생했다.
Exception thrown while invoking [DidReloadScripts] method 'Google.Android.PerformanceTuner.Editor.Initializer:RefreshAssetsCompleted ()' : Win32Exception: ApplicationName='<workspace>/Client/Assets/AndroidPerformanceTuner/Editor/Protoc/mac/protoc', CommandLine='"<workspace>/Client/Assets/AndroidPerformanceTuner_gen/Editor/Proto/dev_tuningfork.proto" --csharp_out "<workspace>/Client/Assets/AndroidPerformanceTuner_gen/Runtime/Scripts" --proto_path "<workspace>/Client/Assets/AndroidPerformanceTuner_gen/Editor/Proto" ', CurrentDirectory='', Native error= Access deniedat System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x002f9] in <9768a808b86b4f53a2ebaf80bce151fe>:0at System.Diagnostics.Process.Start () [0x0003a] in <9768a808b86b4f53a2ebaf80bce151fe>:0at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()at Google.Android.PerformanceTuner.Editor.ProtocCompiler.CompileProto (System.String protoFilePath, System.String[] includePaths, System.String outputPath) [0x000b5] in <workspace>/Client/Assets/AndroidPerformanceTuner/Editor/Scripts/ProtocCompiler.cs:80at Google.Android.PerformanceTuner.Editor.ProtocCompiler.GenerateProtoAndDesc () [0x00016] in <workspace>/Client/Assets/AndroidPerformanceTuner/Editor/Scripts/ProtocCompiler.cs:50at Google.Android.PerformanceTuner.Editor.Initializer+<>c__DisplayClass29_0.<CreateProtoFile>b__0 () [0x00059] in <workspace>/Client/Assets/AndroidPerformanceTuner/Editor/Scripts/Initializer.cs:229at Google.Android.PerformanceTuner.Editor.Initializer.CreateProtoFile (Google.Android.PerformanceTuner.Editor.DevDescriptor devDescriptor) [0x0007e] in <workspace>/Client/Assets/AndroidPerformanceTuner/Editor/Scripts/Initializer.cs:243at Google.Android.PerformanceTuner.Editor.Initializer.Init () [0x0003e] in <workspace>/Client/Assets/AndroidPerformanceTuner/Editor/Scripts/Initializer.cs:138at Google.Android.PerformanceTuner.Editor.Initializer..cctor () [0x0004a] in <workspace>/Client/Assets/AndroidPerformanceTuner/Editor/Scripts/Initializer.cs:112Rethrow as TypeInitializationException: The type initializer for 'Google.Android.PerformanceTuner.Editor.Initializer' threw an exception.APT 에디터 초기화 과정에서 .proto 파일을 C# 코드로 생성하려고 번들된 protoc를 실행하다가 Native error= Access denied로 실패한다.
Jenkins 워크스페이스가 숨김 폴더(~/.jenkins) 아래에 있어 protoc 실행 파일에 대한 권한 문제가 생겼다.
chmod로 protoc에 실행 권한을 주어 해결했다.