Skip to content

Commit 7d2fc50

Browse files
Merge pull request #42 from Unity-Technologies/yamato-create-stevedore-artifacts
Add yamato configurations for building and uploading artifact to Stevedore.
2 parents 8e4090b + 41f1bd8 commit 7d2fc50

15 files changed

+259
-87
lines changed

.yamato/Globals.metafile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
globals:
2+
artifact_base_name: dotnet-unity
3+
stevedore_publish_location: testing

.yamato/build_and_test_osx_x64.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
name: Build and Test Linux x64
1+
{% metadata_file .yamato/Globals.metafile %}
2+
---
3+
name: Build Linux x64
24

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

10+
variables:
11+
ARTIFACT_FILENAME: {{globals.artifact_base_name}}-linux-x64.7z
12+
813
commands:
914
- mkdir artifacts
1015
- curl https://public-stevedore.unity3d.com/r/public/7za-linux-x64/e6c75fb7ffda_e6a295cdcae3f74d315361883cf53f75141be2e739c020035f414a449d4876af.zip --output artifacts/7za-linux-x64.zip
@@ -17,22 +22,12 @@ commands:
1722
cmake --build .
1823
- ./build.sh -subset clr+libs+libs -a x64 -c release -ci -ninja
1924
- cp unity/unitygc/release/libunitygc.so artifacts/bin/microsoft.netcore.app.runtime.linux-x64/Release/runtimes/linux-x64/native
20-
- 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
21-
# build/run tests
22-
- ./build.sh -subset libs.tests -test -a x64 -c release -ci -ninja
23-
- command: ./src/tests/build.sh x64 release ci
24-
retries: 1
25-
- ./src/tests/run.sh x64 release
26-
- ./build.sh clr.paltests
27-
- ./artifacts/bin/coreclr/$(uname).x64.Debug/paltests/runpaltests.sh $(pwd)/artifacts/bin/coreclr/$(uname).x64.Debug/paltests
28-
29-
triggers:
30-
pull_requests:
31-
- targets:
32-
only:
33-
- "unity-main"
25+
- artifacts/7za-linux-x64/7za a artifacts/unity/$ARTIFACT_FILENAME ./artifacts/bin/microsoft.netcore.app.runtime.linux-x64/Release/runtimes/linux-x64
3426

