2021-08-16 18:38:50 +03:00
|
|
|
parameters:
|
|
|
|
os: 'Linux'
|
2021-08-17 18:50:23 +03:00
|
|
|
fuzzer: 'NoFuzz'
|
2021-10-04 22:32:31 +03:00
|
|
|
lagom_lints: false
|
2021-08-16 18:38:50 +03:00
|
|
|
|
|
|
|
jobs:
|
2021-08-17 18:50:23 +03:00
|
|
|
- job: 'Lagom_${{ parameters.os }}_${{ parameters.fuzzer }}'
|
2022-02-15 18:46:34 +03:00
|
|
|
timeoutInMinutes: 0 # Setting to 0 means the maximum allowed timeout is used.
|
2021-08-16 18:38:50 +03:00
|
|
|
|
|
|
|
variables:
|
2021-09-21 13:42:35 +03:00
|
|
|
- name: SERENITY_CCACHE_DIR
|
2021-08-17 02:02:27 +03:00
|
|
|
value: $(Build.SourcesDirectory)/.ccache
|
2021-08-17 18:50:23 +03:00
|
|
|
|
|
|
|
- name: job_pool
|
2022-07-20 09:13:12 +03:00
|
|
|
${{ if or(eq(parameters.os, 'Linux'), eq(parameters.os, 'Android')) }}:
|
2022-05-23 23:12:57 +03:00
|
|
|
value: ubuntu-22.04
|
2021-08-17 18:50:23 +03:00
|
|
|
${{ if eq(parameters.os, 'macOS') }}:
|
2022-01-07 09:27:53 +03:00
|
|
|
value: macos-11
|
2021-08-16 18:38:50 +03:00
|
|
|
|
2021-08-17 18:50:23 +03:00
|
|
|
- name: toolchain
|
|
|
|
${{ if eq(parameters.fuzzer, 'Fuzz') }}:
|
|
|
|
value: clang
|
|
|
|
${{ if eq(parameters.fuzzer, 'NoFuzz') }}:
|
|
|
|
value: gcc
|
|
|
|
|
2022-07-20 09:13:12 +03:00
|
|
|
- name: ndk_version # only relevant for Android
|
|
|
|
value: '24.0.8215888'
|
|
|
|
|
2021-08-16 18:38:50 +03:00
|
|
|
pool:
|
|
|
|
vmImage: $(job_pool)
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- template: Setup.yml
|
|
|
|
parameters:
|
|
|
|
os: '${{ parameters.os }}'
|
|
|
|
|
2021-08-17 02:02:27 +03:00
|
|
|
- template: Caches.yml
|
|
|
|
parameters:
|
|
|
|
os: '${{ parameters.os }}'
|
|
|
|
arch: 'Lagom'
|
2021-08-17 18:50:23 +03:00
|
|
|
toolchain: '$(toolchain)'
|
2021-08-17 02:02:27 +03:00
|
|
|
build_directory: 'Meta/Lagom/Build'
|
2021-09-21 13:42:35 +03:00
|
|
|
serenity_ccache_path: '$(SERENITY_CCACHE_DIR)'
|
2022-08-09 15:30:18 +03:00
|
|
|
with_remote_data_caches: true
|
2022-08-23 16:08:06 +03:00
|
|
|
${{ if eq(parameters.os, 'macOS') }}:
|
|
|
|
ccache_version: 2
|
|
|
|
serenity_ccache_size: '2G'
|
2022-07-20 09:13:12 +03:00
|
|
|
|
|
|
|
- ${{ if eq(parameters.os, 'Android') }}:
|
|
|
|
- script: |
|
|
|
|
yes | $ANDROID_SDK_ROOT/tools/bin/sdkmanager "ndk;$(ndk_version)"
|
|
|
|
displayName: "Install NDK $(ndk_version)"
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
cmake -GNinja -B tools-build \
|
|
|
|
-DBUILD_LAGOM=OFF \
|
|
|
|
-DENABLE_LAGOM_CCACHE=ON \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=tool-install \
|
|
|
|
-Dpackage=LagomTools
|
|
|
|
ninja -C tools-build install
|
|
|
|
cmake -GNinja -B Build \
|
|
|
|
-DBUILD_LAGOM=ON \
|
|
|
|
-DENABLE_LAGOM_CCACHE=ON \
|
|
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
|
|
-DANDROID_ABI=arm64-v8a \
|
|
|
|
-DANDROID_NATIVE_API_LEVEL=30 \
|
|
|
|
-DANDROID_NDK=$ANDROID_SDK_ROOT/ndk/$(ndk_version) \
|
|
|
|
-DANDROID_STL=c++_shared \
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_SDK_ROOT/ndk/$(ndk_version)/build/cmake/android.toolchain.cmake \
|
|
|
|
-DLagomTools_DIR=$(Build.SourcesDirectory)/Meta/Lagom/tool-install/share/LagomTools
|
|
|
|
displayName: 'Create Build Environment'
|
|
|
|
workingDirectory: $(Build.SourcesDirectory)/Meta/Lagom
|
|
|
|
env:
|
|
|
|
CCACHE_DIR: '$(SERENITY_CCACHE_DIR)'
|
2021-08-17 02:02:27 +03:00
|
|
|
|
2022-07-20 09:13:12 +03:00
|
|
|
- ${{ elseif eq(parameters.fuzzer, 'Fuzz') }}:
|
2021-08-17 18:50:23 +03:00
|
|
|
- script: |
|
2022-02-20 02:09:40 +03:00
|
|
|
cmake -GNinja -B tools-build \
|
|
|
|
-DBUILD_LAGOM=OFF \
|
|
|
|
-DENABLE_LAGOM_CCACHE=ON \
|
2022-07-11 10:07:47 +03:00
|
|
|
-DCMAKE_INSTALL_PREFIX=tool-install \
|
|
|
|
-Dpackage=LagomTools
|
2022-02-20 02:09:40 +03:00
|
|
|
ninja -C tools-build install
|
|
|
|
cmake -GNinja -B Build \
|
2021-08-17 18:50:23 +03:00
|
|
|
-DBUILD_LAGOM=ON \
|
|
|
|
-DENABLE_LAGOM_CCACHE=ON \
|
2022-03-29 17:31:51 +03:00
|
|
|
-DENABLE_FUZZERS_LIBFUZZER=ON \
|
2021-08-17 18:50:23 +03:00
|
|
|
-DENABLE_ADDRESS_SANITIZER=ON \
|
|
|
|
-DCMAKE_C_COMPILER=clang \
|
|
|
|
-DCMAKE_CXX_COMPILER=clang++ \
|
2022-02-20 02:09:40 +03:00
|
|
|
-DCMAKE_PREFIX_PATH=tool-install
|
2021-08-17 18:50:23 +03:00
|
|
|
displayName: 'Create Build Environment'
|
2022-02-20 02:09:40 +03:00
|
|
|
workingDirectory: $(Build.SourcesDirectory)/Meta/Lagom
|
2021-09-21 13:42:35 +03:00
|
|
|
env:
|
|
|
|
CCACHE_DIR: '$(SERENITY_CCACHE_DIR)'
|
2022-07-20 09:13:12 +03:00
|
|
|
- ${{ elseif eq(parameters.fuzzer, 'NoFuzz') }}:
|
2021-08-17 18:50:23 +03:00
|
|
|
- script: |
|
2022-02-20 02:09:40 +03:00
|
|
|
cmake -GNinja -B Build \
|
2021-08-17 18:50:23 +03:00
|
|
|
-DBUILD_LAGOM=ON \
|
|
|
|
-DENABLE_LAGOM_CCACHE=ON \
|
|
|
|
-DINCLUDE_WASM_SPEC_TESTS=ON \
|
|
|
|
-DWASM_SPEC_TEST_SKIP_FORMATTING=ON \
|
|
|
|
-DENABLE_UNDEFINED_SANITIZER=ON \
|
|
|
|
-DENABLE_ADDRESS_SANITIZER=ON \
|
2022-01-07 09:27:53 +03:00
|
|
|
-DCMAKE_C_COMPILER=gcc-11 \
|
2022-02-20 02:09:40 +03:00
|
|
|
-DCMAKE_CXX_COMPILER=g++-11
|
2021-08-17 18:50:23 +03:00
|
|
|
displayName: 'Create Build Environment'
|
2022-02-20 02:09:40 +03:00
|
|
|
workingDirectory: $(Build.SourcesDirectory)/Meta/Lagom
|
2021-08-17 18:50:23 +03:00
|
|
|
env:
|
|
|
|
PATH: '$(PATH):$(Build.SourcesDirectory)/wabt-1.0.23/bin'
|
2021-09-21 13:42:35 +03:00
|
|
|
CCACHE_DIR: '$(SERENITY_CCACHE_DIR)'
|
2021-08-16 18:38:50 +03:00
|
|
|
|
|
|
|
- script: |
|
|
|
|
cmake --build .
|
|
|
|
displayName: 'Build'
|
|
|
|
workingDirectory: $(Build.SourcesDirectory)/Meta/Lagom/Build
|
2021-09-21 13:42:35 +03:00
|
|
|
env:
|
|
|
|
CCACHE_DIR: '$(SERENITY_CCACHE_DIR)'
|
2021-08-16 18:38:50 +03:00
|
|
|
|
2022-07-20 09:13:12 +03:00
|
|
|
- ${{ if and(eq(parameters.fuzzer, 'NoFuzz'), not(eq(parameters.os, 'Android')) ) }}:
|
2021-08-17 18:50:23 +03:00
|
|
|
- script: |
|
2022-01-14 17:37:34 +03:00
|
|
|
ninja test
|
2021-08-17 18:50:23 +03:00
|
|
|
displayName: 'Test'
|
|
|
|
workingDirectory: $(Build.SourcesDirectory)/Meta/Lagom/Build
|
|
|
|
env:
|
|
|
|
SERENITY_SOURCE_DIR: '$(Build.SourcesDirectory)'
|
|
|
|
CTEST_OUTPUT_ON_FAILURE: 1
|
|
|
|
# FIXME: enable detect_stack_use_after_return=1 #7420
|
|
|
|
ASAN_OPTIONS: 'strict_string_checks=1:check_initialization_order=1:strict_init_order=1'
|
|
|
|
UBSAN_OPTIONS: 'print_stacktrace=1:print_summary=1:halt_on_error=1'
|
2021-08-17 02:02:27 +03:00
|
|
|
|
2021-10-04 22:32:31 +03:00
|
|
|
- ${{ if eq(parameters.lagom_lints, true) }}:
|
|
|
|
- script: |
|
2022-01-22 20:19:29 +03:00
|
|
|
set -e
|
2021-10-04 22:32:31 +03:00
|
|
|
./Meta/check-markdown.sh
|
2022-02-12 20:18:12 +03:00
|
|
|
./Meta/lint-gml-format.sh
|
2021-11-01 19:20:54 +03:00
|
|
|
git ls-files '*.ipc' | xargs ./Meta/Lagom/Build/Tools/IPCMagicLinter/IPCMagicLinter
|
|
|
|
displayName: 'Run lints that require Lagom'
|
2021-10-04 22:32:31 +03:00
|
|
|
workingDirectory: $(Build.SourcesDirectory)/
|
|
|
|
env:
|
|
|
|
MARKDOWN_CHECK_BINARY: ./Meta/Lagom/Build/markdown-check
|
2022-02-15 19:15:02 +03:00
|
|
|
GML_FORMAT: ./Meta/Lagom/Build/gml-format
|
2021-10-04 22:32:31 +03:00
|
|
|
# FIXME: enable detect_stack_use_after_return=1 #7420
|
|
|
|
ASAN_OPTIONS: 'strict_string_checks=1:check_initialization_order=1:strict_init_order=1'
|
|
|
|
UBSAN_OPTIONS: 'print_stacktrace=1:print_summary=1:halt_on_error=1'
|
|
|
|
|
2021-08-17 02:02:27 +03:00
|
|
|
- script: |
|
2021-09-21 13:42:35 +03:00
|
|
|
CCACHE_DIR='$(SERENITY_CCACHE_DIR)' ccache -s
|
2021-08-17 02:02:27 +03:00
|
|
|
displayName: 'Cache Stats'
|