Skip to content

Add linker settings for SyndiKit target #418

Add linker settings for SyndiKit target

Add linker settings for SyndiKit target #418

Workflow file for this run

name: SyndiKit
on:
push:
branches:
- main
- 'v[0-9]+.[0-9]+.[0-9]+'
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
- '.github/ISSUE_TEMPLATE/**'
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
- '.github/ISSUE_TEMPLATE/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
env:
PACKAGE_NAME: SyndiKit
jobs:
configure:
name: Configure Matrix
runs-on: ubuntu-latest
outputs:
full-matrix: ${{ steps.matrix.outputs.full-matrix }}
ubuntu-os: ${{ steps.matrix.outputs.ubuntu-os }}
ubuntu-swift: ${{ steps.matrix.outputs.ubuntu-swift }}
ubuntu-type: ${{ steps.matrix.outputs.ubuntu-type }}
steps:
- id: check
name: Determine matrix scope
run: |
FULL=false
REF="${{ github.ref }}"
EVENT="${{ github.event_name }}"
BASE_REF="${{ github.base_ref }}"
if [[ "$REF" == "refs/heads/main" ]]; then
FULL=true
elif [[ "$REF" == "refs/pull/124/merge" ]]; then
FULL=true
elif [[ "$REF" =~ ^refs/heads/v?[0-9]+\.[0-9]+\.[0-9]+ ]]; then
FULL=true
elif [[ "$EVENT" == "workflow_dispatch" ]]; then
FULL=true
elif [[ "$EVENT" == "pull_request" ]]; then
if [[ "$BASE_REF" == "main" || "$BASE_REF" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+ ]]; then
FULL=true
fi
fi
echo "full=$FULL" >> "$GITHUB_OUTPUT"
- id: matrix
name: Build matrix values
run: |
if [[ "${{ steps.check.outputs.full }}" == "true" ]]; then
echo 'full-matrix=true' >> "$GITHUB_OUTPUT"
echo 'ubuntu-os=["noble","jammy"]' >> "$GITHUB_OUTPUT"
echo 'ubuntu-swift=[{"version":"5.10"},{"version":"6.0"},{"version":"6.1"},{"version":"6.2"},{"version":"6.3"}]' >> "$GITHUB_OUTPUT"
echo 'ubuntu-type=["","wasm","wasm-embedded"]' >> "$GITHUB_OUTPUT"
else
echo 'full-matrix=false' >> "$GITHUB_OUTPUT"
echo 'ubuntu-os=["noble"]' >> "$GITHUB_OUTPUT"
echo 'ubuntu-swift=[{"version":"6.3"}]' >> "$GITHUB_OUTPUT"
echo 'ubuntu-type=[""]' >> "$GITHUB_OUTPUT"
fi
build-ubuntu:
name: Build on Ubuntu
needs: configure
runs-on: ubuntu-latest
container: swift:${{ matrix.swift.version }}-${{ matrix.os }}
strategy:
matrix:
os: ${{ fromJSON(needs.configure.outputs.ubuntu-os) }}
swift: ${{ fromJSON(needs.configure.outputs.ubuntu-swift) }}
type: ${{ fromJSON(needs.configure.outputs.ubuntu-type) }}
exclude:
- swift: {version: "5.10"}
type: wasm
- swift: {version: "5.10"}
type: wasm-embedded
- swift: {version: "6.0"}
type: wasm
- swift: {version: "6.0"}
type: wasm-embedded
- swift: {version: "6.1"}
type: wasm
- swift: {version: "6.1"}
type: wasm-embedded
steps:
- uses: actions/checkout@v6
- id: build
uses: brightdigit/swift-build@v1
with:
type: ${{ matrix.type }}
skip-package-resolved: ${{ contains(matrix.swift.version, '5.') }}
- name: Install curl
if: steps.build.outputs.contains-code-coverage == 'true'
run: |
apt-get update -q
apt-get install -y curl
- name: Process Coverage
if: steps.build.outputs.contains-code-coverage == 'true'
uses: sersoft-gmbh/swift-coverage-action@v5
with:
fail-on-empty-output: true
- name: Upload coverage to Codecov
if: steps.build.outputs.contains-code-coverage == 'true'
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: spm,${{ matrix.os }},${{ matrix.swift.version }}
build-macos:
name: Build on macOS
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
# SPM Build Matrix - Xcode 15.4
- runs-on: macos-14
xcode: "/Applications/Xcode_15.4.app"
# SPM Build Matrix - Xcode 16.4
- runs-on: macos-15
xcode: "/Applications/Xcode_16.4.app"
# SPM Build Matrix - Xcode 26.4
- runs-on: macos-26
xcode: "/Applications/Xcode_26.4.app"
# macOS Build Matrix - Xcode 15.4
- type: macos
runs-on: macos-14
xcode: "/Applications/Xcode_15.4.app"
# macOS Build Matrix - Xcode 16.4
- type: macos
runs-on: macos-15
xcode: "/Applications/Xcode_16.4.app"
# macOS Build Matrix - Xcode 26.4
- type: macos
runs-on: macos-26
xcode: "/Applications/Xcode_26.4.app"
# iOS Build Matrix - Xcode 15.4
- type: ios
runs-on: macos-14
xcode: "/Applications/Xcode_15.4.app"
deviceName: "iPhone 15 Pro"
osVersion: "17.5"
# iOS Build Matrix - Xcode 16.4
- type: ios
runs-on: macos-15
xcode: "/Applications/Xcode_16.4.app"
deviceName: "iPhone 16"
osVersion: "18.5"
# iOS Build Matrix - Xcode 26.4
- type: ios
runs-on: macos-26
xcode: "/Applications/Xcode_26.4.app"
deviceName: "iPhone 17"
osVersion: "26.4"
download-platform: true
# watchOS Build Matrix - Xcode 15.4
- type: watchos
runs-on: macos-14
xcode: "/Applications/Xcode_15.4.app"
deviceName: "Apple Watch Series 9 (41mm)"
osVersion: "10.5"
# watchOS Build Matrix - Xcode 16.4
- type: watchos
runs-on: macos-15
xcode: "/Applications/Xcode_16.4.app"
deviceName: "Apple Watch Ultra 2 (49mm)"
osVersion: "11.5"
# watchOS Build Matrix - Xcode 26.4
- type: watchos
runs-on: macos-26
xcode: "/Applications/Xcode_26.4.app"
deviceName: "Apple Watch Ultra 3 (49mm)"
osVersion: "26.4"
download-platform: true
# tvOS Build Matrix - Xcode 16.4
- type: tvos
runs-on: macos-15
xcode: "/Applications/Xcode_16.4.app"
deviceName: "Apple TV 4K (3rd generation)"
osVersion: "18.5"
# tvOS Build Matrix - Xcode 26.4
- type: tvos
runs-on: macos-26
xcode: "/Applications/Xcode_26.4.app"
deviceName: "Apple TV 4K (3rd generation)"
osVersion: "26.4"
download-platform: true
# visionOS Build Matrix - Xcode 16.4
- type: visionos
runs-on: macos-15
xcode: "/Applications/Xcode_16.4.app"
deviceName: "Apple Vision Pro"
osVersion: "2.5"
# visionOS Build Matrix - Xcode 26.4
- type: visionos
runs-on: macos-26
xcode: "/Applications/Xcode_26.4.app"
deviceName: "Apple Vision Pro"
osVersion: "26.4"
download-platform: true
steps:
- uses: actions/checkout@v6
- name: Disable Xcode macro fingerprint validation
if: ${{ contains(matrix.xcode, 'Xcode_15.4') && matrix.type != '' }}
run: defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
- id: build
name: Build and Test
uses: brightdigit/swift-build@v1
with:
scheme: ${{ env.PACKAGE_NAME }}
type: ${{ matrix.type }}
xcode: ${{ matrix.xcode }}
deviceName: ${{ matrix.deviceName }}
osVersion: ${{ matrix.osVersion }}
download-platform: ${{ matrix.download-platform }}
build-only: ${{ contains(matrix.xcode, 'Xcode_15.4') && matrix.type != '' }}
skip-package-resolved: ${{ contains(matrix.xcode, 'Xcode_15.4') }}
- name: Process Coverage
if: ${{ steps.build.outputs.contains-code-coverage == 'true' }}
uses: sersoft-gmbh/swift-coverage-action@v5
with:
fail-on-empty-output: true
search-paths: |
./.build
/Users/runner/work/_temp/DerivedData
- name: Upload Coverage
if: ${{ steps.build.outputs.contains-code-coverage == 'true' }}
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.type && format('{0}{1}', matrix.type, matrix.osVersion) || 'spm' }}
build-windows:
name: Build on Windows
needs: [configure]
if: needs.configure.outputs.full-matrix == 'true'
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [windows-2022, windows-2025]
swift:
- version: swift-6.1-release
build: 6.1-RELEASE
- version: swift-6.2-release
build: 6.2-RELEASE
- version: swift-6.3-release
build: 6.3-RELEASE
steps:
- uses: actions/checkout@v6
- uses: brightdigit/swift-build@v1
with:
windows-swift-version: ${{ matrix.swift.version }}
windows-swift-build: ${{ matrix.swift.build }}
build-android:
name: Build on Android
needs: [configure]
if: needs.configure.outputs.full-matrix == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
swift:
- version: "6.1"
- version: "6.2"
- version: "6.3"
android-api-level: [28, 33, 36]
steps:
- uses: actions/checkout@v6
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get clean
sudo docker image prune --all --force
- uses: brightdigit/swift-build@v1
with:
type: android
android-swift-version: ${{ matrix.swift.version }}
android-api-level: ${{ matrix.android-api-level }}
android-run-tests: true
android-copy-files: Data/
lint:
name: Linting
if: ${{ always() && !cancelled() && !failure() }}
runs-on: ubuntu-latest
needs: [build-ubuntu, build-macos, build-windows, build-android]
env:
MINT_PATH: .mint/lib
MINT_LINK_PATH: .mint/bin
steps:
- uses: actions/checkout@v6
- name: Cache mint
id: cache-mint
uses: actions/cache@v4
env:
cache-name: cache
with:
path: |
.mint
Mint
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: |
${{ runner.os }}-mint-
- name: Install mint
if: steps.cache-mint.outputs.cache-hit == ''
run: |
git clone https://github.com/yonaskolb/Mint.git
cd Mint
swift run mint install yonaskolb/mint
- name: Lint
run: ./Scripts/lint.sh
swift-source-compat-suite:
name: Test Swift 6.x For Source Compatibility Suite
runs-on: ubuntu-latest
strategy:
matrix:
container:
- swift:6.0
- swift:6.1
- swift:6.2
- swift:6.3
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v6
- name: Run Swift 6.x tests
run: swift build --disable-sandbox --verbose --configuration release -Xswiftc -swift-version -Xswiftc 6