diff --git a/.github/workflows/build_dependencies.yml b/.github/workflows/build_dependencies.yml index 7091ffb..ea67600 100644 --- a/.github/workflows/build_dependencies.yml +++ b/.github/workflows/build_dependencies.yml @@ -71,13 +71,13 @@ jobs: runs-on: ${{ inputs.platform }} steps: - name: Retrieve Code - uses: actions/checkout@main + uses: actions/checkout@v4 with: ref: ${{ inputs.branch }} if: ${{ inputs.testing == 'True' }} - name: Retrieve Recipe - uses: actions/checkout@main + uses: actions/checkout@v4 with: repository: eBay/HomeBlocks ref: ${{ inputs.branch }} @@ -111,7 +111,7 @@ jobs: if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }} - name: Retrieve Dependencies NuRaftMesg - uses: actions/checkout@main + uses: actions/checkout@v4 with: repository: eBay/nuraft_mesg path: import/nuraft_mesg @@ -127,7 +127,7 @@ jobs: if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }} - name: Retrieve Dependencies HomeStore - uses: actions/checkout@main + uses: actions/checkout@v4 with: repository: eBay/HomeStore path: import/homestore @@ -151,46 +151,95 @@ jobs: conan export import/nuraft_mesg if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }} - - name: Create and Test Package + - name: Build Cache run: | - sanitize=$([[ "${{ inputs.tooling }}" == "Sanitize" ]] && echo "True" || echo "False") - conan build \ + pre=$([[ "${{ inputs.build-type }}" != "Debug" ]] && echo "-o iomgr/*:prerelease=${{ inputs.prerelease }}" || echo "") + echo "Disk space usage" + sudo df -h + sudo ls -l /tmp + sudo rm -rf $ANDROID_HOME + echo "Disk space usage after cleanup" + sudo df -h + conan install \ + -c tools.build:skip_test=True \ + ${pre} \ -o sisl/*:malloc_impl=${{ inputs.malloc-impl }} \ -o iomgr/*:testing=off \ -o homestore/*:testing=off \ - -o homeblocks/*:sanitize=${sanitize} \ -s:h build_type=${{ inputs.build-type }} \ - -s:h compiler.cppstd=23 \ + -c tools.build:skip_test=True \ --format=json \ --build missing \ . > ~/build.json conan list --graph ~/build.json --graph-binaries=build --format=json > ~/pkglist.json - if: ${{ inputs.testing == 'True' && inputs.tooling != 'Coverage' }} + if: ${{ steps.restore-cache.outputs.cache-hit != 'true' }} - name: Save Conan Cache uses: eBay/sisl/.github/actions/store_conan2@stable/v13.x with: - key_prefix: HomeBlocksDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }} - if: ${{ github.event_name != 'pull_request' && steps.restore-cache.outputs.cache-hit != 'true' && inputs.tooling != 'Coverage'}} + key_prefix: HomeObjectDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.prerelease }} + if: ${{ github.event_name != 'pull_request' && steps.restore-cache.outputs.cache-hit != 'true' }} + + - name: Reload Sisl Cache + uses: eBay/sisl/.github/actions/load_conan2@stable/v13.x + with: + load_any: 'True' + key_prefix: SislDeps13-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }} + if: ${{ inputs.testing == 'True' && github.event_name != 'pull_request' && steps.restore-cache.outputs.cache-hit != 'true' }} + + - name: Reload IOMgr Cache + uses: eBay/sisl/.github/actions/load_conan2@stable/v13.x + with: + load_any: 'True' + key_prefix: IOMgrDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.prerelease }} + if: ${{ inputs.testing == 'True' && github.event_name != 'pull_request' && steps.restore-cache.outputs.cache-hit != 'true' }} + + - name: Reload NuRaftMesg Cache + uses: eBay/sisl/.github/actions/load_conan2@stable/v13.x + with: + testing: 'False' + path: import/nuraft_mesg + key_prefix: NuMesgDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }} + fail_on_cache_miss: true + if: ${{ inputs.testing == 'True' && github.event_name != 'pull_request' && steps.restore-cache.outputs.cache-hit != 'true' }} + + - name: Reload HomeStore Cache + uses: eBay/sisl/.github/actions/load_conan2@stable/v13.x + with: + testing: 'False' + path: import/homestore + key_prefix: HomestoreDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.prerelease }} + 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/*:malloc_impl=${{ inputs.malloc-impl }} \ + -o iomgr/*:testing=off \ + -o homestore/*:testing=off \ + -o homeblocks/*:sanitize=${sanitize} \ + -s:h build_type=${{ inputs.build-type }} \ + --build missing \ + . + if: ${{ inputs.testing == 'True' && inputs.tooling != 'Coverage' }} - name: Code Coverage Run run: | - python -m pip install gcovr conan build \ -o sisl/*:malloc_impl=${{ inputs.malloc-impl }} \ -o iomgr/*:testing=off \ -o homestore/*:testing=off \ -o homeblocks/*:coverage=True \ -s:h build_type=${{ inputs.build-type }} \ - -s:h compiler.cppstd=23 \ --build missing \ . - gcovr --cobertura ./coverage.xml if: ${{ inputs.testing == 'True' && inputs.tooling == 'Coverage' }} - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 with: - files: ./coverage.xml - disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true if: ${{ inputs.testing == 'True' && inputs.tooling == 'Coverage' }}