Skip to content

Commit 25544d3

Browse files
committed
adjust codeql workflow
1 parent 591142b commit 25544d3

File tree

2 files changed

+35
-21
lines changed

2 files changed

+35
-21
lines changed

.github/workflows/codeql.yml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ["main"]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: ["main"]
88
schedule:
9-
- cron: '36 1 * * 0'
9+
- cron: "36 1 * * 0"
1010

1111
jobs:
1212
analyze:
@@ -21,21 +21,34 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
include:
24-
- language: actions
25-
build-mode: none
26-
- language: swift
27-
build-mode: autobuild
24+
- language: actions
25+
build-mode: none
26+
- language: swift
27+
build-mode: manual
2828
steps:
29-
- name: Checkout repository
30-
uses: actions/checkout@v6
31-
32-
- name: Initialize CodeQL
33-
uses: github/codeql-action/init@v4
34-
with:
35-
languages: ${{ matrix.language }}
36-
build-mode: ${{ matrix.build-mode }}
37-
38-
- name: Perform CodeQL Analysis
39-
uses: github/codeql-action/analyze@v4
40-
with:
41-
category: "/language:${{matrix.language}}"
29+
- name: Checkout repository
30+
uses: actions/checkout@v6
31+
32+
- name: Create missing wrapper directory
33+
if: matrix.language == 'swift'
34+
run: |
35+
mkdir -p OneSignalLiveActivitiesWrapper/include
36+
touch OneSignalLiveActivitiesWrapper/dummy.m
37+
touch OneSignalLiveActivitiesWrapper/include/dummy.h
38+
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v4
41+
with:
42+
languages: ${{ matrix.language }}
43+
build-mode: ${{ matrix.build-mode }}
44+
45+
- name: Build Swift Package
46+
if: matrix.language == 'swift'
47+
timeout-minutes: 20
48+
run: |
49+
swift build --arch arm64
50+
51+
- name: Perform CodeQL Analysis
52+
uses: github/codeql-action/analyze@v4
53+
with:
54+
category: "/language:${{matrix.language}}"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
.swiftpm
77
.swiftpm/xcode/xcuserdata
88
xcuserdata
9-
.swiftpm/xcode/package.xcworkspace/xcuserdata
9+
.swiftpm/xcode/package.xcworkspace/xcuserdata
10+
.build

0 commit comments

Comments
 (0)