Skip to content

Commit 0035fdb

Browse files
committed
Updating from source commit 8ff64797e1f0c940f8b5e61d1441d464b5e7681f on 2025-08-24T18:22:11-07:00
1 parent e870710 commit 0035fdb

File tree

14 files changed

+241
-54
lines changed

14 files changed

+241
-54
lines changed

.github/workflows/build.yml

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
name: Build And Publish
2+
run-name: R#${{ github.run_number }} (${{ github.event.repository.updated_at }}) [${{ github.event.head_commit.message }}]
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
10+
pull_request:
11+
branches: [ main ]
12+
13+
jobs:
14+
build:
15+
runs-on: windows-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
- name: Initialize directories
21+
shell: pwsh
22+
run: |
23+
mkdir binlogs
24+
25+
- name: Build
26+
shell: pwsh
27+
run: ./build.ps1 /bl:binlogs/build.binlog
28+
env:
29+
DisableWorkloads: 'true'
30+
31+
- name: Publish Exe
32+
shell: pwsh
33+
run: dotnet publish src/Codex.Application/Codex.Application.csproj -o bin/exe /bl:binlogs/publish.exe.binlog
34+
35+
- name: Analyze
36+
shell: pwsh
37+
run: ./analyze.ps1 -BinlogPath binlogs/build.binlog
38+
39+
- name: Ingest
40+
shell: pwsh
41+
run: ./ingest.ps1 -OutputDir bin/web/index
42+
43+
- name: Upload Index Artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: index
47+
path: bin/web/index
48+
49+
- name: Upload Binlogs
50+
if: always()
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: ${{ github.job }}-binlogs
54+
path: binlogs
55+
56+
test:
57+
runs-on: windows-latest
58+
timeout-minutes: 10
59+
60+
steps:
61+
- name: Checkout repository
62+
uses: actions/checkout@v4
63+
64+
- name: Run Tests
65+
shell: pwsh
66+
run: dotnet test src/Codex.Integration.Tests/Codex.Integration.Tests.csproj
67+
pack:
68+
runs-on: windows-latest
69+
70+
steps:
71+
- name: Checkout repository
72+
uses: actions/checkout@v4
73+
- name: Initialize directories
74+
shell: pwsh
75+
run: |
76+
mkdir binlogs
77+
78+
- name: Set up Wasm
79+
shell: pwsh
80+
run: |
81+
$timestamp = Get-Date -Format "yyyyMMdd.${{ github.run_number }}"
82+
83+
dotnet pack Codex.xln /p:ProjectFilter=pack `
84+
/p:CodexPackMode=CI `
85+
/p:BUILD_REPOSITORY_PROVIDER=GitHub `
86+
/p:VersionSuffix="${timestamp}+$(git rev-parse --short HEAD)" `
87+
/bl:binlogs/pack.binlog `
88+
-o ./bin/packages
89+
90+
- name: Upload Packages Artifact
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: packages
94+
path: bin/packages
95+
96+
- name: Upload Binlogs
97+
if: always()
98+
uses: actions/upload-artifact@v4
99+
with:
100+
name: ${{ github.job }}-binlogs
101+
path: binlogs
102+
103+
publish:
104+
runs-on: windows-latest
105+
106+
steps:
107+
- name: Checkout repository
108+
uses: actions/checkout@v4
109+
- name: Initialize directories
110+
shell: pwsh
111+
run: |
112+
mkdir binlogs
113+
114+
- name: Set up Wasm
115+
shell: pwsh
116+
working-directory: src/Codex.Web.Wasm
117+
run: |
118+
dotnet workload install wasm-tools
119+
120+
dotnet workload install wasm-experimental
121+
122+
- name: Publish Wasm
123+
shell: pwsh
124+
working-directory: src/Codex.Web.Wasm
125+
run: dotnet publish Codex.Web.Wasm.csproj -o "$Env:GITHUB_WORKSPACE/bin/wasm" /bl:"$Env:GITHUB_WORKSPACE/binlogs/publish.wasm.binlog"
126+
127+
- name: Upload Wasm Artifact
128+
uses: actions/upload-artifact@v4
129+
with:
130+
name: codex.web.wasm
131+
path: bin/wasm/wwwroot
132+
133+
- name: Publish Exe
134+
shell: pwsh
135+
run: dotnet publish src/Codex.Application/Codex.Application.csproj -o bin/exe /bl:binlogs/publish.exe.binlog
136+
137+
- name: Upload Exe Artifact
138+
uses: actions/upload-artifact@v4
139+
with:
140+
name: codex
141+
path: bin/exe
142+
143+
- name: Upload Binlogs
144+
if: always()
145+
uses: actions/upload-artifact@v4
146+
with:
147+
name: ${{ github.job }}-binlogs
148+
path: binlogs
149+
150+
- name: Create WASM deployment
151+
shell: pwsh
152+
run: ./deploywasm.ps1
153+
154+
deploy_github_pages:
155+
runs-on: windows-latest
156+
needs: [build, test, publish]
157+
permissions:
158+
contents: write
159+
pages: write
160+
id-token: write
161+
162+
steps:
163+
- name: Download Wasm Artifact
164+
uses: actions/download-artifact@v4
165+
with:
166+
name: codex.web.wasm
167+
path: ./site-source
168+
169+
- name: Download Codex.exe Artifact
170+
uses: actions/download-artifact@v4
171+
with:
172+
name: codex
173+
path: ./codex
174+
175+
- name: Create WASM deployment
176+
shell: pwsh
177+
run: ./codex/codex.exe deployweb -s ./site-source -t ./site -h pages -m wasm -i "index?_ts{timestamp}=1"
178+
179+
- name: Download Index Artifact
180+
uses: actions/download-artifact@v4
181+
with:
182+
name: index
183+
path: ./site/index
184+
185+
- name: Setup Pages
186+
uses: actions/configure-pages@v4
187+
188+
- name: Upload to GitHub Pages
189+
uses: actions/upload-pages-artifact@v3
190+
with:
191+
path: ./site
192+
193+
- name: Deploy to GitHub Pages
194+
if: github.ref == 'refs/heads/main'
195+
id: deployment
196+
uses: actions/deploy-pages@v4

src/Codex.Analysis.Managed/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema

src/Codex.Application/Codex.Application.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<OutputType>Exe</OutputType>
66
<AssemblyName>Codex</AssemblyName>
77

8-
<PackageId>Ref12.Tool.Codex</PackageId>
8+
<PackageId>Ref12.Codex</PackageId>
99
<PackAsTool>true</PackAsTool>
1010
<ToolCommandName>codex</ToolCommandName>
1111
<PackageOutputPath>./nupkg</PackageOutputPath>
12-
<PackageVersion>2.0.0</PackageVersion>
12+
<VersionPrefix>2.0.0</VersionPrefix>
1313

1414
<UserSecretsId>CodexTests-5405dcff-71b8-4108-918a-458206700d15</UserSecretsId>
1515
</PropertyGroup>

src/Codex.Application/Verbs/AnalyzeOperation.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -245,15 +245,7 @@ private async Task RunRepoImporterAsync()
245245
// This is used to ignore files which are not specified in the .gitignore files
246246
new GitIgnoreFilter(".cdxignore") { Logger = logger },
247247

248-
new BinaryFileSystemFilter(new string[]
249-
{
250-
// Exclude known binary file formats
251-
".exe", ".dll", ".blob", ".db", ".pdb", ".png", ".binlog",
252-
253-
// Exclude localization related files
254-
".lcl", ".lci"
255-
})
256-
))
248+
BinaryFileSystemFilter.Default))
257249
{
258250
DisableEnumeration = ProjectMode || DisableEnumeration || file.Length != 0
259251
}));

src/Codex.Automation.Workflow/Codex.Automation.Workflow.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>annotations</Nullable>
77
<OutputType>Exe</OutputType>
8-
<PackageId>Ref12.Codex.Automation.Workflow</PackageId>
8+
<PackageId>Ref12.AutoCodex</PackageId>
99
<PackageProjectUrl>https://github.com/Ref12/Codex/</PackageProjectUrl>
10-
<PackageDescription>Tool used to run codex indexing workflows as a part of builds in Azure DevOps pipelines</PackageDescription>
10+
<PackageDescription>Tool used to run codex indexing workflows particularly in Azure DevOps pipelines or github workflows.</PackageDescription>
1111
<Authors>Ref12</Authors>
1212
<PackAsTool>true</PackAsTool>
13-
<ToolCommandName>codextask</ToolCommandName>
14-
<PackageVersion>2.0.0</PackageVersion>
13+
<ToolCommandName>autocodex</ToolCommandName>
14+
<VersionPrefix>2.0.0</VersionPrefix>
1515
</PropertyGroup>
1616

1717
<ItemGroup>

src/Codex.Sdk/FileSystems/BinaryFileSystemFilter.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ public class BinaryFileSystemFilter : FileSystemFilter
1212
{
1313
public readonly ConcurrentDictionary<string, bool> InclusionByExtension = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
1414

15+
public static readonly BinaryFileSystemFilter Default = new BinaryFileSystemFilter(new string[]
16+
{
17+
// Exclude known binary file formats
18+
".exe", ".dll", ".blob", ".db", ".pdb", ".png", ".binlog",
19+
20+
// Exclude localization related files
21+
".lcl", ".lci"
22+
});
23+
1524
public BinaryFileSystemFilter(IEnumerable<string> excludedExtensions)
1625
{
1726
foreach (var extension in excludedExtensions)

src/Codex.Web.Common/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema

src/Codex.Web.Wasm/Codex.Web.Wasm.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<WasmEnableThreads>true</WasmEnableThreads>
55
<PublishTrimmed>false</PublishTrimmed>
66
<WasmEnableDebugging>true</WasmEnableDebugging>
7+
<InvariantGlobalization>true</InvariantGlobalization>
78
</PropertyGroup>
89

910
<ItemGroup>

src/Codex.Web.Wasm/wwwroot/content/body.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
body {
1+
body {
22
padding-top: 50px;
33
padding-bottom: 20px;
44
}

src/Codex.Web.Wasm/wwwroot/content/header.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#search-box {
1+
#search-box {
22
font-size: 16pt;
33
width: 453px;
44
border-color: lightgray;

0 commit comments

Comments
 (0)