Skip to content

Add Linux support

Add Linux support #169

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
spm-15:
name: Build and Test on Xcode 15
runs-on: macos-13
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
- name: Build and Test Framework
run: xcrun swift test -c release --enable-code-coverage -Xswiftc -enable-testing
- name: Prepare Coverage Reports
run: ./Scripts/prepare-coverage-reports.sh
- name: Upload Coverage Reports
if: success()
uses: codecov/codecov-action@v3
spm-package-integration-15:
name: Build Package Integration on Xcode 15
runs-on: macos-13
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
- name: Build Package Integration
run: xcrun swift build -c release --package-path Examples/ExamplePackageIntegration
spm-project-integration-15:
name: Build Project Integration on Xcode 15
runs-on: macos-13
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
- name: Build Project Integration
run: pushd Examples/ExampleProjectIntegration; xcrun xcodebuild build -skipPackagePluginValidation -skipMacroValidation -scheme ExampleProjectIntegration; popd
linux:
name: "Build and Test on Linux"
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Swift Environment
uses: swift-actions/setup-swift@v1
with:
swift-version: 5.9
- name: Build and Test Framework
run: swift test -c release --enable-code-coverage -Xswiftc -enable-testing
- name: Prepare Coverage Reports
run: |
llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/release/SafeDIPackageTests.xctest -instr-profile .build/x86_64-unknown-linux-gnu/release/codecov/default.profdata > coverage.lcov
- name: Upload Coverage Reports
if: success()
uses: codecov/codecov-action@v3
readme-validation:
name: Check Markdown links
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Validate Markdown
uses: gaurav-nelson/github-action-markdown-link-check@v1