forked from jedisct1/libsodium
-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
160 lines (153 loc) · 6.15 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
trigger:
- stable
- next
pr: none
jobs:
- job: "wasi"
pool:
vmImage: "ubuntu-20.04"
steps:
- script: |
sudo apt-get install build-essential curl cmake lld
displayName: Install system packages
- script: |
curl https://get.wasmer.io -sSfL | sh
displayName: Install wasmer
- script: |
curl -sL -o - https://ziglang.org/download/0.8.0/zig-linux-x86_64-0.8.0.tar.xz | tar xJ -f - -C /opt/
sudo mv /opt/zig-* /opt/zig
env PATH=/opt/zig/bin:/opt/zig:$PATH
displayName: Install the Zig SDK
- script: |
env WASMER_DIR=${HOME}/.wasmer PATH=${HOME}/.wasmer/bin:${HOME}/.cargo/bin:$PATH dist-build/wasm32-wasi.sh
displayName: Compile libsodium
- task: PublishBuildArtifacts@1
condition: not(canceled())
inputs:
pathToPublish: libsodium-wasm32-wasi
artifactName: libsodium-wasm32-wasi
- job: "windows"
pool:
vmImage: "windows-2022"
steps:
- powershell: |
cd builds\msvc\build
& .\buildbase.bat ..\vs2022\libsodium.sln 17
displayName: Compile it all
- powershell: |
mkdir bin\include\sodium
Copy-Item "src\libsodium\include\sodium\*.h" -Destination "bin\include\sodium" -Recurse
Copy-Item "src\libsodium\include\*.h" -Destination "bin\include\"
displayName: Copy header files
- task: PublishBuildArtifacts@1
condition: not(canceled())
inputs:
pathToPublish: bin
artifactName: libsodium
- job: "windows_2019"
pool:
vmImage: "windows-2019"
steps:
- powershell: |
cd builds\msvc\build
& .\buildbase.bat ..\vs2019\libsodium.sln 16
displayName: Compile it all
- powershell: |
mkdir bin\include\sodium
Copy-Item "src\libsodium\include\sodium\*.h" -Destination "bin\include\sodium" -Recurse
Copy-Item "src\libsodium\include\*.h" -Destination "bin\include\"
displayName: Copy header files
- task: PublishBuildArtifacts@1
condition: not(canceled())
inputs:
pathToPublish: bin
artifactName: libsodium
- job: "windows_old"
pool:
vmImage: "vs2017-win2016"
steps:
- powershell: |
cd builds\msvc\build
& .\buildbase.bat ..\vs2017\libsodium.sln 15
displayName: Compile it all
- task: PublishBuildArtifacts@1
condition: not(canceled())
inputs:
pathToPublish: bin
artifactName: libsodium
- job: mingw64
pool:
vmImage: "windows-2019"
steps:
- powershell: |
(New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2022-06-03/msys2-base-x86_64-20220603.sfx.exe", "sfx.exe")
.\sfx.exe -y -o\
del sfx.exe
displayName: Install MSYS2
- script: |
set PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\msys64\usr\bin\bash -lc
%CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Sydd filesystem"
%CD:~0,2%\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'
%CD:~0,2%\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'
displayName: Update MSYS2
- script: |
set PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm --needed -S base-devel mingw-w64-x86_64-toolchain
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Scc
%CD:~0,2%\msys64\usr\bin\sed -i "s|#CacheDir.*|CacheDir=/c/Users/%USERNAME%/AppData/Local/Temp|g" /etc/pacman.conf
displayName: Install Toolchain
- script: |
set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\bin
set MSYS2_ROOT=%CD:~0,2%\msys64
set MSYSTEM=MINGW64
set CHERE_INVOKING=yes
%MSYS2_ROOT%\cmd\msystem MINGW64
%CD:~0,2%\msys64\usr\bin\bash -lc dist-build/msys2-win64.sh
env:
CHERE_INVOKING: yes
MSYS2_ARCH: x86_64
displayName: Compile libsodium
- task: PublishBuildArtifacts@1
condition: not(canceled())
inputs:
pathToPublish: libsodium-win64
artifactName: libsodium-win64
- job: mingw32
pool:
vmImage: "windows-2019"
steps:
- powershell: |
(New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2022-06-03/msys2-base-x86_64-20220603.sfx.exe", "sfx.exe")
.\sfx.exe -y -o\
del sfx.exe
displayName: Install MSYS2
- script: |
set PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\msys64\usr\bin\bash -lc
%CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Sydd filesystem"
%CD:~0,2%\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'
%CD:~0,2%\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'
displayName: Update MSYS2
- script: |
set PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm --needed -S base-devel mingw-w64-i686-toolchain
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Scc
%CD:~0,2%\msys64\usr\bin\sed -i "s|#CacheDir.*|CacheDir=/c/Users/%USERNAME%/AppData/Local/Temp|g" /etc/pacman.conf
displayName: Install Toolchain
- script: |
set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\bin
set MSYS2_ROOT=%CD:~0,2%\msys64
set MSYSTEM=MINGW32
set CHERE_INVOKING=yes
%MSYS2_ROOT%\cmd\msystem MINGW32
%CD:~0,2%\msys64\usr\bin\bash -lc dist-build/msys2-win32.sh
env:
CHERE_INVOKING: yes
MSYS2_ARCH: x86_64
displayName: Compile libsodium
- task: PublishBuildArtifacts@1
condition: not(canceled())
inputs:
pathToPublish: libsodium-win32
artifactName: libsodium-win32