Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,13 @@ public override void Write(CustomFileWriter writer)

using (writer.WriteBlock("build_script:"))
{
writer.WriteLine($@"- cmd: .\{BuildCmdPath} {InvokedTargets.JoinSpace()}");
writer.WriteLine($@"- sh: ./{BuildCmdPath} {InvokedTargets.JoinSpace()}");
// Invoke the `fallout` local tool (cross-platform) rather than the OS-specific build script.
// AppVeyor runs `- cmd:` lines only on Windows images and `- sh:` lines only on the rest, so
// emit both; the command itself is identical. See GitHub Actions (dotnet fallout) and issue #516.
writer.WriteLine("- cmd: dotnet tool restore");
writer.WriteLine($"- cmd: dotnet fallout {InvokedTargets.JoinSpace()}");
writer.WriteLine("- sh: dotnet tool restore");
writer.WriteLine($"- sh: dotnet fallout {InvokedTargets.JoinSpace()}");
}

if (Cache.Length > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public override void Write(CustomFileWriter writer)

using (writer.WriteBlock("inputs:"))
{
writer.WriteLine($"script: './{BuildCmdPath} {arguments}'");
// Invoke the `fallout` local tool (cross-platform) rather than the OS-specific build script.
// CmdLine@2 runs in the agent's default shell (cmd on Windows, bash elsewhere); `&&` works in
// both. See GitHub Actions (dotnet fallout) and issue #516.
writer.WriteLine($"script: 'dotnet tool restore && dotnet fallout {arguments}'");
}

if (Imports.Count > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ install:
- git submodule update --init --recursive

build_script:
- cmd: .\build.cmd Test
- sh: ./build.cmd Test
- cmd: dotnet tool restore
- cmd: dotnet fallout Test
- sh: dotnet tool restore
- sh: dotnet fallout Test

artifacts:
- path: 'src/*/obj/**'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ stages:
- task: CmdLine@2
displayName: 'Run: Restore'
inputs:
script: './build.cmd Restore --skip'
script: 'dotnet tool restore && dotnet fallout Restore --skip'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
ApiKey: $(ApiKey)
Expand Down Expand Up @@ -99,7 +99,7 @@ stages:
- task: CmdLine@2
displayName: 'Run: Compile'
inputs:
script: './build.cmd Compile --skip'
script: 'dotnet tool restore && dotnet fallout Compile --skip'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
ApiKey: $(ApiKey)
Expand Down Expand Up @@ -134,7 +134,7 @@ stages:
- task: CmdLine@2
displayName: 'Run: Test'
inputs:
script: './build.cmd Test --skip --partition $(System.JobPositionInPhase)/2'
script: 'dotnet tool restore && dotnet fallout Test --skip --partition $(System.JobPositionInPhase)/2'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
ApiKey: $(ApiKey)
Expand Down Expand Up @@ -167,7 +167,7 @@ stages:
- task: CmdLine@2
displayName: 'Run: Coverage'
inputs:
script: './build.cmd Coverage --skip'
script: 'dotnet tool restore && dotnet fallout Coverage --skip'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
ApiKey: $(ApiKey)
Expand Down Expand Up @@ -206,7 +206,7 @@ stages:
- task: CmdLine@2
displayName: 'Run: Restore'
inputs:
script: './build.cmd Restore --skip'
script: 'dotnet tool restore && dotnet fallout Restore --skip'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
ApiKey: $(ApiKey)
Expand Down Expand Up @@ -239,7 +239,7 @@ stages:
- task: CmdLine@2
displayName: 'Run: Compile'
inputs:
script: './build.cmd Compile --skip'
script: 'dotnet tool restore && dotnet fallout Compile --skip'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
ApiKey: $(ApiKey)
Expand Down Expand Up @@ -274,7 +274,7 @@ stages:
- task: CmdLine@2
displayName: 'Run: Test'
inputs:
script: './build.cmd Test --skip --partition $(System.JobPositionInPhase)/2'
script: 'dotnet tool restore && dotnet fallout Test --skip --partition $(System.JobPositionInPhase)/2'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
ApiKey: $(ApiKey)
Expand Down Expand Up @@ -307,7 +307,7 @@ stages:
- task: CmdLine@2
displayName: 'Run: Coverage'
inputs:
script: './build.cmd Coverage --skip'
script: 'dotnet tool restore && dotnet fallout Coverage --skip'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
ApiKey: $(ApiKey)
Expand Down
Loading