Docs/add funding #21
Workflow file for this run
This file contains hidden or 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
| name: Swift Package Cross-Platform CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| apple-build: | |
| name: Build iOS library | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Show Xcode and Swift versions | |
| run: | | |
| xcodebuild -version | |
| swift --version | |
| - name: Build overlayNetwork for iOS | |
| run: xcodebuild -scheme overlayNetwork -destination 'generic/platform=iOS' build | |
| unit-test: | |
| name: Run Swift package tests | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Show Swift version | |
| run: swift --version | |
| - name: Resolve dependencies | |
| run: swift package resolve | |
| - name: Run tests | |
| run: swift test -v | |
| linux-cross-build: | |
| name: Cross-build Linux static SDK | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Restore Swiftly cache | |
| id: swiftly-cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.swiftly | |
| ~/Library/Developer/Toolchains | |
| key: ${{ runner.os }}-swiftly-6.1.2-v2 | |
| - name: Install Swift 6.1.2 toolchain | |
| if: steps.swiftly-cache.outputs.cache-hit != 'true' | |
| run: | | |
| curl -O https://download.swift.org/swiftly/darwin/swiftly.pkg | |
| installer -pkg swiftly.pkg -target CurrentUserHomeDirectory | |
| ~/.swiftly/bin/swiftly init --quiet-shell-followup | |
| . "${SWIFTLY_HOME_DIR:-$HOME/.swiftly}/env.sh" | |
| hash -r | |
| swiftly install 6.1.2 | |
| - name: Select Swift 6.1.2 toolchain | |
| run: | | |
| . "${SWIFTLY_HOME_DIR:-$HOME/.swiftly}/env.sh" | |
| swiftly use 6.1.2 --global-default | |
| hash -r | |
| "$HOME/Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/bin/swift" --version | |
| - name: Restore Static Linux SDK cache | |
| id: static-linux-sdk-cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/Library/org.swift.swiftpm/swift-sdks | |
| key: ${{ runner.os }}-swift-6.1.2-static-linux-sdk-0.0.1-v2 | |
| - name: Install Static Linux SDK | |
| if: steps.static-linux-sdk-cache.outputs.cache-hit != 'true' | |
| run: | | |
| . "${SWIFTLY_HOME_DIR:-$HOME/.swiftly}/env.sh" | |
| hash -r | |
| "$HOME/Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/bin/swift" sdk install \ | |
| https://download.swift.org/swift-6.1.2-release/static-sdk/swift-6.1.2-RELEASE/swift-6.1.2-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz \ | |
| --checksum df0b40b9b582598e7e3d70c82ab503fd6fbfdff71fd17e7f1ab37115a0665b3b | |
| - name: Show installed Swift SDKs | |
| run: | | |
| . "${SWIFTLY_HOME_DIR:-$HOME/.swiftly}/env.sh" | |
| hash -r | |
| "$HOME/Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/bin/swift" sdk list | |
| - name: Cross-build package for Linux | |
| run: | | |
| . "${SWIFTLY_HOME_DIR:-$HOME/.swiftly}/env.sh" | |
| hash -r | |
| "$HOME/Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/bin/swift" --version | |
| "$HOME/Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/bin/swift" build -v --swift-sdk x86_64-swift-linux-musl --build-path .build/linux-musl |