-
Notifications
You must be signed in to change notification settings - Fork 397
106 lines (93 loc) · 2.79 KB
/
Copy pathcodeql.yml
File metadata and controls
106 lines (93 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "31 14 * * 2"
workflow_dispatch:
permissions:
contents: read
security-events: write
concurrency:
group: >-
codeql:${{ github.workflow }}:${{ github.event.pull_request.head.repo.id || github.repository_id }}:${{ github.head_ref || github.ref_name }}:${{ github.base_ref || github.event.repository.default_branch }}
cancel-in-progress: true
jobs:
analyze-source:
name: Analyze ${{ matrix.language }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language:
- actions
- javascript-typescript
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: none
- name: Analyze
uses: github/codeql-action/analyze@v4
with:
category: /language:${{ matrix.language }}
analyze-swift:
name: Analyze Swift
runs-on: macos-26
timeout-minutes: 330
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Select Xcode 26
run: |
set -euo pipefail
for candidate in \
/Applications/Xcode_26.6.app \
/Applications/Xcode_26.5.app \
/Applications/Xcode_26.4.1.app \
/Applications/Xcode_26.3.app \
/Applications/Xcode_26.2.app \
/Applications/Xcode.app; do
if [[ -d "$candidate" ]]; then
sudo xcode-select -s "$candidate"
echo "DEVELOPER_DIR=${candidate}/Contents/Developer" >> "$GITHUB_ENV"
break
fi
done
xcodebuild -version
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: swift
build-mode: manual
- name: Build Swift targets
env:
CODEQL_DERIVED_DATA: ${{ runner.temp }}/codeql-swift
run: |
set -euo pipefail
python3 scripts/setup-swift-workspace.py setup
xcodebuild \
-workspace Apps/Peekaboo.xcworkspace \
-scheme CodeQL \
-configuration Debug \
-sdk macosx \
-derivedDataPath "$CODEQL_DERIVED_DATA" \
-disableAutomaticPackageResolution \
-onlyUsePackageVersionsFromResolvedFile \
-skipPackageUpdates \
build \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY="" \
DEVELOPMENT_TEAM=""
- name: Analyze
uses: github/codeql-action/analyze@v4
with:
category: /language:swift