Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ae0606

Browse files
mdh1418Mitchell Hwang
and
Mitchell Hwang
authored
Testing new macos lane (#3953)
* Testing new macos lane * Use publish mono workflow for mono-samples * Clarify parameter name * Skip build for mono projects * Remove .NET 6 Preview install from build validation * Fix iOS sample package version Co-authored-by: Mitchell Hwang <[email protected]>
1 parent 7afb1cd commit 7ae0606

File tree

4 files changed

+48
-11
lines changed

4 files changed

+48
-11
lines changed

.github/workflows/build-validation.yml

-8
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ jobs:
4545
Invoke-WebRequest https://raw.githubusercontent.com/dotnet/install-scripts/master/src/dotnet-install.ps1 -OutFile dotnet-install.ps1
4646
echo "Installing dotnet version ${{ env.DOTNET_INSTALLER_CHANNEL }}"
4747
.\dotnet-install.ps1 -InstallDir "c:\program files\dotnet" -Channel "${{ env.DOTNET_INSTALLER_CHANNEL }}"
48-
- name: Setup .NET SDK 6 Preview
49-
if: ${{ env.DOTNET_DO_INSTALL == 'true' }}
50-
run: |
51-
echo "Installing dotnet version ${{ env.DOTNET_INSTALLER_CHANNEL }}"
52-
.\dotnet-install.ps1 -InstallDir "c:\program files\dotnet" -Version 6.0.100-alpha.1.20529.2
5348
5449
# Install locate projs global tool
5550
- name: Install LocateProjects tool
@@ -75,6 +70,3 @@ jobs:
7570
- name: Report status
7671
run: |
7772
./.github/workflows/dependencies/Out-GithubActionStatus.ps1
78-
79-
80-

.github/workflows/dependencies/Get-MSBuildResults.ps1

+7-2
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,16 @@ foreach ($item in $workingSet) {
129129

130130
$data = $item.Split('|')
131131

132+
if ($data[1].Contains("mono-samples")){
133+
Write-Host "Found mono-sample project, Skipping."
134+
$counter++
135+
Continue
136+
}
132137
# Project found, build it
133-
if ([int]$data[0] -eq 0) {
138+
elseif ([int]$data[0] -eq 0) {
134139
$projectFile = Resolve-Path "$RepoRootDir\$($data[2])"
135140
$configFile = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($projectFile), "snippets.5000.json")
136-
141+
137142
# Create the default build command
138143
"dotnet build `"$projectFile`"" | Out-File ".\run.bat"
139144

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish Mono Samples
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "core/mono-samples/**.c"
7+
- "core/mono-samples/**.config"
8+
- "core/mono-samples/**.cs"
9+
- "core/mono-samples/**.csproj"
10+
- "core/mono-samples/**.html"
11+
- "core/mono-samples/**.java"
12+
- "core/mono-samples/**.js"
13+
- "core/mono-samples/**.m"
14+
- "core/mono-samples/**.py"
15+
- "core/mono-samples/**.txt"
16+
branches: [ master ]
17+
18+
env:
19+
DOTNET_INSTALLER_CHANNEL: '6.0.100-alpha.1.20531.2'
20+
DOTNET_DO_INSTALL: 'true'
21+
22+
jobs:
23+
build-mono:
24+
runs-on: macos-latest
25+
steps:
26+
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 #@v2
27+
- name: Setup .NET SDK 6
28+
if: ${{ env.DOTNET_DO_INSTALL == 'true' }}
29+
run: |
30+
echo "Downloading dotnet-install.sh"
31+
curl https://raw.githubusercontent.com/dotnet/install-scripts/master/src/dotnet-install.sh --output dotnet-install.sh
32+
echo "Installing dotnet version ${{ env.DOTNET_INSTALLER_CHANNEL }}"
33+
chmod +x ./dotnet-install.sh
34+
./dotnet-install.sh -InstallDir ~/.dotnet -Version ${{ env.DOTNET_INSTALLER_CHANNEL }}
35+
- name: Publish mono iOS sample
36+
run: |
37+
cd ./core/mono-samples/iOS
38+
dotnet publish /p:RunningOnCI=True

core/mono-samples/iOS/iOSSampleApp.csproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Runtime.iOS.Sample.Mono" Version="6.0.0-$(BundledNETCoreAppPackageVersion)" GeneratePathProperty="true" />
13+
<PackageReference Include="Microsoft.NET.Runtime.iOS.Sample.Mono" Version="$(BundledNETCoreAppPackageVersion)" GeneratePathProperty="true" />
1414
</ItemGroup>
1515

1616
<UsingTask TaskName="AppleAppBuilderTask"
@@ -42,7 +42,9 @@
4242
<Output TaskParameter="AppBundlePath" PropertyName="AppBundlePath" />
4343
<Output TaskParameter="XcodeProjectPath" PropertyName="XcodeProjectPath" />
4444
</AppleAppBuilderTask>
45+
</Target>
4546

47+
<Target Name="LaunchApp" AfterTargets="BuildAppBundle" Condition="'$(RunningOnCI)' == ''">
4648
<Message Importance="High" Text="Xcode: $(XcodeProjectPath)" />
4749
<Message Importance="High" Text="App: $(AppBundlePath)" />
4850
<Message Importance="High" Text="Restarting device" />

0 commit comments

Comments
 (0)