forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Arcadeification (emscripten-core#1)
* Initial Arcadeification
- Loading branch information
Showing
150 changed files
with
11,884 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,8 @@ coverage.xml | |
|
||
# Test output | ||
/out/ | ||
|
||
# MSFT ignores | ||
/.dotnet | ||
/.packages | ||
/artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" /> | ||
|
||
<PropertyGroup Label="CalculateArch"> | ||
<_hostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</_hostArch> | ||
<BuildArchitecture Condition="'$(BuildArchitecture)' == ''">$(_hostArch)</BuildArchitecture> | ||
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'arm'">arm</TargetArchitecture> | ||
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'armv6'">armv6</TargetArchitecture> | ||
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'armel'">armel</TargetArchitecture> | ||
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'arm64'">arm64</TargetArchitecture> | ||
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'loongarch64'">loongarch64</TargetArchitecture> | ||
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 's390x'">s390x</TargetArchitecture> | ||
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'ppc64le'">ppc64le</TargetArchitecture> | ||
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetsMobile)' == 'true'">x64</TargetArchitecture> | ||
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture> | ||
<Platform Condition="'$(InferPlatformFromTargetArchitecture)' == 'true'">$(TargetArchitecture)</Platform> | ||
<Platform Condition="'$(InferPlatformFromTargetArchitecture)' != 'true'">$(BuildArchitecture)</Platform> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<BuildArch>$(__BuildArch)</BuildArch> | ||
<BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch> | ||
<BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch> | ||
|
||
<BuildType>$(__BuildType)</BuildType> | ||
<BuildType Condition="'$(__BuildType)'==''">Debug</BuildType> | ||
<BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType> | ||
<BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType> | ||
|
||
<BuildOS>$(__BuildOS)</BuildOS> | ||
<BuildOS Condition="'$(__BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(Windows))' == 'true'">Windows_NT</BuildOS> | ||
<BuildOS Condition="'$(__BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(Linux))' == 'true'">Linux</BuildOS> | ||
<BuildOS Condition="'$(__BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(OSX))' == 'true'">OSX</BuildOS> | ||
|
||
<!-- TODO: converge on one property for BuildOS and __BuildOS (and similar), and remove these extra lines. --> | ||
<__BuildOS>$(BuildOS)</__BuildOS> | ||
<__BuildArch>$(BuildArch)</__BuildArch> | ||
|
||
<Configuration Condition="'$(Configuration)' == ''">$(BuildType)</Configuration> | ||
<Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform> | ||
|
||
<PlatformConfigPathPart>$(BuildOS).$(TargetArchitecture).$(Configuration)</PlatformConfigPathPart> | ||
</PropertyGroup> | ||
|
||
<!-- Common properties --> | ||
<PropertyGroup> | ||
|
||
<__ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</__ProjectDir> | ||
<ProjectDir>$(__ProjectDir)</ProjectDir> | ||
<RootRepoDir>$(ProjectDir)</RootRepoDir> | ||
<ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir> | ||
|
||
<BaseIntermediateOutputPath>$(RootRepoDir)artifacts\obj\$(PlatformConfigPathPart)\</BaseIntermediateOutputPath> | ||
|
||
<SourceDir>$(__SourceDir)\</SourceDir> | ||
<SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir> | ||
|
||
<RootBinDir>$(__RootBinDir)\</RootBinDir> | ||
<RootBinDir Condition="'$(__RootBinDir)'==''">$(RootRepoDir)artifacts\</RootBinDir> | ||
|
||
<BinDir>$(__BinDir)\</BinDir> | ||
<BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)bin\$(PlatformConfigPathPart)\</BinDir> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<EmscriptenInstallDir>$(BinDir)emscripten\</EmscriptenInstallDir> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<solution> | ||
<add key="disableSourceControlIntegration" value="true" /> | ||
</solution> | ||
<packageSources> | ||
<clear /> | ||
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" /> | ||
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" /> | ||
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" /> | ||
<add key="dotnet8-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json" /> | ||
</packageSources> | ||
<disabledPackageSources> | ||
<clear /> | ||
</disabledPackageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@echo off | ||
setlocal | ||
|
||
set _args=%* | ||
if "%~1"=="-?" set _args=-help | ||
|
||
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0eng\build.ps1" %_args% | ||
exit /b %ERRORLEVEL% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
source="${BASH_SOURCE[0]}" | ||
|
||
function is_cygwin_or_mingw() | ||
{ | ||
case $(uname -s) in | ||
CYGWIN*) return 0;; | ||
MINGW*) return 0;; | ||
*) return 1;; | ||
esac | ||
} | ||
|
||
# resolve $SOURCE until the file is no longer a symlink | ||
while [[ -h $source ]]; do | ||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
source="$(readlink "$source")" | ||
|
||
# if $source was a relative symlink, we need to resolve it relative to the path where the | ||
# symlink file was located | ||
[[ $source != /* ]] && source="$scriptroot/$source" | ||
done | ||
|
||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
|
||
if is_cygwin_or_mingw; then | ||
# if bash shell running on Windows (not WSL), | ||
# pass control to powershell build script. | ||
scriptroot=$(cygpath -d "$scriptroot") | ||
powershell -c "$scriptroot\\build.cmd" $@ | ||
else | ||
"$scriptroot/eng/build.sh" $@ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<Project Sdk="Microsoft.Build.Traversal"> | ||
<Target Name="LayoutEmscripten" BeforeTargets="Build"> | ||
<ItemGroup> | ||
<EmscriptenFiles Include="$(ProjectDir)**" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\artifacts\**" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\eng\**" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\.gitignore" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\.gitmodules" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\build.*" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\emscripten.proj" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\global.json" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\Directory.Build.*" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\NuGet.config" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\.circleci\**" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\.dotnet\**" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\.git\**" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\.github\**" /> | ||
<EmscriptenFiles Remove="$(ProjectDir)\.packages\**" /> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(EmscriptenFiles)" | ||
DestinationFiles="@(EmscriptenFiles->'$(EmscriptenInstallDir)\%(RecursiveDir)%(Filename)%(Extension)')" /> | ||
</Target> | ||
|
||
<Target Name="WriteVersionFile" AfterTargets="LayoutEmscripten"> | ||
<PropertyGroup> | ||
<EmscriptenEmsdkVersion>emscripten-$(VersionPrefix)-dotnet</EmscriptenEmsdkVersion> | ||
</PropertyGroup> | ||
<WriteLinesToFile File="$(EmscriptenInstallDir)\.emsdk_version" | ||
Overwrite="true" | ||
Lines="$(EmscriptenEmsdkVersion)" /> | ||
</Target> | ||
|
||
<Target Name="Build" DependsOnTargets="LayoutEmscripten" /> | ||
<Target Name="ReallyPack" BeforeTargets="Pack"> | ||
<MSBuild Projects="eng/nuget/packages.builds" Targets="Build" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<ProjectToBuild Include="$(MSBuildThisFileDirectory)..\emscripten.proj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<PropertyGroup> | ||
<PublishingVersion>3</PublishingVersion> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<MSBuildTreatWarningsAsErrors>false</MSBuildTreatWarningsAsErrors> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!-- arcade --> | ||
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" /> | ||
</ItemGroup> | ||
</Project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Dependencies> | ||
<ToolsetDependencies> | ||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23219.2"> | ||
<Uri>https://github.com/dotnet/arcade</Uri> | ||
<Sha>dca04a5ec44fe1e75535f51a4e0b9a7aa2318de7</Sha> | ||
</Dependency> | ||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="8.0.0-beta.23219.2"> | ||
<Uri>https://github.com/dotnet/arcade</Uri> | ||
<Sha>dca04a5ec44fe1e75535f51a4e0b9a7aa2318de7</Sha> | ||
</Dependency> | ||
</ToolsetDependencies> | ||
</Dependencies> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<VersionPrefix>8.0.0</VersionPrefix> | ||
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel> | ||
<PreReleaseVersionIteration>4</PreReleaseVersionIteration> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<MicrosoftDotNetBuildTasksPackagingVersion>8.0.0-beta.23219.2</MicrosoftDotNetBuildTasksPackagingVersion> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,77 @@ | ||
trigger: | ||
 batch: true | ||
 branches: | ||
 include: | ||
 - dotnet/main | ||
 | ||
pr: | ||
 branches: | ||
 include: | ||
 - dotnet/main | ||
 | ||
pool: | ||
 name: NetCore-Public | ||
 demands: ImageOverride -equals build.ubuntu.2204.amd64.open | ||
 | ||
steps: | ||
- script: echo Hello World | ||
 displayName: 'Basic empty step which we can PR against' | ||
batch: true | ||
branches: | ||
include: | ||
- dotnet/main | ||
- dotnet/release/* | ||
|
||
pr: | ||
branches: | ||
include: | ||
- dotnet/main | ||
- dotnet/release/* | ||
|
||
variables: | ||
- template: /eng/common-variables.yml | ||
- template: /eng/common/templates/variables/pool-providers.yml | ||
|
||
stages: | ||
- stage: build | ||
displayName: Build | ||
jobs: | ||
- template: /eng/common/templates/jobs/jobs.yml | ||
parameters: | ||
enablePublishBuildArtifacts: true | ||
enablePublishBuildAssets: true | ||
enablePublishUsingPipelines: true | ||
jobs: | ||
|
||
############ LINUX BUILD ############ | ||
- job: Build_Linux | ||
displayName: Linux | ||
timeoutInMinutes: 360 | ||
variables: | ||
- _BuildConfig: Release | ||
strategy: | ||
matrix: | ||
x64: | ||
assetManifestOS: linux | ||
assetManifestPlatform: x64 | ||
imagename: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0 | ||
rootfs: /crossrootfs/x64 | ||
archflag: --arch x64 | ||
pool: | ||
${{ if eq(variables['System.TeamProject'], 'public') }}: | ||
name: $(DncEngPublicBuildPool) | ||
demands: ImageOverride -equals build.ubuntu.2204.amd64.open | ||
${{ if eq(variables['System.TeamProject'], 'internal') }}: | ||
name: $(DncEngInternalBuildPool) | ||
demands: ImageOverride -equals build.ubuntu.2204.amd64 | ||
container: | ||
image: $(imagename) | ||
steps: | ||
- script: | | ||
git clean -ffdx | ||
git reset --hard HEAD | ||
displayName: 'Clean up working directory' | ||
- bash: | | ||
./build.sh --ci --restore --build --pack $(archflag) --configuration $(_BuildConfig) $(_InternalBuildArgs) /p:RestoreUsingNuGetTargets=false | ||
displayName: 'Build and package' | ||
env: | ||
ROOTFS_DIR: $(rootfs) | ||
- bash: | ||
./eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(assetManifestOS) /p:PlatformName=$(assetManifestPlatform) --projects $(Build.SourcesDirectory)/emscripten.proj | ||
displayName: Publish packages | ||
condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) | ||
|
||
############ POST BUILD ARCADE LOGIC ############ | ||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: | ||
- template: /eng/common/templates/post-build/post-build.yml | ||
parameters: | ||
publishingInfraVersion: 3 | ||
enableSourceLinkValidation: false | ||
enableSigningValidation: false | ||
enableSymbolValidation: false | ||
enableNugetValidation: true |
Oops, something went wrong.