-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
179 lines (145 loc) · 4.3 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
# Copyright (c) Omar Boukli-Hacene. All rights reserved.
# Distributed under an MIT-style license that can be
# found in the LICENSE file.
# SPDX-License-Identifier: MIT
trigger:
branches:
include:
- "*"
resources:
repositories:
- repository: vcpkg
type: github
name: microsoft/vcpkg
endpoint: oboukli
jobs:
- job: macOS
displayName: Build for macOS
pool:
vmImage: macOS-15
variables:
configuration: Release
scheme: TrominoCli
sdk: macosx
steps:
- task: Xcode@5
displayName: Build TrominoCli
inputs:
actions: build
xcWorkspacePath: xcode/TrominoPuzzle.xcworkspace
scheme: $(scheme)
configuration: $(configuration)
xcodeVersion: 16
destinationPlatformOption: macOS
packageApp: false
- job: Windows
displayName: Build for Windows
pool:
vmImage: windows-2022
variables:
- name: primaryRepository
value: tromino-puzzle
- name: binariesDir
value: $(Agent.TempDirectory)\vcpkg_artifacts
- name: VCPKG_BINARY_SOURCES
value: clear;files,$(binariesDir),readwrite
steps:
- checkout: self
displayName: Check out primary repository
- script: mkdir $(binariesDir)
displayName: Create Vcpkg binary sources directory
- checkout: vcpkg
path: s\$(primaryRepository)\vcpkg
displayName: Check out vcpkg repository
- task: Cache@2
inputs:
key: >-
"vcpkg"
| "$(Agent.OS)"
| $(primaryRepository)\vcpkg\ports\boost-test\vcpkg.json
| $(primaryRepository)\vcpkg\ports\sdl2\vcpkg.json
path: $(binariesDir)
displayName: Apply vcpkg cache
- task: BatchScript@1
displayName: Bootstrap vcpkg
inputs:
filename: $(primaryRepository)\vcpkg\bootstrap-vcpkg.bat
arguments: -disableMetrics
- script: vcpkg\vcpkg integrate install
displayName: Integrate vcpkg
workingDirectory: $(primaryRepository)
- script: vcpkg\vcpkg install --triplet x64-windows-static boost-test --classic
displayName: Install Boost.Test vcpkg package
workingDirectory: $(primaryRepository)
- script: vcpkg\vcpkg install --triplet x64-windows sdl2 --classic
displayName: Install SDL2 vcpkg package
workingDirectory: $(primaryRepository)
- task: VSBuild@1
displayName: Build
inputs:
solution: $(primaryRepository)\msbuild\TrominoPuzzle.sln
platform: x64
configuration: Release
maximumCpuCount: true
msbuildArchitecture: x64
- job: Linux
displayName: Build for GNU/Linux
pool:
vmImage: ubuntu-24.04
variables:
CC: /usr/bin/gcc-14
CXX: /usr/bin/g++-14
steps:
- script: sudo apt-get update
displayName: Update dependency list
- script: >-
sudo apt-get install
--assume-yes
--quiet
autoconf-archive
g++-14
gcc-14
libboost-test-dev
libsdl2-dev
displayName: Install dependencies
- task: Bash@3
displayName: Configure build
inputs:
targetType: inline
script: |-
./autogen.sh
mkdir build
cd build
../configure
- script: make --jobs=$((($(nproc) * 15) / 10))
displayName: Make
workingDirectory: build
- script: make check
displayName: Test
workingDirectory: build
- script: make dist
displayName: Package
workingDirectory: build
- script: make distcheck
displayName: Test package
workingDirectory: build
- job: WebAssembly
displayName: Build for WebAssembly
pool:
vmImage: ubuntu-24.04
variables:
emsdkVersion: 3.1.68
numMakeJobs: 3
steps:
- task: DockerInstaller@0
displayName: Install Docker
inputs:
dockerVersion: 27.4.1
releaseType: stable
- script: >-
docker run
--volume=$(pwd):/src
--workdir=/src/emscripten
emscripten/emsdk:$(emsdkVersion)
emmake make --jobs=$(numMakeJobs)
displayName: Build with Emscripten SDK