From 27804a6e674dbf35fca1a1f02b372fe6f38ef521 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 16 Aug 2021 11:38:50 -0400 Subject: CI: Build and test Lagom (non-fuzzer) on Azure --- Meta/Azure/Lagom.yml | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Meta/Azure/Setup.yml | 25 ++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 Meta/Azure/Lagom.yml create mode 100644 Meta/Azure/Setup.yml (limited to 'Meta/Azure') 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' -- cgit v1.2.3