forked from buu342/N64-UNFLoader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
185 lines (166 loc) · 7.43 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
trigger:
branches:
include: ["master", "develop*", "release*", "refs/tags/*" ]
paths:
exclude: [ "doc", "*.md", ".gitignore" ]
jobs:
- job: UNFLoader_Linux
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
echo Add Linux dependencies
sudo apt-get install libncurses5-dev libncursesw5-dev
# curl -L https://raw.githubusercontent.com/lvandeve/lodepng/master/lodepng.cpp --output ./UNFLoader/Include/lodepng.cpp
# curl -L https://raw.githubusercontent.com/lvandeve/lodepng/master/lodepng.h --output ./UNFLoader/Include/lodepng.h
curl -L https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.4.8.gz --output libftd2xx.gz
mkdir ./libftd2xx
tar xvzf libftd2xx.gz -C ./libftd2xx
cd ./libftd2xx/release/
cp WinTypes.h ftd2xx.h $BUILD_SOURCESDIRECTORY/UNFLoader/Include/
echo Install FTDI driver.
sudo cp build/lib* /usr/local/lib
cd /usr/local/lib
sudo ln -s libftd2xx.so.1.4.8 libftd2xx.so
sudo chmod 0755 libftd2xx.so.1.4.8
#cd ./build/
#cp libftd2xx.so.1.4.8 $BUILD_SOURCESDIRECTORY/UNFLoader/Include/libftd2xx.so
cd $BUILD_SOURCESDIRECTORY
echo Build App
cd ./UNFLoader/
ls
make -f Makefile
#copy to artifacts directory
displayName: 'Build Program'
continueOnError: false
# Archive Files
# Archive files using compression formats such as .7z, .rar, .tar.gz, and .zip.
#- task: ArchiveFiles@2
# inputs:
# rootFolderOrFile: '$(Build.SourcesDirectory)/UNFLoader/'
# includeRootFolder: false
# archiveType: 'tar' # Options: zip, 7z, tar, wim
# tarCompression: 'gz' # Optional. Options: gz, bz2, xz, none
# archiveFile: '$(Build.ArtifactStagingDirectory)/unfloader-linux.tar.gz'
# #replaceExistingArchive: true
# Publish build artifacts to Azure Artifacts/TFS or a file share
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts
inputs:
pathtoPublish: '$(Build.SourcesDirectory)/UNFLoader/UNFLoader'
#pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'unfloader-linux'
publishLocation: 'Container' # Options: container, filePath
#targetPath: # Required when publishLocation == FilePath
parallel: true # Optional
#parallelCount: # Optional
- job: UNFLoader_Windows
pool:
vmImage: 'windows-latest'
steps:
#- script: |
# echo Downloading dependencies
#curl -L https://www.ftdichip.com/Drivers/CDM/CDM%20v2.12.28%20WHQL%20Certified.zip --output libftd2xx.zip
#curl -L https://github.com/wmcbrine/PDCurses/archive/3.9.zip --output PDCurses.zip
#curl -L https://raw.githubusercontent.com/lvandeve/lodepng/master/lodepng.cpp --output ./UNFLoader/Include/lodepng.cpp
#curl -L https://raw.githubusercontent.com/lvandeve/lodepng/master/lodepng.h --output ./UNFLoader/Include/lodepng.h
# displayName: 'Download Dependencies'
# continueOnError: false
# Visual Studio build
# Build with MSBuild and set the Visual Studio version property
- task: VSBuild@1
inputs:
solution: '**\*.sln'
vsVersion: '16.0' # Optional. Options: latest, 16.0, 15.0, 14.0, 12.0, 11.0
#msbuildArgs: # Optional
#platform: # Optional
#configuration: # Optional
#clean: false # Optional
#maximumCpuCount: false # Optional
#restoreNugetPackages: false # Optional
msbuildArchitecture: 'x86' # Optional. Options: x86, x64
#logProjectEvents: true # Optional
#createLogFile: false # Optional
#logFileVerbosity: 'normal' # Optional. Options: quiet, minimal, normal, detailed, diagnostic
# Archive Files
# Archive files using compression formats such as .7z, .rar, .tar.gz, and .zip.
#- task: ArchiveFiles@2
# inputs:
# rootFolderOrFile: '$(Build.SourcesDirectory)/UNFLoader/Debug/'
# includeRootFolder: false
# archiveType: 'zip' # Options: zip, 7z, tar, wim
# #tarCompression: 'gz' # Optional. Options: gz, bz2, xz, none
# archiveFile: '$(Build.ArtifactStagingDirectory)/unfloader-win_x86.zip'
# #replaceExistingArchive: true
# Publish build artifacts to Azure Artifacts/TFS or a file share
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts
inputs:
pathtoPublish: '$(Build.SourcesDirectory)/UNFLoader/Debug/UNFLoader.exe'
#pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'unfloader-windows'
publishLocation: 'Container' # Options: container, filePath
#targetPath: # Required when publishLocation == FilePath
parallel: true # Optional
#parallelCount: # Optional
# GitHub Release https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azure-devops
# Create, edit, or delete a GitHub release
#- task: GitHubRelease@0
# inputs:
# gitHubConnection:
#repositoryName: '$(Build.Repository.Name)'
#action: 'create' # Options: create, edit, delete
#target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
#tagSource: 'auto' # Required when action == Create# Options: auto, manual
#tagPattern: # Optional
#tag: # Required when action == Edit || Action == Delete || TagSource == Manual
#title: # Optional
#releaseNotesSource: 'file' # Optional. Options: file, input
#releaseNotesFile: # Optional
#releaseNotes: # Optional
#assets: '$(Build.ArtifactStagingDirectory)/*' # Optional
#assetUploadMode: 'delete' # Optional. Options: delete, replace
#isDraft: false # Optional
#isPreRelease: false # Optional
#addChangeLog: true # Optional
#compareWith: 'lastFullRelease' # Required when addChangeLog == True. Options: lastFullRelease, lastRelease, lastReleaseByTag
#releaseTag: # Required when compareWith == LastReleaseByTag
- job: UFNLoader_macOS
pool:
vmImage: 'macOS-latest'
steps:
- script: |
echo Install helper package
curl -L https://www.ftdichip.com/old2020/Drivers/D2XX/MacOSX/D2xxHelper_v2.0.0.pkg --output helper.pkg
sudo installer -pkg ./helper.pkg -target /
echo Install D2XX drivers
curl -L https://ftdichip.com/wp-content/uploads/2021/01/D2XX1.4.22.zip --output macos_drivers.zip
unzip ./macos_drivers.zip
echo Attach drivers disk image
hdiutil attach ./D2XX1.4.22.dmg
echo Install drivers to installation location
sudo mkdir -p /usr/local/lib
sudo mkdir -p /usr/local/include
sudo cp /Volumes/release/D2XX/libftd2xx.1.4.22.dylib /usr/local/lib/libftd2xx.1.4.22.dylib
sudo ln -sf /usr/local/lib/libftd2xx.1.4.22.dylib /usr/local/lib/libftd2xx.dylib
sudo cp /Volumes/release/D2XX/ftd2xx.h /usr/local/include/ftd2xx.h
sudo cp /Volumes/release/D2XX/WinTypes.h /usr/local/include/WinTypes.h
echo Build macOS App
cd ./UNFLoader/
make
cd ..
echo Detatch drivers disk image
diskutil eject /Volumes/release
displayName: 'Build Program'
continueOnError: false
# Publish build artifacts to Azure Artifacts/TFS or a file share
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts
inputs:
pathtoPublish: '$(Build.SourcesDirectory)/UNFLoader/UNFLoader'
#pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'unfloader-macOS'
publishLocation: 'Container' # Options: container, filePath
#targetPath: # Required when publishLocation == FilePath
parallel: true # Optional
#parallelCount: # Optional