Skip to content

Commit d64fa89

Browse files
committed
use configuration properly
1 parent 460b8dd commit d64fa89

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ jobs:
1010
build:
1111
strategy:
1212
matrix:
13-
# Builds for Debug and Release configurations
14-
configuration: [Debug, Release]
1513
# Builds for Ubuntu, Windows, and macOS
1614
os: [ubuntu-latest, windows-latest, macOS-latest]
1715
fail-fast: false
@@ -20,14 +18,11 @@ jobs:
2018
steps:
2119
- uses: actions/checkout@v3
2220

23-
# setup .NET per the repo global.json
24-
- name: Setup .NET
25-
uses: actions/setup-dotnet@v4
26-
27-
# setup .NET per test session
21+
# setup .NET SDK
2822
- name: Setup .NET
2923
uses: actions/setup-dotnet@v4
3024
with:
25+
global-json-file: 'global.json'
3126
dotnet-version: |
3227
8.x
3328
9.x

build/Program.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ let initializeContext args =
3232
let getBuildParam = Environment.environVar
3333
let DoNothing = ignore
3434

35+
3536
let init args =
3637
initializeContext args
3738

39+
let configuration =
40+
match getBuildParam "CONFIGURATION" with
41+
| s when not (isNullOrWhiteSpace s) -> s
42+
| _ -> "Release"
3843

3944
let ignoreTests =
4045
match
@@ -60,6 +65,7 @@ let init args =
6065
opts.MSBuildParams with
6166
DisableInternalBinLog = true
6267
}
68+
Configuration = DotNet.BuildConfiguration.fromString configuration
6369
}
6470

6571
Target.create "Build" (fun _ -> DotNet.build buildOpts "")
@@ -82,7 +88,7 @@ let init args =
8288

8389
exec
8490
"dotnet"
85-
$"test --blame --blame-hang-timeout 60s --framework {tfm} --logger trx --logger GitHubActions -c Release .\\Ionide.ProjInfo.Tests\\Ionide.ProjInfo.Tests.fsproj"
91+
$"test --blame --blame-hang-timeout 60s --framework {tfm} --logger trx --logger GitHubActions -c {configuration} .\\Ionide.ProjInfo.Tests\\Ionide.ProjInfo.Tests.fsproj"
8692
"test"
8793
(Map.ofSeq [ "BuildNet9", tfmToBuildNet9Map.[tfm].ToString() ])
8894
|> ignore

0 commit comments

Comments
 (0)