Skip to content

Commit a1f292a

Browse files
Support user-provided installer args
* Support user-provided installer args * Added a test
1 parent 5344b96 commit a1f292a

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/test-install.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,27 @@ jobs:
3636

3737
- name: Smoke test
3838
run: cmake -GNinja -S .github/smoke-test -B .cmake-build && cmake --build .cmake-build
39+
40+
windows-installer-args:
41+
name: Test installer arguments on Windows
42+
runs-on: windows-latest
43+
44+
steps:
45+
- uses: actions/checkout@v3
46+
- uses: compnerd/gha-setup-vsdevenv@main
47+
48+
- name: Install Swift without the IDE component
49+
uses: ./
50+
with:
51+
branch: development
52+
tag: DEVELOPMENT-SNAPSHOT-2023-05-20-a
53+
installer-args: OptionsInstallIde=0
54+
55+
- name: Assert that we find swiftc.exe
56+
run: where.exe swiftc.exe
57+
58+
- name: Assert that we don't find sourcekit-lsp.exe
59+
shell: pwsh
60+
run: |
61+
where.exe sourcekit-lsp.exe
62+
if ($LastExitCode -eq 0) { exit 1 }

action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ inputs:
2424
description: 'Optional Github token for fetching a release. Only specify when using custom toolchains from non-public Github releases.'
2525
required: false
2626

27+
# common
28+
installer-args:
29+
description: 'Additional arguments to pass to the installer, space-delimited (double quotes are not supported)'
30+
required: false
31+
default: ''
32+
2733
runs:
2834
using: 'composite'
2935

@@ -194,6 +200,8 @@ runs:
194200
}
195201
}
196202
203+
$InstallArgs += "${{ inputs.installer-args }}".Split(" ", [StringSplitOptions]"RemoveEmptyEntries")
204+
197205
$StartTime = Get-Date
198206
Write-Host "Starting Install..."
199207
try {

0 commit comments

Comments
 (0)