Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
experiment: ensure gha workflow changes work
Browse files Browse the repository at this point in the history
The gha workflow has been modified to use the published self-contained, ready-2-run, trimmed, language server binary.  However, we haven't yet added in the Trimmer Root Assemblies to ensure it works.  So the vscode tests should fail, proving they are correctly using the published binary, and not using 'dotnet test' as they used to (forceDebug mode).
chrissimon-au committed Nov 20, 2023
1 parent 329f65e commit 90a9590
Showing 7 changed files with 32 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -30,3 +30,5 @@ RUN su - vscode -c "dotnet-suggest script bash >> ~/.bashrc"

COPY post_start_command.sh /home/vscode/post_start_command.sh
RUN chmod +x /home/vscode/post_start_command.sh

ENV CONTEXTIVE_DEBUG=true
1 change: 0 additions & 1 deletion .github/workflows/contextive-vscode-publish.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@ on:

env:
dotnet-version: '7.0.x'
CONTEXTIVE_DEBUG: true
jobs:
publish:
name: Publish
1 change: 0 additions & 1 deletion .github/workflows/contextive-vscode-release.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@ on: workflow_dispatch

env:
dotnet-version: '7.0.x'
CONTEXTIVE_DEBUG: true
jobs:
build-and-test:
name: 'Build and Test'
11 changes: 9 additions & 2 deletions .github/workflows/contextive-vscode.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,11 @@ on:
- '.github/**vscode**'
env:
dotnet-version: '7.0.x'
CONTEXTIVE_DEBUG: true

# Uncomment this to ensure the vscode extension tests run in debug mode using `dotnet run` for enhanced logging
# by default we test with the release mode built binary to ensure .NET trimming hasn't broken anything
# See https://github.com/dev-cycles/contextive/issues/61 for details
# CONTEXTIVE_DEBUG: true
jobs:
build-and-test:
name: 'Build and Test'
@@ -64,7 +68,7 @@ jobs:
name: Language Server Tests ${{ runner.os }}
path: "src/**/Contextive.*.Tests/TestResults/TestResults.*-${{ env.dotnet-version }}-${{ runner.os }}.xml"
reporter: dotnet-trx
- name: Publish Language Server
- name: Build Release Mode/Publish Language Server
working-directory: ./src/language-server/Contextive.LanguageServer
run: |
dotnet publish -c Release -r ${{ matrix.dotnet_runtime }} -o publish
@@ -85,6 +89,9 @@ jobs:
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo ">>> Started xvfb"
if: runner.os == 'Linux'
- name: Copy Published Language Server to VsCode Extension
run: |
cp src/language-server/Contextive.LanguageServer/publish/Contextive.LanguageServer src/vscode/contextive/dist
- name: Build and Test VsCode Extension
run: npm test
working-directory: ./src/vscode/contextive
4 changes: 4 additions & 0 deletions src/core/Contextive.Core/Contextive.Core.fsproj
Original file line number Diff line number Diff line change
@@ -4,6 +4,10 @@
<TargetFramework>net7.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<DebuggerSupport>false</DebuggerSupport>
</PropertyGroup>
<ItemGroup>
<Compile Include="File.fs" />
<Compile Include="Definitions.fs" />
Original file line number Diff line number Diff line change
@@ -11,12 +11,26 @@
<Company>Dev Cycles</Company>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<!--Restore after https://github.com/dev-cycles/contextive/issues/61 is resolved. -->
<!--<PublishReadyToRun>true</PublishReadyToRun>-->
<!--<PublishTrimmed>true</PublishTrimmed>-->
<PublishReadyToRun>true</PublishReadyToRun>
<PublishTrimmed>true</PublishTrimmed>
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<ILLinkTreatWarningsAsErrors>true</ILLinkTreatWarningsAsErrors>
<DebuggerSupport>false</DebuggerSupport>
</PropertyGroup>
<!--<ItemGroup>
<TrimmerRootAssembly Include="OmniSharp.Extensions.JsonRpc" />
<TrimmerRootAssembly Include="OmniSharp.Extensions.LanguageServer" />
<TrimmerRootAssembly Include="OmniSharp.Extensions.LanguageProtocol" />
<TrimmerRootAssembly Include="OmniSharp.Extensions.LanguageServer.Shared" />
<TrimmerRootAssembly Include="Newtonsoft.Json" />
<TrimmerRootAssembly Include="MediatR" />
<TrimmerRootAssembly Include="Contextive.Core" />
</ItemGroup>-->
<ItemGroup>
<Compile Include="Seq.fs" />
<Compile Include="Rendering.fs" />
1 change: 0 additions & 1 deletion src/vscode/contextive/test/runTest.js
Original file line number Diff line number Diff line change
@@ -80,7 +80,6 @@ async function main() {
extensionTestsPath,
launchArgs,
extensionTestsEnv: {
CONTEXTIVE_DEBUG: true,
...ipcOpts,
}
});

0 comments on commit 90a9590

Please sign in to comment.