Fboemer/more ciphertext async apis #577
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: CI | |
| permissions: | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main", "release/**"] | |
| pull_request: | |
| branches: ["main", "release/**"] | |
| types: [opened, reopened, synchronize] | |
| # Pushing changes to PR stops currently-running CI | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # Keep versions in sync with README | |
| SWIFTLINT_VERSION: 0.62.2 | |
| SWIFTFORMAT_VERSION: 0.58.6 | |
| jobs: | |
| soundness: | |
| name: soundness | |
| uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main | |
| with: | |
| # https://github.com/swiftlang/swift-package-manager/issues/8103 | |
| api_breakage_check_enabled: false | |
| # swift:6.2-noble leads to issues with Snippets | |
| # e.g. https://github.com/apple/swift-homomorphic-encryption/actions/runs/18144503507/job/51643132814#step:5:1087 | |
| docs_check_container_image: swift:6.1-noble | |
| format_check_enabled: false | |
| tests: | |
| name: swifttests | |
| uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main | |
| with: | |
| enable_windows_checks: false | |
| linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}]" | |
| linux_env_vars: SWIFT_HOMOMORPHIC_ENCRYPTION_ENABLE_BENCHMARKING=1 | |
| linux_pre_build_command: "apt-get update && apt-get install -y libjemalloc-dev" | |
| linux_build_command: > | |
| swift test --configuration release; | |
| for filename in $(find Snippets -name \*.swift); do | |
| basename=$(basename "$filename" .swift) | |
| swift run --configuration release ${basename} | |
| done | |
| pre-commit: | |
| timeout-minutes: 1 | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install pre-commit | |
| run: pip install pre-commit | |
| - name: Pre-commit checks | |
| # CI will commit to `main` | |
| # swiftformat, swiftlint and license checks tested separately | |
| run: > | |
| SKIP=no-commit-to-branch,lockwood-swiftformat,swiftlint,check-doc-comments,insert-license | |
| pre-commit run --all-files | |
| insert-license: | |
| timeout-minutes: 1 | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Install pre-commit | |
| run: pip install pre-commit | |
| - name: List changed files | |
| run: git diff --name-only HEAD~1 | |
| - name: Run license check | |
| run: pre-commit run insert-license --files $(git diff --name-only HEAD~1) | |
| lint: | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Cache SwiftLint | |
| id: cache-swiftlint | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/swiftlint/SwiftLint/.build/release/swiftlint | |
| key: ${{ runner.os }}-swiftlint-${{ env.SWIFTLINT_VERSION }} | |
| - name: Install SwiftLint | |
| if: steps.cache-swiftlint.outputs.cache-hit != 'true' | |
| run: | | |
| ci/install-swiftlint.sh | |
| - name: Run SwiftLint | |
| run: /tmp/swiftlint/SwiftLint/.build/release/swiftlint lint --strict . | |
| lockwood-swiftformat: | |
| timeout-minutes: 5 | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Cache SwiftFormat | |
| id: cache-swiftformat | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/swiftformat/SwiftFormat/.build/release/swiftformat | |
| key: ${{ runner.os }}-swiftformat-${{ env.SWIFTFORMAT_VERSION }} | |
| - name: Install Lockwood SwiftFormat | |
| if: steps.cache-swiftformat.outputs.cache-hit != 'true' | |
| run: | | |
| ci/install-lockwood-swiftformat.sh | |
| - name: Run SwiftFormat | |
| run: /tmp/swiftformat/SwiftFormat/.build/release/swiftformat --strict . | |
| check-doc-comments: | |
| timeout-minutes: 5 | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Check documentation comments | |
| run: ci/run-apple-swift-format.sh |