Skip to content

Commit 81f7b0c

Browse files
ci(codeql): speed up C# scan and fix vendor key path
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8eb734e commit 81f7b0c

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.github/workflows/codeql.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,22 @@ jobs:
4545
build-mode: ${{ matrix.build-mode }}
4646
dependency-caching: ${{ matrix.language == 'csharp' && 'true' || 'false' }}
4747

48-
# ----- C# manual build (also builds Rust artifacts needed by WinUI Content items) -----
48+
# ----- C# manual build -----
4949
- name: Install .NET 8
5050
if: ${{ matrix.language == 'csharp' }}
5151
uses: actions/setup-dotnet@v5
5252
with:
5353
dotnet-version: "8.0.x"
5454

55-
- name: Set up Rust
55+
# The WinUI project copies these files from target\release\ as Content items.
56+
# For CodeQL analysis we only need them to exist; compiling Rust here is slow.
57+
- name: Create engine placeholder artifacts
5658
if: ${{ matrix.language == 'csharp' }}
57-
uses: dtolnay/rust-toolchain@stable
58-
59-
- name: Build Rust release artifacts
60-
if: ${{ matrix.language == 'csharp' }}
61-
run: cargo build --release
59+
shell: pwsh
60+
run: |
61+
New-Item -ItemType Directory -Force -Path "target/release" | Out-Null
62+
New-Item -ItemType File -Force -Path "target/release/escpe.exe" | Out-Null
63+
New-Item -ItemType File -Force -Path "target/release/escpe_core.dll" | Out-Null
6264
6365
- name: Build C# (WinUI and tests)
6466
if: ${{ matrix.language == 'csharp' }}

winui/EscpeWinUI.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
<!-- Bundle the Rust engine CLI next to the WinUI app -->
5353
<Content Include="..\target\release\escpe.exe" Link="escpe.exe" CopyToOutputDirectory="PreserveNewest" />
5454
<Content Include="..\target\release\escpe_core.dll" Link="escpe_core.dll" CopyToOutputDirectory="PreserveNewest" />
55-
<Content Include="..\escpe-vendor-keys\vendor_public.key" Link="vendor_public.key" CopyToOutputDirectory="PreserveNewest" />
55+
<!-- The public vendor key is committed at the repo root -->
56+
<Content Include="..\vendor_public.key" Link="vendor_public.key" CopyToOutputDirectory="PreserveNewest" />
5657
</ItemGroup>
5758

5859
<!--

0 commit comments

Comments
 (0)