Skip to content

Commit c02640e

Browse files
authored
* Fix CI for copyright header (#63)
Also * Pin CI to Ubuntu 22.04 * Update pre-commit deps
1 parent ef1e000 commit c02640e

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 17 additions & 4 deletions
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.
@@ -32,7 +32,7 @@ env:
3232
jobs:
3333
swift-tests:
3434
timeout-minutes: 15
35-
runs-on: ubuntu-latest
35+
runs-on: ubuntu-22.04
3636
strategy:
3737
fail-fast: false
3838
matrix:
@@ -54,10 +54,23 @@ jobs:
5454
run: pip install pre-commit
5555
- name: Pre-commit checks
5656
# CI will commit to `main`
57-
# swiftformat & swiftlint tested separately
57+
# swiftformat, swiftlint and license checks tested separately
5858
run: >
59-
SKIP=no-commit-to-branch,lockwood-swiftformat,swiftlint,check-doc-comments
59+
SKIP=no-commit-to-branch,check-doc-comments,lockwood-swiftformat,swiftlint,insert-license
6060
pre-commit run --all-files
61+
insert-license:
62+
timeout-minutes: 1
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v4
66+
with:
67+
fetch-depth: 2
68+
- name: Install pre-commit
69+
run: pip install pre-commit
70+
- name: List changed files
71+
run: git diff --name-only HEAD~1
72+
- name: Run license check
73+
run: pre-commit run insert-license --files $(git diff --name-only HEAD~1)
6174
lint:
6275
timeout-minutes: 15
6376
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.DS_Store
44
.benchmarkBaselines/
55
.build/
6+
.index-build/
67
.swiftpm
78
.vscode/
89
xcuserdata/

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
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.
@@ -14,7 +14,7 @@
1414

1515
repos:
1616
- repo: https://github.com/pre-commit/pre-commit-hooks
17-
rev: v4.6.0
17+
rev: v5.0.0
1818
hooks:
1919
- id: check-case-conflict
2020
- id: check-merge-conflict

0 commit comments

Comments
 (0)