diff options
author | Andrew Kaster <akaster@serenityos.org> | 2023-03-19 13:17:36 -0600 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2023-03-19 14:31:10 -0600 |
commit | 5b5a76eadd112c127caeecb9f19fe6a08be04368 (patch) | |
tree | 9d0e5cb43a36a46133bdbffcb79b9bc75b9b486e | |
parent | 958f9e960d11e97c603ee300c1cdb1b6f958a168 (diff) | |
download | serenity-5b5a76eadd112c127caeecb9f19fe6a08be04368.zip |
CI: Add "set -e" to Azure DevOps scripts
Without setting this explicitly in every script, failing script lines in
multiline scripts will not fail the job themselves.
-rw-r--r-- | Meta/Azure/Lagom.yml | 5 | ||||
-rw-r--r-- | Meta/Azure/Serenity.yml | 5 | ||||
-rw-r--r-- | Meta/Azure/Setup.yml | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/Meta/Azure/Lagom.yml b/Meta/Azure/Lagom.yml index 5dae6d6460..3a40bab4d9 100644 --- a/Meta/Azure/Lagom.yml +++ b/Meta/Azure/Lagom.yml @@ -64,6 +64,7 @@ jobs: displayName: "Install NDK $(ndk_version)" - script: | + set -e cmake -GNinja -B tools-build \ -DBUILD_LAGOM=OFF \ -DENABLE_LAGOM_CCACHE=ON \ @@ -89,6 +90,7 @@ jobs: - ${{ elseif eq(parameters.fuzzer, 'Fuzz') }}: - script: | + set -e cmake -GNinja -B tools-build \ -DBUILD_LAGOM=OFF \ -DENABLE_LAGOM_CCACHE=ON \ @@ -109,6 +111,7 @@ jobs: CCACHE_DIR: '$(SERENITY_CCACHE_DIR)' - ${{ elseif eq(parameters.fuzzer, 'NoFuzz') }}: - script: | + set -e cmake -GNinja -B Build \ -DBUILD_LAGOM=ON \ -DENABLE_LAGOM_CCACHE=ON \ @@ -126,6 +129,7 @@ jobs: CCACHE_DIR: '$(SERENITY_CCACHE_DIR)' - script: | + set -e cmake --build . cmake --install . --prefix $(Build.SourcesDirectory)/Meta/Lagom/Install displayName: 'Build' @@ -135,6 +139,7 @@ jobs: - ${{ if and(eq(parameters.fuzzer, 'NoFuzz'), not(eq(parameters.os, 'Android')) ) }}: - script: | + set -e ninja test displayName: 'Test' workingDirectory: $(Build.SourcesDirectory)/Meta/Lagom/Build diff --git a/Meta/Azure/Serenity.yml b/Meta/Azure/Serenity.yml index 43bc1e82fc..844a07bf67 100644 --- a/Meta/Azure/Serenity.yml +++ b/Meta/Azure/Serenity.yml @@ -42,6 +42,7 @@ jobs: displayName: 'Create Build Directory' - script: | + set -e cmake -S Meta/CMake/Superbuild -B Build/superbuild -GNinja \ -DSERENITY_ARCH=${{ parameters.arch }} \ -DSERENITY_TOOLCHAIN=Clang \ @@ -58,6 +59,7 @@ jobs: CCACHE_DIR: '$(SERENITY_CCACHE_DIR)' - script: | + set -e cmake --build ./Build/superbuild displayName: 'Build' workingDirectory: $(Build.SourcesDirectory) @@ -65,11 +67,13 @@ jobs: CCACHE_DIR: '$(SERENITY_CCACHE_DIR)' - script: | + set -e ninja install && ninja qemu-image displayName: 'Create RootFS' workingDirectory: $(Build.SourcesDirectory)/Build/${{ parameters.arch }}clang - script: | + set -e ninja run echo "##[group]Verify Output File" @@ -102,6 +106,7 @@ jobs: - ${{ if eq(parameters.coverage, 'ON') }}: - script: | + set -e ./Meta/analyze-qemu-coverage.sh displayName: 'Aggregate Coverage Results' workingDirectory: $(Build.SourcesDirectory) diff --git a/Meta/Azure/Setup.yml b/Meta/Azure/Setup.yml index ee59406f50..f846c7f4ad 100644 --- a/Meta/Azure/Setup.yml +++ b/Meta/Azure/Setup.yml @@ -7,6 +7,7 @@ steps: - ${{ if eq(parameters.os, 'Serenity') }}: - script: | + set -e wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main' sudo apt-get update @@ -15,6 +16,7 @@ steps: - ${{ if eq(parameters.os, 'Linux') }}: - script: | + set -e sudo apt-get purge -y clang-12 gcc-10 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-13 main' @@ -34,12 +36,14 @@ steps: - ${{ if eq(parameters.os, 'macOS') }}: # macOS ships an ancient Bash 3.x by default - script: | + set -e brew update brew install bash ninja wabt ccache unzip qt llvm@15 displayName: 'Install Dependencies' - ${{ if eq(parameters.os, 'Android') }}: - script: | + set -e sudo apt-get install ccache gcc-12 g++-12 libstdc++-12-dev ninja-build unzip sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 |