Skip to content

Commit c7c90c3

Browse files
committed
Fix CI
1 parent aa7be44 commit c7c90c3

File tree

3 files changed

+39
-17
lines changed

3 files changed

+39
-17
lines changed

.github/workflows/ci.yml

+36-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Apple Inc. and the Swift Homomorphic Encryption project authors
1+
# Copyright 2024-2025 Apple Inc. and the Swift Homomorphic Encryption project authors
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ on:
2121
branches: [ "main", "release/**" ]
2222
pull_request:
2323
branches: [ "main", "release/**" ]
24-
types: [opened, reopened, synchronize, ready_for_review]
24+
types: [opened, reopened, synchronize]
2525
# Pushing changes to PR stops currently-running CI
2626
concurrency:
2727
group: ${{ github.workflow }}-${{ github.ref }}
@@ -37,15 +37,18 @@ jobs:
3737
strategy:
3838
fail-fast: false
3939
matrix:
40-
swift: ["5.10", "6.0"]
41-
name: swift ${{ matrix.swift }} tests
40+
swift_version: ['5.10', '6.0']
41+
os_version: ['jammy']
42+
container:
43+
image: swift:${{ matrix.swift_version }}-${{ matrix.os_version }}
44+
name: swift ${{ matrix.swift_version }} tests
4245
steps:
43-
- uses: slashmo/[email protected]
44-
with:
45-
version: ${{ matrix.swift }}
46-
- uses: actions/checkout@v4
46+
- name: Swift version
47+
run: swift --version
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
4750
- name: Install jemalloc
48-
run: sudo apt-get install -y libjemalloc-dev
51+
run: apt-get update && apt-get install -y libjemalloc-dev
4952
- name: Run tests
5053
run: swift test --configuration release --parallel
5154
- name: Run snippets
@@ -58,20 +61,36 @@ jobs:
5861
timeout-minutes: 1
5962
runs-on: ubuntu-latest
6063
steps:
61-
- uses: actions/checkout@v4
64+
- name: Checkout repository
65+
uses: actions/checkout@v4
6266
- name: Install pre-commit
6367
run: pip install pre-commit
6468
- name: Pre-commit checks
6569
# CI will commit to `main`
66-
# swiftformat & swiftlint tested separately
70+
# swiftformat, swiftlint and license checks tested separately
6771
run: >
68-
SKIP=no-commit-to-branch,lockwood-swiftformat,swiftlint,check-doc-comments
72+
SKIP=no-commit-to-branch,lockwood-swiftformat,swiftlint,check-doc-comments,insert-license
6973
pre-commit run --all-files
74+
insert-license:
75+
timeout-minutes: 1
76+
runs-on: ubuntu-latest
77+
steps:
78+
- name: Checkout repository
79+
uses: actions/checkout@v4
80+
with:
81+
fetch-depth: 2
82+
- name: Install pre-commit
83+
run: pip install pre-commit
84+
- name: List changed files
85+
run: git diff --name-only HEAD~1
86+
- name: Run license check
87+
run: pre-commit run insert-license --files $(git diff --name-only HEAD~1)
7088
lint:
7189
timeout-minutes: 15
7290
runs-on: ubuntu-latest
7391
steps:
74-
- uses: actions/checkout@v4
92+
- name: Checkout repository
93+
uses: actions/checkout@v4
7594
- name: Cache SwiftLint
7695
id: cache-swiftlint
7796
uses: actions/cache@v4
@@ -88,7 +107,8 @@ jobs:
88107
timeout-minutes: 5
89108
runs-on: ubuntu-latest
90109
steps:
91-
- uses: actions/checkout@v4
110+
- name: Checkout repository
111+
uses: actions/checkout@v4
92112
- name: Cache SwiftFormat
93113
id: cache-swiftformat
94114
uses: actions/cache@v4
@@ -105,6 +125,7 @@ jobs:
105125
timeout-minutes: 5
106126
runs-on: ubuntu-latest
107127
steps:
108-
- uses: actions/checkout@v4
128+
- name: Checkout repository
129+
uses: actions/checkout@v4
109130
- name: Check documentation comments
110131
run: ci/run-apple-swift-format.sh

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.benchmarkBaselines/
55
.build/
66
.docc-build/
7+
.index-build/
78
.swiftpm
89
.vscode/
910
xcuserdata/

Sources/HomomorphicEncryption/Keys.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2024 Apple Inc. and the Swift Homomorphic Encryption project authors
1+
// Copyright 2024-2025 Apple Inc. and the Swift Homomorphic Encryption project authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -169,7 +169,7 @@ public struct EvaluationKeyConfig: Codable, Equatable, Hashable, Sendable {
169169
}
170170

171171
extension Sequence<EvaluationKeyConfig> {
172-
/// Computes the union of ``EvaluationKeyConfig``s.
172+
/// Computes the union of evaluation key configurations.
173173
///
174174
/// The union of ``EvaluationKeyConfig``s is a configuration whose:
175175
/// * Galois elements is a union of each configuration's Galois elements

0 commit comments

Comments
 (0)