This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
104 lines (93 loc) · 4.19 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
trigger:
branches:
include: ["master", "trunk", "develop*", "n64-*", "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://n64tools.blob.core.windows.net/binaries/N64-tools/libdragon/develop/latest/libdragon-win64.zip --output libdragon-win64.zip
displayName: 'Get dependencies'
continueOnError: false
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'gcc-toolchain-mips64-win64.zip'
destinationFolder: toolchain/gcc-toolchain-mips64
cleanDestinationFolder: false
displayName: 'Extract gcc-toolchain-mips64-win64'
continueOnError: false
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'libdragon-win64.zip'
destinationFolder: toolchain/libdragon
cleanDestinationFolder: false
displayName: 'Extract libdragon-win64'
continueOnError: false
- bash: |
sed -i -- 's|rm -f \*\.o \*\.a|DEL /F \*\.o \*\.a|g' $BUILD_SOURCESDIRECTORY/n64/Makefile
sed -i -- 's|rm -f $(CURDIR)/build/*|RD /S /Q $(CURDIR)/build|g' $BUILD_SOURCESDIRECTORY/n64/Makefile
sed -i -- 's|-I$(N64_INST)/mips64-elf/include -I$(CURDIR)/../include/ -I$(CURDIR)/|-I$(N64_INST)/mips64-elf/include -I$(CURDIR)/../include/ -I$(CURDIR)/ -I$(CURDIR)/../toolchain/libdragon/include|g' $BUILD_SOURCESDIRECTORY/n64/Makefile
displayName: 'Adjust Make Files for Windows'
continueOnError: false
- script: |
set N64_INST="%BUILD_SOURCESDIRECTORY%\toolchain\gcc-toolchain-mips64"
set PATH=%PATH%;%BUILD_SOURCESDIRECTORY%\toolchain\gcc-toolchain-mips64\bin
cd %BUILD_SOURCESDIRECTORY%\n64
make
displayName: 'Build Lib'
continueOnError: false
- bash: |
mkdir -p $BUILD_ARTIFACTSTAGINGDIRECTORY/include/
cp "$BUILD_SOURCESDIRECTORY/include/mikmod.h" "$BUILD_ARTIFACTSTAGINGDIRECTORY/include/"
mkdir -p $BUILD_ARTIFACTSTAGINGDIRECTORY/lib/
cp "$BUILD_SOURCESDIRECTORY/n64/"*.a "$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: 'libmikmod'
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)/libmikmod.zip'
#replaceExistingArchive: true
- task: AzureFileCopy@3
inputs:
sourcePath: '$(Build.ArtifactStagingDirectory)\*.zip'
azureSubscription: 'MsdnAzureServiceRole'
Destination: 'AzureBlob'
storage: 'n64tools'
ContainerName: 'binaries'
blobPrefix: 'N64-tools/libs/$(Build.SourceBranchName)/latest/'
outputStorageUri: 'outputStorageUri'
displayName: Upload program to Blob storage
#condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# - task: GithubRelease@0
# displayName: 'Create GitHub Release'
# inputs:
# gitHubConnection: libmikmod
# repositoryName: N64-tools/libmikmod
# #tagSource: manual
# #tag: $(Build.BuildNumber)
# assets: |
# $(Build.ArtifactStagingDirectory)/*
# isDraft: true # Optional
# action: 'create' # Options: create, edit, delete
# target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
# tagSource: 'auto' # Required when action == Create# Options: auto, manual