The Setup Sake GitHub Action installs and configures Sake for Swift projects, optimizing build times with caching.
Add this to your GitHub Actions workflow:
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-swift@v2
with:
swift-version: '5.10'
- uses: kattouf/setup-sake@v1
with:
sake-version: 'latest' # or specify a version
sake-config-path: './Sakefile' # Optional
sake-app-path: './SakeApp' # Optional
- run: sake my_sake_commandsake-version: (Optional) Version of Sake to install. Default islatest.sake-config-path: (Optional) Path to Sake config file.sake-app-path: (Optional) Path to SakeApp for caching.
sake_app_prebuilt_binary_path: Path to the cached SakeApp binary.
The SakeApp binary is cached based on the hash of the SakeApp files. This ensures that changes to the SakeApp files will trigger a rebuild, while unchanged files will benefit from the cached binary, speeding up the build process.
- Swift Version: Ensure that Swift is installed on the runner. This action is compatible with Swift 5.10 and above. Use the
actions/setup-swiftaction to manage Swift versions in your workflow.
- Faster Builds: Caches SakeApp binary based on file hash.
- Version Control: Ensures consistent Sake version.
MIT License. See LICENSE for details.
For issues, visit the GitHub repository.