action: simplify the action logic #56
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test install | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
install-swift: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
name: Test Swift toolchain install on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: compnerd/gha-setup-vsdevenv@main | |
if: ${{ runner.os == 'windows' }} | |
- name: Install Swift | |
uses: ./ | |
with: | |
branch: development | |
tag: DEVELOPMENT-SNAPSHOT-2024-08-07-a | |
- name: Check Swift version | |
run: swift --version | |
- name: Install pre-requisites for smoke test | |
if: ${{ runner.os == 'macOS' }} | |
run: brew install ninja | |
- name: Install pre-requisites for smoke test | |
if: ${{ runner.os == 'Linux' }} | |
run: sudo apt-get update && sudo apt-get install -y ninja-build | |
- name: Smoke test | |
run: | | |
cmake -B build -G Ninja -S .github/smoke-test | |
cmake --build build | |
windows-installer-args: | |
name: Test installer arguments on Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: compnerd/gha-setup-vsdevenv@main | |
- name: Install Swift without the IDE component | |
uses: ./ | |
with: | |
branch: development | |
tag: DEVELOPMENT-SNAPSHOT-2024-08-07-a | |
installer-args: OptionsInstallIDE=0 | |
- name: Assert that we find swiftc.exe | |
run: Get-Command swiftc.exe | |
- name: Assert that we don't find sourcekit-lsp.exe | |
shell: pwsh | |
run: | | |
-not (Get-Command sourcekit-lsp.exe -ErrorAction SilentlyContinue) |