2021-08-16 20:20:54 +03:00
|
|
|
parameters:
|
|
|
|
arch: 'i686'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: 'Serenity_Clang_${{ parameters.arch }}'
|
|
|
|
timeoutInMinutes: 0 # Setting to 0 means the maximum allowed timeout is used.
|
|
|
|
|
|
|
|
variables:
|
|
|
|
- name: CCACHE_DIR
|
|
|
|
value: $(Build.SourcesDirectory)/.ccache
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: ubuntu-20.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- template: Setup.yml
|
|
|
|
parameters:
|
|
|
|
os: 'Serenity'
|
|
|
|
|
|
|
|
- template: Caches.yml
|
|
|
|
parameters:
|
|
|
|
arch: '${{ parameters.arch }}'
|
|
|
|
toolchain: 'clang'
|
2021-09-07 11:21:36 +03:00
|
|
|
build_directory: 'Build/${{ parameters.arch }}clang'
|
2021-08-16 20:20:54 +03:00
|
|
|
|
|
|
|
- script: ./Toolchain/BuildClang.sh
|
|
|
|
displayName: Build Toolchain
|
|
|
|
env:
|
|
|
|
TRY_USE_LOCAL_TOOLCHAIN: 'y'
|
|
|
|
ARCH: '${{ parameters.arch }}'
|
|
|
|
|
|
|
|
- script: |
|
2021-09-07 11:21:36 +03:00
|
|
|
mkdir -p Build/superbuild
|
2021-08-16 20:20:54 +03:00
|
|
|
displayName: 'Create Build Directory'
|
|
|
|
|
|
|
|
- script: |
|
2021-09-07 11:21:36 +03:00
|
|
|
cmake -S Meta/CMake/Superbuild -B Build/superbuild -GNinja \
|
2021-08-16 20:20:54 +03:00
|
|
|
-DSERENITY_ARCH=${{ parameters.arch }} \
|
2021-09-07 11:21:36 +03:00
|
|
|
-DSERENITY_TOOLCHAIN=Clang \
|
2021-08-16 20:20:54 +03:00
|
|
|
-DENABLE_UNDEFINED_SANITIZER=ON \
|
|
|
|
-DENABLE_PCI_IDS_DOWNLOAD=OFF \
|
|
|
|
-DENABLE_USB_IDS_DOWNLOAD=OFF \
|
|
|
|
-DCMAKE_C_COMPILER=gcc-10 \
|
2021-09-07 11:21:36 +03:00
|
|
|
-DCMAKE_CXX_COMPILER=g++-10
|
2021-08-16 20:20:54 +03:00
|
|
|
displayName: 'Create Build Environment'
|
2021-09-07 11:21:36 +03:00
|
|
|
workingDirectory: $(Build.SourcesDirectory)
|
2021-08-16 20:20:54 +03:00
|
|
|
|
|
|
|
- script: |
|
2021-09-07 11:21:36 +03:00
|
|
|
cmake --build ./Build/superbuild
|
2021-08-16 20:20:54 +03:00
|
|
|
displayName: 'Build'
|
2021-09-07 11:21:36 +03:00
|
|
|
workingDirectory: $(Build.SourcesDirectory)
|
2021-08-16 20:20:54 +03:00
|
|
|
|
|
|
|
- script: |
|
|
|
|
ninja install && ninja image
|
|
|
|
displayName: 'Create RootFS'
|
2021-09-07 11:21:36 +03:00
|
|
|
workingDirectory: $(Build.SourcesDirectory)/Build/${{ parameters.arch }}clang
|
2021-08-16 20:20:54 +03:00
|
|
|
|
|
|
|
- script: |
|
|
|
|
ninja run
|
|
|
|
|
|
|
|
echo "##[group]Verify Output File"
|
|
|
|
mkdir fsmount
|
|
|
|
sudo mount -t ext2 -o loop,rw _disk_image fsmount
|
|
|
|
|
|
|
|
echo "Results: "
|
|
|
|
sudo cat fsmount/home/anon/test-results.log
|
|
|
|
echo "##[endgroup]"
|
|
|
|
|
|
|
|
if ! sudo grep -q "Failed: 0" fsmount/home/anon/test-results.log
|
|
|
|
then
|
|
|
|
echo "##[error]:^( Tests failed, failing job"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
displayName: 'Test'
|
2021-09-07 11:21:36 +03:00
|
|
|
workingDirectory: $(Build.SourcesDirectory)/Build/${{ parameters.arch }}clang
|
2021-08-19 23:48:30 +03:00
|
|
|
timeoutInMinutes: 60
|
2021-08-16 20:20:54 +03:00
|
|
|
env:
|
|
|
|
SERENITY_QEMU_CPU: 'max,vmx=off'
|
|
|
|
SERENITY_KERNEL_CMDLINE: 'boot_mode=self-test'
|
|
|
|
SERENITY_RUN: 'ci'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
[ ! -e debug.log ] || cat debug.log
|
|
|
|
displayName: 'Print Target Logs'
|
2021-09-07 11:21:36 +03:00
|
|
|
workingDirectory: $(Build.SourcesDirectory)/Build/${{ parameters.arch }}clang
|
2021-08-17 23:22:39 +03:00
|
|
|
condition: failed()
|
2021-08-16 20:20:54 +03:00
|
|
|
|
|
|
|
- script: |
|
|
|
|
ccache -s
|
|
|
|
displayName: 'Cache Stats'
|