mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-26 02:46:30 +08:00
dbc76ec806
* Update swift.yml * Update dotnet.yml * Update python.yml --------- Co-authored-by: Yudong Jin <krahets@163.com>
29 lines
778 B
YAML
29 lines
778 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: ["codes/swift/**/*.swift"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
paths: ["codes/swift/**/*.swift"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Swift ${{ matrix.swift }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
swift: ["5.9", "5.8.1", "5.7.3"]
|
|
steps:
|
|
- uses: swift-actions/setup-swift@v1
|
|
with:
|
|
swift-version: ${{ matrix.swift }}
|
|
- uses: actions/checkout@v4
|
|
- name: Build
|
|
run: swift build --package-path codes/swift
|