-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
106 lines (91 loc) · 4.18 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
trigger:
branches:
include: ["master", "trunk", "develop*", "release-*", "refs/tags/*" ]
paths:
exclude: [ "doc", "*.md", ".gitignore", "README.md" ]
jobs:
- job: Windows
pool:
vmImage: 'windows-latest'
steps:
- script: |
curl -L https://n64tools.blob.core.windows.net/binaries/N64-tools/mips64-gcc-toolchain/master/latest/gcc-toolchain-mips64-win64.zip --output gcc-toolchain-mips64-win64.zip
curl -L https://raw.githubusercontent.com/tronkko/dirent/master/include/dirent.h --output ./include/dirent.h
curl -L https://windows.php.net/downloads/php-sdk/deps/vc15/x64/libpng-1.6.34-2-vc15-x64.zip --output libpng.zip
displayName: 'Get dependencies'
continueOnError: false
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'gcc-toolchain-mips64-win64.zip'
destinationFolder: gcc-toolchain-mips64
cleanDestinationFolder: false
displayName: 'Extract gcc-toolchain-mips64-win64'
continueOnError: false
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'libpng.zip'
destinationFolder: libpng
cleanDestinationFolder: false
displayName: 'Extract libpng'
continueOnError: false
- bash: |
sed -i -- 's|rm -f \*\.o \*\.a|DEL /F \*\.o \*\.a|g' $BUILD_SOURCESDIRECTORY/Makefile
sed -i -- 's|rm -rf $(CURDIR)/build|RD /S /Q $(CURDIR)/build|g' $BUILD_SOURCESDIRECTORY/Makefile
displayName: 'Adjust Make Files for Windows'
continueOnError: false
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cl .\tools\chksum64.c
cl .\tools\n64tool.c
cl .\tools\dumpdfs\dumpdfs.c -I .\include\
cl .\tools\mkdfs\mkdfs.c -I .\include\
cl .\tools\mksprite\convtool.c
cl /MD .\tools\mksprite\mksprite.c .\libpng\lib\libpng.lib /I .\libpng\include\libpng16\ /link
set N64_INST="%BUILD_SOURCESDIRECTORY%\gcc-toolchain-mips64"
set PATH=%PATH%;%BUILD_SOURCESDIRECTORY%\gcc-toolchain-mips64\bin
make libdragon
displayName: 'Build SDK'
continueOnError: false
- bash: |
mkdir -p $BUILD_ARTIFACTSTAGINGDIRECTORY/tools/
cp "$BUILD_SOURCESDIRECTORY/"*.exe "$BUILD_ARTIFACTSTAGINGDIRECTORY/tools/"
cp "$BUILD_SOURCESDIRECTORY/libpng/bin/libpng.dll" "$BUILD_ARTIFACTSTAGINGDIRECTORY/tools/"
mkdir -p $BUILD_ARTIFACTSTAGINGDIRECTORY/include/
cp "$BUILD_SOURCESDIRECTORY/include/"* "$BUILD_ARTIFACTSTAGINGDIRECTORY/include/"
mkdir -p $BUILD_ARTIFACTSTAGINGDIRECTORY/lib/
cp "$BUILD_SOURCESDIRECTORY/"*.a "$BUILD_ARTIFACTSTAGINGDIRECTORY/lib/"
cp "$BUILD_SOURCESDIRECTORY/"*.ld "$BUILD_ARTIFACTSTAGINGDIRECTORY/lib/"
cp "$BUILD_SOURCESDIRECTORY/header" "$BUILD_ARTIFACTSTAGINGDIRECTORY/lib/"
displayName: 'Move Artifacts to Staging Directory'
continueOnError: false
# Publish build artifacts to Azure Artifacts/TFS or a file share
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'binaries'
publishLocation: 'Container' # Options: container, filePath
#targetPath: # Required when publishLocation == FilePath
parallel: true # Optional
#parallelCount: # Optional
# Archive Files
# Archive files using compression formats such as .7z, .rar, .tar.gz, and .zip.
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)'
includeRootFolder: false
archiveType: 'zip' # Options: zip, 7z, tar, wim
#tarCompression: 'gz' # Optional. Options: gz, bz2, xz, none
archiveFile: '$(Build.ArtifactStagingDirectory)/libdragon-win64.zip'
#replaceExistingArchive: true
- task: AzureFileCopy@3
inputs:
sourcePath: '$(Build.ArtifactStagingDirectory)\*.zip'
azureSubscription: 'MsdnAzureServiceRole'
Destination: 'AzureBlob'
storage: 'n64tools'
ContainerName: 'binaries'
blobPrefix: 'N64-tools/libdragon/$(Build.SourceBranchName)/latest/'
outputStorageUri: 'outputStorageUri'
displayName: Upload program to Blob storage
#condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))