Merge pull request #149 from fwcd/capitalize-directories #261
This file contains 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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'macos-13'] | |
swift: ['5.8', '5.9'] | |
exclude: | |
# Compiler crashes due to a bug: https://github.com/fwcd/d2/actions/runs/7880565521/job/21502800704 | |
# TODO: Remove this once we bump D2's minimum Swift version to 5.9+ | |
- os: 'macos-13' | |
swift: '5.8' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install native dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: sudo Scripts/install-build-dependencies-apt | |
- name: Install native dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
# Work around an upstream issue with the runner image: | |
# https://github.com/actions/runner-images/issues/8500 | |
brew upgrade || brew link --overwrite python@3.11 | |
Scripts/install-dependencies-brew | |
- name: Install Swift | |
uses: swift-actions/setup-swift@v1 | |
with: | |
swift-version: ${{ matrix.swift }} | |
- name: Build | |
run: swift build | |
- name: Test | |
run: swift test |