Skip to content

Add yamato configurations for building and uploading artifact to Stevedore. #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .yamato/Globals.metafile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
globals:
artifact_base_name: dotnet-unity
stevedore_publish_location: testing
37 changes: 0 additions & 37 deletions .yamato/build_and_test_osx_x64.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Build and Test Linux x64
{% metadata_file .yamato/Globals.metafile %}
---
name: Build Linux x64

agent:
type: Unity::VM
image: platform-foundation/linux-ubuntu-18.04-mono-bokken:0.1.7-978398
flavor: b1.large

variables:
ARTIFACT_FILENAME: {{globals.artifact_base_name}}-linux-x64.7z

commands:
- mkdir artifacts
- curl https://public-stevedore.unity3d.com/r/public/7za-linux-x64/e6c75fb7ffda_e6a295cdcae3f74d315361883cf53f75141be2e739c020035f414a449d4876af.zip --output artifacts/7za-linux-x64.zip
Expand All @@ -17,22 +22,12 @@ commands:
cmake --build .
- ./build.sh -subset clr+libs+libs -a x64 -c release -ci -ninja
- cp unity/unitygc/release/libunitygc.so artifacts/bin/microsoft.netcore.app.runtime.linux-x64/Release/runtimes/linux-x64/native
- artifacts/7za-linux-x64/7za a artifacts/unity/dotnet-runtime-unity-linux-x64.7z ./artifacts/bin/microsoft.netcore.app.runtime.linux-x64/Release/runtimes/linux-x64
# build/run tests
- ./build.sh -subset libs.tests -test -a x64 -c release -ci -ninja
- command: ./src/tests/build.sh x64 release ci
retries: 1
- ./src/tests/run.sh x64 release
- ./build.sh clr.paltests
- ./artifacts/bin/coreclr/$(uname).x64.Debug/paltests/runpaltests.sh $(pwd)/artifacts/bin/coreclr/$(uname).x64.Debug/paltests

triggers:
pull_requests:
- targets:
only:
- "unity-main"
- artifacts/7za-linux-x64/7za a artifacts/unity/$ARTIFACT_FILENAME ./artifacts/bin/microsoft.netcore.app.runtime.linux-x64/Release/runtimes/linux-x64

