diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-08-16 11:38:50 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-08-16 18:04:33 +0100 |
commit | 27804a6e674dbf35fca1a1f02b372fe6f38ef521 (patch) | |
tree | 9abe9c60c2c3b7e5cf06251fd57356e2681e7a27 | |
parent | 6709c915aaff324a7ccf55607349131e19f01b44 (diff) | |
download | serenity-27804a6e674dbf35fca1a1f02b372fe6f38ef521.zip |
CI: Build and test Lagom (non-fuzzer) on Azure
-rw-r--r-- | Meta/Azure/Lagom.yml | 59 | ||||
-rw-r--r-- | Meta/Azure/Setup.yml | 25 | ||||
-rw-r--r-- | azure-pipelines.yml | 13 |
3 files changed, 92 insertions, 5 deletions
diff --git a/Meta/Azure/Lagom.yml b/Meta/Azure/Lagom.yml new file mode 100644 index 0000000000..c9baab2b0c --- /dev/null +++ b/Meta/Azure/Lagom.yml @@ -0,0 +1,59 @@ +parameters: + os: 'Linux' + allow_test_failures: false + +jobs: + - job: 'Lagom_${{ parameters.os }}' + + variables: + - ${{ if eq(parameters.os, 'Linux') }}: + - name: job_pool + value: ubuntu-20.04 + - ${{ if eq(parameters.os, 'macOS') }}: + - name: job_pool + value: macos-10.15 + + pool: + vmImage: $(job_pool) + + steps: + - template: Setup.yml + parameters: + os: '${{ parameters.os }}' + + - script: | + mkdir -p Meta/Lagom/Build + displayName: 'Create Build Directory' + + - script: | + cmake -GNinja \ + -DBUILD_LAGOM=ON \ + -DINCLUDE_WASM_SPEC_TESTS=ON \ + -DWASM_SPEC_TEST_SKIP_FORMATTING=ON \ + -DENABLE_UNDEFINED_SANITIZER=ON \ + -DENABLE_ADDRESS_SANITIZER=ON \ + -DENABLE_PCI_IDS_DOWNLOAD=OFF \ + -DENABLE_USB_IDS_DOWNLOAD=OFF \ + -DCMAKE_C_COMPILER=gcc-10 \ + -DCMAKE_CXX_COMPILER=g++-10 \ + .. + displayName: 'Create Build Environment' + workingDirectory: $(Build.SourcesDirectory)/Meta/Lagom/Build + env: + PATH: '$(PATH):$(Build.SourcesDirectory)/wabt-1.0.23/bin' + + - script: | + cmake --build . + displayName: 'Build' + workingDirectory: $(Build.SourcesDirectory)/Meta/Lagom/Build + + - script: | + ninja test || ${{ parameters.allow_test_failures }} + 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' diff --git a/Meta/Azure/Setup.yml b/Meta/Azure/Setup.yml new file mode 100644 index 0000000000..81ec9b8f5d --- /dev/null +++ b/Meta/Azure/Setup.yml @@ -0,0 +1,25 @@ +parameters: + os: 'Linux' + +steps: + - checkout: self + persistCredentials: true + + - ${{ if eq(parameters.os, 'Linux') }}: + - script: | + sudo apt-get purge -y clang-11 + sudo apt-get update + sudo apt-get install ninja-build + + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 100 + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 100 + + wget https://github.com/WebAssembly/wabt/releases/download/1.0.23/wabt-1.0.23-ubuntu.tar.gz + tar -xzf ./wabt-1.0.23-ubuntu.tar.gz + rm ./wabt-1.0.23-ubuntu.tar.gz + displayName: 'Install Dependencies' + + - ${{ if eq(parameters.os, 'macOS') }}: + - script: | + brew install ninja wabt + displayName: 'Install Dependencies' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f7fe46c2b0..bfc2d7b4fa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,9 +1,12 @@ trigger: - master -pool: - vmImage: ubuntu-latest +jobs: + - template: Meta/Azure/Lagom.yml + parameters: + os: 'Linux' -steps: - - script: echo Hello, world! - displayName: 'Hello world' + - template: Meta/Azure/Lagom.yml + parameters: + os: 'macOS' + allow_test_failures: true |