mirror of
https://github.com/krahets/hello-algo.git
synced 2026-10-23 22:45:21 +08:00
33 lines
837 B
YAML
33 lines
837 B
YAML
# This workflow will build a Swift project
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
|
|
|
|
name: Swift
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
paths:
|
|
- ".github/workflows/swift.yml"
|
|
- "codes/swift/**/*.swift"
|
|
- "en/codes/swift/**/*.swift"
|
|
pull_request:
|
|
branches: ["main"]
|
|
paths:
|
|
- ".github/workflows/swift.yml"
|
|
- "codes/swift/**/*.swift"
|
|
- "en/codes/swift/**/*.swift"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Swift on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: ["ubuntu-22.04", "macos-14"]
|
|
code-dir: ["codes/swift", "en/codes/swift"]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Build
|
|
run: swift build --package-path ${{ matrix.code-dir }}
|