artifacts:
linux64:
artifacts:
linux-x64-7z:
paths:
- artifacts/unity/**
linux-x64:
paths:
- artifacts/unity/dotnet-runtime-unity-linux-x64.7z
- artifacts/bin/**
33 changes: 33 additions & 0 deletions .yamato/build_osx_x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% metadata_file .yamato/Globals.metafile %}
---
name: Build OSX x64

agent:
type: Unity::VM::osx
image: platform-foundation/mac-bokken:v0.1.8-972754
flavor: m1.mac

variables:
ARTIFACT_FILENAME: {{globals.artifact_base_name}}-osx-x64.7z

commands:
- mkdir artifacts
- curl https://public-stevedore.unity3d.com/r/public/7za-mac-x64/e6c75fb7ffda_5bd76652986a0e3756d1cfd7e84ce056a9e1dbfc5f70f0514a001f724c0fbad2.zip --output artifacts/7za-mac-x64.zip
- unzip artifacts/7za-mac-x64.zip -d artifacts/7za-mac-x64
- |
cd unity/unitygc
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
- LD_LIBRARY_PATH=/usr/local/opt/openssl/lib ./build.sh -subset clr+libs -a x64 -c release -ci -ninja
- cp unity/unitygc/release/libunitygc.dylib artifacts/bin/microsoft.netcore.app.runtime.osx-x64/Release/runtimes/osx-x64/native
- artifacts/7za-mac-x64/7za a artifacts/unity/$ARTIFACT_FILENAME ./artifacts/bin/microsoft.netcore.app.runtime.osx-x64/Release/runtimes/osx-x64

artifacts:
osx-x64-7z:
paths:
- artifacts/unity/**
osx-x64:
paths:
- artifacts/bin/**
30 changes: 14 additions & 16 deletions .yamato/build_windows.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Build and Test Windows x86
{% metadata_file .yamato/Globals.metafile %}
---
name: Build Windows x86

agent:
type: Unity::VM
image: platform-foundation/windows-vs2019-il2cpp-bokken:latest
image: platform-foundation/windows-vs2019-il2cpp-bokken:v1.1.6-1025111
flavor: b1.xlarge

variables:
ARTIFACT_FILENAME: {{globals.artifact_base_name}}-win-x86.7z

commands:
- |
cd unity\unitygc
Expand All @@ -13,19 +18,12 @@ commands:
- build.cmd -subset clr+libs -a x86 -c release -ci
- copy unity\unitygc\Release\unitygc.dll artifacts\bin\microsoft.netcore.app.runtime.win-x86\Release\runtimes\win-x86\native
- powershell .yamato\scripts\download_7z.ps1
- artifacts\7za-win-x64\7za.exe a artifacts\unity\dotnet-runtime-unity-win-x86.7z .\artifacts\bin\microsoft.netcore.app.runtime.win-x86\Release\runtimes\win-x86
# build/run tests
- build.cmd libs.tests -test -a x86 -c release -ci
- src\tests\build.cmd x86 release ci
- src\tests\run.cmd x86 release

triggers:
pull_requests:
- targets:
only:
- "unity-main"
- artifacts\7za-win-x64\7za.exe a artifacts\unity\%ARTIFACT_FILENAME% .\artifacts\bin\microsoft.netcore.app.runtime.win-x86\Release\runtimes\win-x86

artifacts:
win64:
artifacts:
win-x86-7z:
paths:
- artifacts\unity\**
win-x86:
paths:
- artifacts\unity\dotnet-runtime-unity-win-x86.7z
- artifacts\bin\**
30 changes: 14 additions & 16 deletions .yamato/build_windows_x64.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Build and Test Windows x64
{% metadata_file .yamato/Globals.metafile %}
---
name: Build Windows x64

agent:
type: Unity::VM
image: platform-foundation/windows-vs2019-il2cpp-bokken:latest
image: platform-foundation/windows-vs2019-il2cpp-bokken:v1.1.6-1025111
flavor: b1.xlarge

variables:
ARTIFACT_FILENAME: {{globals.artifact_base_name}}-win-x64.7z

commands:
- |
cd unity\unitygc
Expand All @@ -13,19 +18,12 @@ commands:
- build.cmd -subset clr+libs -a x64 -c release -ci
- copy unity\unitygc\Release\unitygc.dll artifacts\bin\microsoft.netcore.app.runtime.win-x64\Release\runtimes\win-x64\native
- powershell .yamato\scripts\download_7z.ps1
- artifacts\7za-win-x64\7za.exe a artifacts\unity\dotnet-runtime-unity-win-x64.7z .\artifacts\bin\microsoft.netcore.app.runtime.win-x64\Release\runtimes\win-x64
# build/run tests
- build.cmd libs.tests -test -a x64 -c release -ci
- src\tests\build.cmd x64 release ci
- src\tests\run.cmd x64 release

triggers:
pull_requests:
- targets:
only:
- "unity-main"
- artifacts\7za-win-x64\7za.exe a artifacts\unity\%ARTIFACT_FILENAME% .\artifacts\bin\microsoft.netcore.app.runtime.win-x64\Release\runtimes\win-x64

artifacts:
win64:
artifacts:
win-x64-7z:
paths:
- artifacts\unity\**
win-x64:
paths:
- artifacts\unity\dotnet-runtime-unity-win-x64.7z
- artifacts\bin\**
7 changes: 7 additions & 0 deletions .yamato/publish_to_stevedore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
all:
name: Publish To Stevedore
dependencies:
- .yamato/publish_to_stevedore_windows.yml
- .yamato/publish_to_stevedore_windows_x64.yml
- .yamato/publish_to_stevedore_osx_x64.yml
- .yamato/publish_to_stevedore_linux_x64.yml
20 changes: 20 additions & 0 deletions .yamato/publish_to_stevedore_linux_x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% metadata_file .yamato/Globals.metafile %}
---
name: Publish To Stevedore Linux x64

agent:
type: Unity::VM
image: platform-foundation/linux-ubuntu-18.04-mono-bokken:latest
flavor: b1.large

dependencies:
- path: .yamato/build_linux_x64.yml

variables:
STEVEDORE_REPO: {{globals.stevedore_publish_location}}

commands:
# upload to stevedore
- curl -sSo StevedoreUpload "$STEVEDORE_UPLOAD_TOOL_LINUX_X64_URL"
- chmod +x StevedoreUpload
- ./StevedoreUpload --version-len=12 --repo=$STEVEDORE_REPO --version="$GIT_REVISION" artifacts/unity/*
20 changes: 20 additions & 0 deletions .yamato/publish_to_stevedore_osx_x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% metadata_file .yamato/Globals.metafile %}
---
name: Publish To Stevedore OSX x64

agent:
type: Unity::VM::osx
image: platform-foundation/mac-bokken:latest
flavor: m1.mac

dependencies:
- path: .yamato/build_osx_x64.yml

variables:
STEVEDORE_REPO: {{globals.stevedore_publish_location}}

commands:
# upload to stevedore
- curl -sSo StevedoreUpload "$STEVEDORE_UPLOAD_TOOL_MAC_X64_URL"
- chmod +x StevedoreUpload
- ./StevedoreUpload --version-len=12 --repo=$STEVEDORE_REPO --version="$GIT_REVISION" artifacts/unity/*
19 changes: 19 additions & 0 deletions .yamato/publish_to_stevedore_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% metadata_file .yamato/Globals.metafile %}
---
name: Publish To Stevedore Windows x86

agent:
type: Unity::VM
image: platform-foundation/windows-vs2019-il2cpp-bokken:latest
flavor: b1.xlarge

dependencies:
- path: .yamato/build_windows.yml

variables:
STEVEDORE_REPO: {{globals.stevedore_publish_location}}

commands:
# upload to stevedore
- curl -sSo StevedoreUpload.exe "%STEVEDORE_UPLOAD_TOOL_WINDOWS_X64_URL%"
- StevedoreUpload.exe --version-len=12 --repo=%STEVEDORE_REPO% --version="%GIT_REVISION%" artifacts\unity\*
19 changes: 19 additions & 0 deletions .yamato/publish_to_stevedore_windows_x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% metadata_file .yamato/Globals.metafile %}
---
name: Publish To Stevedore Windows x64

agent:
type: Unity::VM
image: platform-foundation/windows-vs2019-il2cpp-bokken:latest
flavor: b1.xlarge

dependencies:
- path: .yamato/build_windows_x64.yml

variables:
STEVEDORE_REPO: {{globals.stevedore_publish_location}}

commands:
# upload to stevedore
- curl -sSo StevedoreUpload.exe "%STEVEDORE_UPLOAD_TOOL_WINDOWS_X64_URL%"
- StevedoreUpload.exe --version-len=12 --repo=%STEVEDORE_REPO% --version="%GIT_REVISION%" artifacts\unity\*
26 changes: 26 additions & 0 deletions .yamato/test_linux_x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% metadata_file .yamato/Globals.metafile %}
---
name: Test Linux x64

agent:
type: Unity::VM
image: platform-foundation/linux-ubuntu-18.04-mono-bokken:0.1.7-978398
flavor: b1.large

dependencies:
- path: .yamato/build_linux_x64.yml

commands:
# build/run tests
- ./build.sh -subset libs.tests -test -a x64 -c release -ci -ninja
- command: ./src/tests/build.sh x64 release ci
retries: 1
- ./src/tests/run.sh x64 release
- ./build.sh clr.paltests
- ./artifacts/bin/coreclr/$(uname).x64.Debug/paltests/runpaltests.sh $(pwd)/artifacts/bin/coreclr/$(uname).x64.Debug/paltests

triggers:
pull_requests:
- targets:
only:
- "unity-main"
25 changes: 25 additions & 0 deletions .yamato/test_osx_x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% metadata_file .yamato/Globals.metafile %}
---
name: Test OSX x64

agent:
type: Unity::VM::osx
image: platform-foundation/mac-bokken:v0.1.8-972754
flavor: m1.mac

dependencies:
- path: .yamato/build_osx_x64.yml

commands:
# build/run tests
- LD_LIBRARY_PATH=/usr/local/opt/openssl/lib ./build.sh -subset libs.tests -test -a x64 -c release -ci -ninja
- ./src/tests/build.sh x64 release ci
- ./src/tests/run.sh x64 release
- ./build.sh clr.paltests
- ./artifacts/bin/coreclr/OSX.x64.Debug/paltests/runpaltests.sh $(pwd)/artifacts/bin/coreclr/OSX.x64.Debug/paltests

triggers:
pull_requests:
- targets:
only:
- "unity-main"
23 changes: 23 additions & 0 deletions .yamato/test_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% metadata_file .yamato/Globals.metafile %}
---
name: Test Windows x86

agent:
type: Unity::VM
image: platform-foundation/windows-vs2019-il2cpp-bokken:v1.1.6-1025111
flavor: b1.xlarge

dependencies:
- path: .yamato/build_windows.yml

commands:
# build/run tests
- build.cmd libs.tests -test -a x86 -c release -ci
- src\tests\build.cmd x86 release ci
- src\tests\run.cmd x86 release

triggers:
pull_requests:
- targets:
only:
- "unity-main"
Loading