diff --git a/.github/workflows/build_dependencies.yml b/.github/workflows/build_dependencies.yml index efa9505..64ae5c4 100644 --- a/.github/workflows/build_dependencies.yml +++ b/.github/workflows/build_dependencies.yml @@ -19,6 +19,10 @@ on: prerelease: required: true type: string + tooling: + required: false + type: string + default: 'None' testing: required: false type: string @@ -60,6 +64,13 @@ on: - 'True' - 'False' default: 'False' + tooling: + required: false + type: choice + - 'Sanitize' + - 'Coverage' + - 'None' + default: 'None' testing: description: 'Build and Run' required: true @@ -135,7 +146,7 @@ jobs: -o sisl:prerelease=${{ inputs.prerelease }} \ -o sisl:malloc_impl=${{ inputs.malloc-impl }} \ -o sisl:testing=False \ - -o iomgr:testing=off \ + -o testing=off \ -s build_type=${{ inputs.build-type }} \ --build missing \ . @@ -156,6 +167,20 @@ jobs: fail_on_cache_miss: true if: ${{ inputs.testing == 'True' && github.event_name != 'pull_request' && steps.restore-cache.outputs.cache-hit != 'true' }} + - name: Create and Test Package + run: | + sanitize=$([[ "${{ inputs.tooling }}" == "Sanitize" ]] && echo "True" || echo "False") + conan create \ + -o sisl:prerelease=${{ inputs.prerelease }} \ + -o sisl:malloc_impl=${{ inputs.malloc-impl }} \ + -o sisl:testing=False \ + -o iomgr:sanitize=${sanitize} \ + -o iomgr:testing='epoll_mode' \ + -s build_type=${{ inputs.build-type }} \ + --build missing \ + . + if: ${{ inputs.testing == 'True' && inputs.tooling != 'Coverage' }} + - name: Code Coverage Run run: | conan install \ @@ -168,24 +193,11 @@ jobs: --build missing \ . conan build . - if: ${{ inputs.testing == 'True' && inputs.platform == 'ubuntu-22.04' && inputs.build-type == 'Debug' && inputs.malloc-impl == 'libc' && inputs.prerelease == 'False' }} + if: ${{ inputs.testing == 'True' && inputs.tooling == 'Coverage' }} - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} gcov: true - if: ${{ inputs.testing == 'True' && inputs.platform == 'ubuntu-22.04' && inputs.build-type == 'Debug' && inputs.malloc-impl == 'libc' && inputs.prerelease == 'False' }} - - - - name: Create and test Package - run: | - conan create \ - -o sisl:prerelease=${{ inputs.prerelease }} \ - -o sisl:malloc_impl=${{ inputs.malloc-impl }} \ - -o sisl:testing=False \ - -o iomgr:testing='epoll_mode' \ - -s build_type=${{ inputs.build-type }} \ - --build missing \ - . - if: ${{ inputs.testing == 'True' }} + if: ${{ inputs.testing == 'True' && inputs.tooling == 'Coverage' }} diff --git a/.github/workflows/merge_conan_build.yml b/.github/workflows/conan_build.yml similarity index 63% rename from .github/workflows/merge_conan_build.yml rename to .github/workflows/conan_build.yml index 7d613c4..7bcd0bd 100644 --- a/.github/workflows/merge_conan_build.yml +++ b/.github/workflows/conan_build.yml @@ -1,4 +1,4 @@ -name: IOManager Merge Build +name: IOManager Build on: workflow_dispatch: @@ -6,6 +6,10 @@ on: branches: - master - stable/v8.x + pull_request: + branches: + - master + - stable/v8.x jobs: Build: @@ -14,26 +18,29 @@ jobs: matrix: platform: ["ubuntu-22.04"] build-type: ["Debug", "Release"] - malloc-impl: ["libc", "tcmalloc", "jemalloc"] + malloc-impl: ["libc", "tcmalloc"] prerelease: ["True", "False"] + tooling: ["Sanitize", "Coverage", "None"] exclude: - - malloc-impl: jemalloc - build-type: Debug - - malloc-impl: tcmalloc - build-type: Debug - - malloc-impl: tcmalloc - prerelease: "True" - - malloc-impl: jemalloc + - build-type: Debug prerelease: "False" - - malloc-impl: libc - build-type: Release - + - build-type: Debug + tooling: None + - build-type: Debug + malloc-impl: tcmalloc + - build-type: Release + malloc-impl: libc + - build-type: Release + tooling: Sanitize + - build-type: Release + tooling: Coverage uses: ./.github/workflows/build_commit.yml with: platform: ${{ matrix.platform }} build-type: ${{ matrix.build-type }} malloc-impl: ${{ matrix.malloc-impl }} prerelease: ${{ matrix.prerelease }} + tooling: ${{ matrix.tooling }} ChainBuild: runs-on: "ubuntu-22.04" steps: @@ -44,6 +51,6 @@ jobs: -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${{ secrets.CHAIN_BUILD_TOKEN }}"\ -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/eBay/homestore/actions/workflows/merge_conan_build.yml/dispatches \ + https://api.github.com/repos/eBay/homestore/actions/workflows/conan_build.yml/dispatches \ -d '{"ref":"master","inputs":{}}' if: ${{ github.ref == 'refs/heads/master' }} diff --git a/.github/workflows/pr_conan_build.yml b/.github/workflows/pr_conan_build.yml deleted file mode 100644 index c563122..0000000 --- a/.github/workflows/pr_conan_build.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: IOManager PR Build - -on: - pull_request: - branches: - - master - - stable/v8.x - -jobs: - Build: - strategy: - fail-fast: false - matrix: - platform: ["ubuntu-22.04"] - build-type: ["Debug", "Release"] - malloc-impl: ["libc", "tcmalloc", "jemalloc"] - prerelease: ["True", "False"] - exclude: - - malloc-impl: jemalloc - build-type: Debug - - malloc-impl: tcmalloc - build-type: Debug - - malloc-impl: jemalloc - prerelease: "False" - - malloc-impl: libc - build-type: Release - - uses: ./.github/workflows/build_commit.yml - with: - platform: ${{ matrix.platform }} - build-type: ${{ matrix.build-type }} - malloc-impl: ${{ matrix.malloc-impl }} - prerelease: ${{ matrix.prerelease }}