@@ -79,7 +79,8 @@ describe("setup-llvm", () => {
79
79
} )
80
80
81
81
it ( "should setup LLVM" , async ( ) => {
82
- const { binDir } = await setupLLVM ( getVersion ( "llvm" , "true" , await ubuntuVersion ( ) ) , directory , process . arch )
82
+ const osVersion = await ubuntuVersion ( )
83
+ const { binDir } = await setupLLVM ( getVersion ( "llvm" , "true" , osVersion ) , directory , process . arch )
83
84
await testBin ( "clang++" , [ "--version" ] , binDir )
84
85
85
86
expect ( process . env . CC ?. includes ( "clang" ) ) . toBeTruthy ( )
@@ -96,24 +97,27 @@ describe("setup-llvm", () => {
96
97
} )
97
98
98
99
it ( "should find llvm in the cache" , async ( ) => {
99
- const { binDir } = await setupLLVM ( getVersion ( "llvm" , "true" , await ubuntuVersion ( ) ) , directory , process . arch )
100
+ const osVersion = await ubuntuVersion ( )
101
+ const { binDir } = await setupLLVM ( getVersion ( "llvm" , "true" , osVersion ) , directory , process . arch )
100
102
await testBin ( "clang++" , [ "--version" ] , binDir )
101
103
102
- if ( isGitHubCI ( ) ) {
104
+ if ( isGitHubCI ( ) && process . platform !== "linux" ) {
103
105
expect ( binDir ) . toMatch ( process . env . RUNNER_TOOL_CACHE ?? "hostedtoolcache" )
106
+ // TODO returns the install dir on linux
104
107
}
105
108
106
109
expect ( process . env . CC ?. includes ( "clang" ) ) . toBeTruthy ( )
107
110
expect ( process . env . CXX ?. includes ( "clang++" ) ) . toBeTruthy ( )
108
111
109
- if ( isGitHubCI ( ) ) {
112
+ if ( isGitHubCI ( ) && process . platform !== "linux" ) {
110
113
expect ( process . env . CC ) . toMatch ( "hostedtoolcache" )
111
114
expect ( process . env . CXX ) . toMatch ( "hostedtoolcache" )
112
115
}
113
116
} )
114
117
115
118
it ( "should setup clang-tidy and clang-format" , async ( ) => {
116
- const { binDir } = await setupClangTools ( getVersion ( "llvm" , "true" , await ubuntuVersion ( ) ) , directory , process . arch )
119
+ const osVersion = await ubuntuVersion ( )
120
+ const { binDir } = await setupClangTools ( getVersion ( "llvm" , "true" , osVersion ) , directory , process . arch )
117
121
await testBin ( "clang-tidy" , [ "--version" ] , binDir )
118
122
await testBin ( "clang-format" , [ "--version" ] , binDir )
119
123
} )
0 commit comments