Skip to content

Commit

Permalink
CI: Build and test Lagom (non-fuzzer) on Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
trflynn89 authored and linusg committed Aug 16, 2021
1 parent 6709c91 commit 27804a6
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 5 deletions.
59 changes: 59 additions & 0 deletions Meta/Azure/Lagom.yml
Original file line number Diff line number Diff line change
@@ -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'
25 changes: 25 additions & 0 deletions Meta/Azure/Setup.yml
Original file line number Diff line number Diff line change
@@ -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'
13 changes: 8 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 27804a6

Please sign in to comment.