2023-10-23 04:28:05 +08:00
|
|
|
# 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"]
|
2023-10-24 23:08:15 +08:00
|
|
|
workflow_dispatch:
|
2023-10-23 04:28:05 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-04-30 15:59:56 +08:00
|
|
|
name: Swift on ${{ matrix.os }}
|
2023-10-23 04:28:05 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-28 22:22:03 +08:00
|
|
|
os: ["ubuntu-22.04", "macos-14"]
|
2023-10-23 04:28:05 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build
|
|
|
|
run: swift build --package-path codes/swift
|