forked from reactos/reactos
-
Notifications
You must be signed in to change notification settings - Fork 0
222 lines (217 loc) · 7.91 KB
/
build.yml
File metadata and controls
222 lines (217 loc) · 7.91 KB
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
name: Build
on: [push, pull_request]
jobs:
build-gcc-i386:
name: GCC (i386)
runs-on: ubuntu-latest
steps:
- name: Install RosBE
run: |
wget https://svn.reactos.org/storage/vperevertkin/rosbe-ci.tar.zst
mkdir ${{github.workspace}}/rosbe
tar -I zstd -xvf rosbe-ci.tar.zst --directory ${{github.workspace}}/rosbe
- name: Install other packages
run: sudo apt install ccache
- uses: actions/checkout@v2
with:
path: src
- name: Set up cache for ccache
uses: actions/cache@v2
with:
path: ccache
key: ccache-gcc-i386-${{github.sha}}
restore-keys: |
ccache-gcc-i386-
- name: Set ccache settings
run: |
echo "CCACHE_BASEDIR=${{github.workspace}}" >> $GITHUB_ENV
echo "CCACHE_DIR=${{github.workspace}}/ccache" >> $GITHUB_ENV
echo "CCACHE_MAXSIZE=1G" >> $GITHUB_ENV
echo "CCACHE_SLOPPINESS=time_macros" >> $GITHUB_ENV
- name: Configure
run: |
mkdir build
echo 'cd ${{github.workspace}}/build && ${{github.workspace}}/src/configure.sh -DENABLE_CCACHE=1 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1' > commands
${{github.workspace}}/rosbe/RosBE.sh < commands
- name: Build
run: |
echo 'cd ${{github.workspace}}/build && cmake --build .' > commands
${{github.workspace}}/rosbe/RosBE.sh < commands
- name: Generate ISOs
run: |
echo 'cd ${{github.workspace}}/build && cmake --build . --target bootcd && cmake --build . --target livecd' > commands
${{github.workspace}}/rosbe/RosBE.sh < 'commands'
- name: Print ccache statistics
run: ccache -s
- name: Upload bootcd
uses: actions/upload-artifact@v2
with:
name: reactos-gcc-i386-${{github.sha}}
path: build/bootcd.iso
- name: Upload livecd
uses: actions/upload-artifact@v2
with:
name: reactos-gcc-i386-${{github.sha}}
path: build/livecd.iso
build-clang-i386:
name: Clang (i386)
runs-on: ubuntu-latest
steps:
- name: Install RosBE
run: |
wget https://svn.reactos.org/storage/vperevertkin/rosbe-ci.tar.zst
mkdir ${{github.workspace}}/rosbe
tar -I zstd -xvf rosbe-ci.tar.zst --directory ${{github.workspace}}/rosbe
- name: Install other packages
run: |
sudo apt install ccache
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
sudo apt install clang-11
- uses: actions/checkout@v2
with:
path: src
- name: Set up cache for ccache
uses: actions/cache@v2
with:
path: ccache
key: ccache-clang-i386-${{github.sha}}
restore-keys: |
ccache-clang-i386-
- name: Set ccache settings
run: |
echo "CCACHE_BASEDIR=${{github.workspace}}" >> $GITHUB_ENV
echo "CCACHE_DIR=${{github.workspace}}/ccache" >> $GITHUB_ENV
echo "CCACHE_MAXSIZE=1G" >> $GITHUB_ENV
echo "CCACHE_SLOPPINESS=time_macros" >> $GITHUB_ENV
- name: Configure
run: |
mkdir build
echo 'cd ${{github.workspace}}/build && cmake ${{github.workspace}}/src -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-clang.cmake -DARCH:STRING=i386 -DENABLE_CCACHE=1 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DCLANG_VERSION=11' > commands
${{github.workspace}}/rosbe/RosBE.sh < commands
- name: Build
run: |
echo 'cd ${{github.workspace}}/build && cmake --build .' > commands
${{github.workspace}}/rosbe/RosBE.sh < commands
- name: Print ccache statistics
run: ccache -s
build-clang-cl-i386:
name: Clang-CL (i386)
runs-on: windows-latest
steps:
- name: Install packages
run: choco install ninja -y
- name: Install Flex and Bison
run: |
curl -O https://svn.reactos.org/storage/vperevertkin/flexbison.7z
7z x flexbison.7z -O${{github.workspace}}\bin
echo "${{github.workspace}}\bin" >> $GITHUB_PATH
echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" >> $GITHUB_ENV
echo "M4=${{github.workspace}}\bin\m4.exe" >> $GITHUB_ENV
- name: Add CL to PATH
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- uses: actions/checkout@v2
with:
path: src
- name: Configure
run: |
mkdir build
cd build
$env:PATH = "$env:VCToolsInstallDir\..\..\Llvm\bin;$env:PATH"
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DUSE_CLANG_CL:BOOL=1 ${{github.workspace}}\src
- name: Build
working-directory: ${{github.workspace}}\build
run: cmake --build .
- name: Generate ISOs
working-directory: ${{github.workspace}}\build
run: |
cmake --build . --target bootcd
cmake --build . --target livecd
build-msvc-i386:
name: MSVC (i386)
runs-on: windows-latest
steps:
- name: Install packages
run: choco install ninja -y
- name: Install Flex and Bison
run: |
curl -O https://svn.reactos.org/storage/vperevertkin/flexbison.7z
7z x flexbison.7z -O${{github.workspace}}\bin
echo "${{github.workspace}}\bin" >> $GITHUB_PATH
echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" >> $GITHUB_ENV
echo "M4=${{github.workspace}}\bin\m4.exe" >> $GITHUB_ENV
- name: Add CL to PATH
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- uses: actions/checkout@v2
with:
path: src
- name: Configure
run: |
mkdir build
cd build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src
- name: Build
working-directory: ${{github.workspace}}\build
run: cmake --build .
- name: Generate ISOs
working-directory: ${{github.workspace}}\build
run: |
cmake --build . --target bootcd
cmake --build . --target livecd
- name: Upload bootcd
uses: actions/upload-artifact@v2
with:
name: reactos-msvc-i386-${{github.sha}}
path: build/bootcd.iso
- name: Upload livecd
uses: actions/upload-artifact@v2
with:
name: reactos-msvc-i386-${{github.sha}}
path: build/livecd.iso
build-msvc-amd64:
name: MSVC (amd64)
runs-on: windows-latest
steps:
- name: Install packages
run: choco install ninja -y
- name: Install Flex and Bison
run: |
curl -O https://svn.reactos.org/storage/vperevertkin/flexbison.7z
7z x flexbison.7z -O${{github.workspace}}\bin
echo "${{github.workspace}}\bin" >> $GITHUB_PATH
echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" >> $GITHUB_ENV
echo "M4=${{github.workspace}}\bin\m4.exe" >> $GITHUB_ENV
- name: Add CL to PATH
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- uses: actions/checkout@v2
with:
path: src
- name: Configure
run: |
mkdir build
cd build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=amd64 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src
- name: Build
working-directory: ${{github.workspace}}\build
run: |
cmake --build .
- name: Generate ISOs
working-directory: ${{github.workspace}}\build
run: |
cmake --build . --target bootcd
cmake --build . --target livecd
- name: Upload bootcd
uses: actions/upload-artifact@v2
with:
name: reactos-msvc-amd64-${{github.sha}}
path: build/bootcd.iso
- name: Upload livecd
uses: actions/upload-artifact@v2
with:
name: reactos-msvc-amd64-${{github.sha}}
path: build/livecd.iso