35-
artifacts:
36-
linux64:
27+
artifacts:
28+
linux-x64-7z:
29+
paths:
30+
- artifacts/unity/**
31+
linux-x64:
3732
paths:
38-
- artifacts/unity/dotnet-runtime-unity-linux-x64.7z
33+
- artifacts/bin/**

.yamato/build_osx_x64.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{% metadata_file .yamato/Globals.metafile %}
2+
---
3+
name: Build OSX x64
4+
5+
agent:
6+
type: Unity::VM::osx
7+
image: platform-foundation/mac-bokken:v0.1.8-972754
8+
flavor: m1.mac
9+
10+
variables:
11+
ARTIFACT_FILENAME: {{globals.artifact_base_name}}-osx-x64.7z
12+
13+
commands:
14+
- mkdir artifacts
15+
- curl https://public-stevedore.unity3d.com/r/public/7za-mac-x64/e6c75fb7ffda_5bd76652986a0e3756d1cfd7e84ce056a9e1dbfc5f70f0514a001f724c0fbad2.zip --output artifacts/7za-mac-x64.zip
16+
- unzip artifacts/7za-mac-x64.zip -d artifacts/7za-mac-x64
17+
- |
18+
cd unity/unitygc
19+
mkdir release
20+
cd release
21+
cmake -DCMAKE_BUILD_TYPE=Release ..
22+
cmake --build .
23+
- LD_LIBRARY_PATH=/usr/local/opt/openssl/lib ./build.sh -subset clr+libs -a x64 -c release -ci -ninja
24+
- cp unity/unitygc/release/libunitygc.dylib artifacts/bin/microsoft.netcore.app.runtime.osx-x64/Release/runtimes/osx-x64/native
25+
- artifacts/7za-mac-x64/7za a artifacts/unity/$ARTIFACT_FILENAME ./artifacts/bin/microsoft.netcore.app.runtime.osx-x64/Release/runtimes/osx-x64
26+
27+
artifacts:
28+
osx-x64-7z:
29+
paths:
30+
- artifacts/unity/**
31+
osx-x64:
32+
paths:
33+
- artifacts/bin/**

.yamato/build_windows.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
name: Build and Test Windows x86
1+
{% metadata_file .yamato/Globals.metafile %}
2+
---
3+
name: Build Windows x86
24

35
agent:
46
type: Unity::VM
5-
image: platform-foundation/windows-vs2019-il2cpp-bokken:latest
7+
image: platform-foundation/windows-vs2019-il2cpp-bokken:v1.1.6-1025111
68
flavor: b1.xlarge
79

10+
variables:
11+
ARTIFACT_FILENAME: {{globals.artifact_base_name}}-win-x86.7z
12+
813
commands:
914
- |
1015
cd unity\unitygc
@@ -13,19 +18,12 @@ commands:
1318
- build.cmd -subset clr+libs -a x86 -c release -ci
1419
- copy unity\unitygc\Release\unitygc.dll artifacts\bin\microsoft.netcore.app.runtime.win-x86\Release\runtimes\win-x86\native
1520
- powershell .yamato\scripts\download_7z.ps1
16-
- 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
17-
# build/run tests
18-
- build.cmd libs.tests -test -a x86 -c release -ci
19-
- src\tests\build.cmd x86 release ci
20-
- src\tests\run.cmd x86 release
21-
22-
triggers:
23-
pull_requests:
24-
- targets:
25-
only:
26-
- "unity-main"
21+
- artifacts\7za-win-x64\7za.exe a artifacts\unity\%ARTIFACT_FILENAME% .\artifacts\bin\microsoft.netcore.app.runtime.win-x86\Release\runtimes\win-x86
2722

28-
artifacts:
29-
win64:
23+
artifacts:
24+
win-x86-7z:
25+
paths:
26+
- artifacts\unity\**
27+
win-x86:
3028
paths:
31-
- artifacts\unity\dotnet-runtime-unity-win-x86.7z
29+
- artifacts\bin\**

.yamato/build_windows_x64.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
name: Build and Test Windows x64
1+
{% metadata_file .yamato/Globals.metafile %}
2+
---
3+
name: Build Windows x64
24

35
agent:
46
type: Unity::VM
5-
image: platform-foundation/windows-vs2019-il2cpp-bokken:latest
7+
image: platform-foundation/windows-vs2019-il2cpp-bokken:v1.1.6-1025111
68
flavor: b1.xlarge
79

10+
variables:
11+
ARTIFACT_FILENAME: {{globals.artifact_base_name}}-win-x64.7z
12+
813
commands:
914
- |
1015
cd unity\unitygc
@@ -13,19 +18,12 @@ commands:
1318
- build.cmd -subset clr+libs -a x64 -c release -ci
1419
- copy unity\unitygc\Release\unitygc.dll artifacts\bin\microsoft.netcore.app.runtime.win-x64\Release\runtimes\win-x64\native
1520
- powershell .yamato\scripts\download_7z.ps1
16-
- 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
17-
# build/run tests
18-
- build.cmd libs.tests -test -a x64 -c release -ci
19-
- src\tests\build.cmd x64 release ci
20-
- src\tests\run.cmd x64 release
21-
22-
triggers:
23-
pull_requests:
24-
- targets:
25-
only:
26-
- "unity-main"
21+
- artifacts\7za-win-x64\7za.exe a artifacts\unity\%ARTIFACT_FILENAME% .\artifacts\bin\microsoft.netcore.app.runtime.win-x64\Release\runtimes\win-x64
2722

28-
artifacts:
29-
win64:
23+
artifacts:
24+
win-x64-7z:
25+
paths:
26+
- artifacts\unity\**
27+
win-x64:
3028
paths:
31-
- artifacts\unity\dotnet-runtime-unity-win-x64.7z
29+
- artifacts\bin\**

.yamato/publish_to_stevedore.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
all:
2+
name: Publish To Stevedore
3+
dependencies:
4+
- .yamato/publish_to_stevedore_windows.yml
5+
- .yamato/publish_to_stevedore_windows_x64.yml
6+
- .yamato/publish_to_stevedore_osx_x64.yml
7+
- .yamato/publish_to_stevedore_linux_x64.yml
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% metadata_file .yamato/Globals.metafile %}
2+
---
3+
name: Publish To Stevedore Linux x64
4+
5+
agent:
6+
type: Unity::VM
7+
image: platform-foundation/linux-ubuntu-18.04-mono-bokken:latest
8+
flavor: b1.large
9+
10+
dependencies:
11+
- path: .yamato/build_linux_x64.yml
12+
13+
variables:
14+
STEVEDORE_REPO: {{globals.stevedore_publish_location}}
15+
16+
commands:
17+
# upload to stevedore
18+
- curl -sSo StevedoreUpload "$STEVEDORE_UPLOAD_TOOL_LINUX_X64_URL"
19+
- chmod +x StevedoreUpload
20+
- ./StevedoreUpload --version-len=12 --repo=$STEVEDORE_REPO --version="$GIT_REVISION" artifacts/unity/*
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% metadata_file .yamato/Globals.metafile %}
2+
---
3+
name: Publish To Stevedore OSX x64
4+
5+
agent:
6+
type: Unity::VM::osx
7+
image: platform-foundation/mac-bokken:latest
8+
flavor: m1.mac
9+
10+
dependencies:
11+
- path: .yamato/build_osx_x64.yml
12+
13+
variables:
14+
STEVEDORE_REPO: {{globals.stevedore_publish_location}}
15+
16+
commands:
17+
# upload to stevedore
18+
- curl -sSo StevedoreUpload "$STEVEDORE_UPLOAD_TOOL_MAC_X64_URL"
19+
- chmod +x StevedoreUpload
20+
- ./StevedoreUpload --version-len=12 --repo=$STEVEDORE_REPO --version="$GIT_REVISION" artifacts/unity/*
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{% metadata_file .yamato/Globals.metafile %}
2+
---
3+
name: Publish To Stevedore Windows x86
4+
5+
agent:
6+
type: Unity::VM
7+
image: platform-foundation/windows-vs2019-il2cpp-bokken:latest
8+
flavor: b1.xlarge
9+
10+
dependencies:
11+
- path: .yamato/build_windows.yml
12+
13+
variables:
14+
STEVEDORE_REPO: {{globals.stevedore_publish_location}}
15+
16+
commands:
17+
# upload to stevedore
18+
- curl -sSo StevedoreUpload.exe "%STEVEDORE_UPLOAD_TOOL_WINDOWS_X64_URL%"
19+
- StevedoreUpload.exe --version-len=12 --repo=%STEVEDORE_REPO% --version="%GIT_REVISION%" artifacts\unity\*

0 commit comments

Comments
 (0)