forked from parasyte/libmad-n64
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
86 lines (77 loc) · 3.52 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
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
steps:
- bash: |
sudo add-apt-repository ppa:jonathonf/gcc -y
sudo apt-get -qq update
sudo apt-get install -y build-essential software-properties-common
sudo apt-get install -y gcc-9
displayName: 'Setup Environment'
continueOnError: false
- script: |
curl -L https://n64tools.blob.core.windows.net/binaries/N64-tools/libdragon/develop/latest/libdragon-linux64.tar.gz --output libdragon-linux64.tar.gz
displayName: 'Get dependencies'
continueOnError: false
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'libdragon-linux64.tar.gz'
destinationFolder: toolchain/libdragon
cleanDestinationFolder: false
displayName: 'Extract libdragon-linux64'
continueOnError: false
- bash: |
export PATH=$BUILD_SOURCESDIRECTORY/toolchain/libdragon/gcc-toolchain-mips64/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BUILD_SOURCESDIRECTORY/toolchain/libdragon/gcc-toolchain-mips64/x86_64-pc-linux-gnu/mips64-elf/lib/
sudo ldconfig
CC="$BUILD_SOURCESDIRECTORY/toolchain/libdragon/gcc-toolchain-mips64/bin/mips64-elf-gcc" \
LD="$BUILD_SOURCESDIRECTORY/toolchain/libdragon/gcc-toolchain-mips64/bin/mips64-elf-ld" \
CFLAGS="-std=c17 -march=vr4300 -mtune=vr4300 -I$BUILD_SOURCESDIRECTORY/toolchain/libdragon/gcc-toolchain-mips64/mips64-elf/include/" \
LDFLAGS="-L$BUILD_SOURCESDIRECTORY/toolchain/libdragon/gcc-toolchain-mips64/mips64-elf/lib/ -Tn64ld.x" \
LIBS="-ldragon -lc -ldragonsys -lnosys" \
./configure --host=mips64-elf --prefix=$BUILD_ARTIFACTSTAGINGDIRECTORY
make
make install
#cat config.log #use for debug
displayName: 'Build Lib'
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: 'libmad'
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)/libmad.zip'
#replaceExistingArchive: true
- task: AzureCLI@1
inputs:
connectedServiceNameARM: 'MsdnAzureServiceRole'
scriptLocation: 'inlineScript'
inlineScript: 'az storage blob upload --account-name n64tools -f $(Build.ArtifactStagingDirectory)/libmad.zip -c binaries -n N64-tools/libs/$(Build.SourceBranchName)/latest/libmad.zip'
displayName: Upload linux binary to Blob storage
#- task: GithubRelease@0
# displayName: 'Create GitHub Release'
# inputs:
# gitHubConnection: libmad
# repositoryName: N64-tools/libmad
# #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