Create swift.yml #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-macos: | |
name: Build on macOS | |
runs-on: macos-latest | |
steps: | |
- uses: swift-actions/setup-swift@v2 | |
with: | |
swift-version: "6" | |
- name: Dependencies | |
run: brew install dbus | |
- name: Build with vendored libdbus | |
run: swift build -v | |
- name: Build with system libdbus | |
run: swift build -v -Xswiftc -DCDBUS_SYSTEM | |
- name: Run tests with vendored libdbus | |
run: swift test -v | |
- name: Run tests with system libdbus | |
run: swift test -v -Xswiftc -DCDBUS_SYSTEM | |
build-ubuntu: | |
name: Build on Ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- uses: swift-actions/setup-swift@v2 | |
with: | |
swift-version: "6" | |
- name: Dependencies | |
run: sudo apt-get install -y libdbus-1-dev | |
- name: Build with vendored libdbus | |
run: swift build -v | |
- name: Build with system libdbus | |
run: swift build -v -Xswiftc -DCDBUS_SYSTEM | |
- name: Run tests with vendored libdbus | |
run: swift test -v | |
- name: Run tests with system libdbus | |
run: swift test -v -Xswiftc -DCDBUS_SYSTEM |