Skip to content

Commit

Permalink
Add build tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nokotan committed Jun 8, 2023
1 parent 64483e1 commit 9d37a19
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ jobs:
Set-Item Env:Path "$env:MSBuild_Path;$env:Path"
msbuild MultiProcessBuild.sln /p:Configuration="Release"
- name: TLog Generation Test
working-directory: Test/SampleProjects/PreCompiledHeader
run: |
Set-Item Env:Path "$env:MSBuild_Path;$env:Path"
msbuild PreCompiledHeader.sln /p:Configuration="Release"
- name: TLog Generation Test
working-directory: Test/SampleProjects/StaticLinking
run: |
Set-Item Env:Path "$env:MSBuild_Path;$env:Path"
emcc --clear-cache
msbuild StaticLinking.sln /p:Configuration="Release"
build-dockerimage:
runs-on: windows-latest
needs: build
Expand Down
4 changes: 4 additions & 0 deletions Test/SampleProjects/PreCompiledHeader/Header.pch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# pragma once

# include <stdio.h>
# include <emscripten.h>
6 changes: 6 additions & 0 deletions Test/SampleProjects/PreCompiledHeader/Main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "Header.pch.h"

int main() {
printf("Hello, emscripten!\n");
return 0;
}
24 changes: 24 additions & 0 deletions Test/SampleProjects/PreCompiledHeader/PreCompiledHeader.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.2017
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PreCompiledHeader", "PreCompiledHeader.vcxproj", "{B15B558D-11FA-4E61-9964-C739273E4FF4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Emscripten = Debug|Emscripten
Release|Emscripten = Release|Emscripten
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B15B558D-11FA-4E61-9964-C739273E4FF4}.Debug|Emscripten.ActiveCfg = Debug|Emscripten
{B15B558D-11FA-4E61-9964-C739273E4FF4}.Debug|Emscripten.Build.0 = Debug|Emscripten
{B15B558D-11FA-4E61-9964-C739273E4FF4}.Release|Emscripten.ActiveCfg = Release|Emscripten
{B15B558D-11FA-4E61-9964-C739273E4FF4}.Release|Emscripten.Build.0 = Release|Emscripten
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F9092F9E-378A-4C32-919A-8FCA5EE9827D}
EndGlobalSection
EndGlobal
56 changes: 56 additions & 0 deletions Test/SampleProjects/PreCompiledHeader/PreCompiledHeader.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Emscripten">
<Configuration>Debug</Configuration>
<Platform>Emscripten</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Emscripten">
<Configuration>Release</Configuration>
<Platform>Emscripten</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{61072049-589B-42F4-92B2-93DC2F0AB285}</ProjectGuid>
<RootNamespace>PreCompiledHeader</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Emscripten'">
<ConfigurationType>HTMLPage</ConfigurationType>
<PlatformToolset>emcc</PlatformToolset>
<EmscriptenDir>$(EMSDK)\upstream\emscripten\</EmscriptenDir>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Emscripten'">
<ConfigurationType>HTMLPage</ConfigurationType>
<PlatformToolset>emcc</PlatformToolset>
<EmscriptenDir>$(EMSDK)\upstream\emscripten\</EmscriptenDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Emscripten'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>$(ProjectDir)\Header.pch.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Emscripten'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>$(ProjectDir)\Header.pch.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Main.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="Header.pch.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

0 comments on commit 9d37a19

Please sign in to comment.