Skip to content

Workflows check for file changes #482

Workflows check for file changes

Workflows check for file changes #482

Workflow file for this run

name: Build and Test
on:
workflow_dispatch: {}
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and test
runs-on: macos-14
continue-on-error: true
strategy:
matrix:
include:
- destination: iPhone 15 Pro
xcode: 15.2
- destination: iPhone 14 Pro
xcode: 14.3.1
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
src:
- '.github/workflows/build_and_test.yml'
- 'Sources/**'
- '!Sources/Runestone/Documentation.docc/**'
- 'Tests/**'
- name: Build
if: steps.changes.outputs.src == 'true'
run: |
xcodebuild build-for-testing\
-scheme Runestone\
-sdk iphonesimulator\
-destination "platform=iOS Simulator,name=${{ matrix.destination }},OS=latest"
- name: Test
if: steps.changes.outputs.src == 'true'
run: |
xcodebuild test-without-building\
-scheme Runestone\
-sdk iphonesimulator\
-destination "platform=iOS Simulator,name=${{ matrix.destination }},OS=latest"