Skip to content

action: simplify the action logic #60

action: simplify the action logic

action: simplify the action logic #60

Workflow file for this run

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-2025-02-28-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-2025-02-28-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)