Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions .github/workflows/build_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,64 @@ on:
tooling:
required: true
type: string
compiler:
required: false
type: string
default: 'gcc'
conan-channel:
required: false
type: string
default: 'dev'

jobs:
SislDeps:
uses: ebay/sisl/.github/workflows/build_dependencies.yml@stable/v13.x
uses: ebay/sisl/.github/workflows/build_dependencies.yml@dev/v14.x
with:
branch: stable/v13.x
branch: dev/v14.x
platform: ${{ inputs.platform }}
build-type: ${{ inputs.build-type }}
malloc-impl: ${{ inputs.malloc-impl }}
compiler: ${{ inputs.compiler }}
conan-channel: ${{ inputs.conan-channel }}
tooling: None
if: ${{ github.event_name != 'pull_request' }}

NuraftMesgDeps:
needs: SislDeps
uses: eBay/nuraft_mesg/.github/workflows/build_dependencies.yml@stable/v4.x
uses: eBay/nuraft_mesg/.github/workflows/build_dependencies.yml@dev/v5.x
with:
branch: stable/v4.x
branch: dev/v5.x
platform: ${{ inputs.platform }}
build-type: ${{ inputs.build-type }}
malloc-impl: ${{ inputs.malloc-impl }}
compiler: ${{ inputs.compiler }}
conan-channel: ${{ inputs.conan-channel }}
tooling: None
if: ${{ github.event_name != 'pull_request' }}

IOMgrDeps:
needs: [SislDeps]
uses: eBay/iomanager/.github/workflows/build_dependencies.yml@stable/v12.x
uses: eBay/iomanager/.github/workflows/build_dependencies.yml@dev/v13.x
with:
branch: stable/v12.x
branch: dev/v13.x
platform: ${{ inputs.platform }}
build-type: ${{ inputs.build-type }}
malloc-impl: ${{ inputs.malloc-impl }}
prerelease: ${{ inputs.prerelease }}
compiler: ${{ inputs.compiler }}
conan-channel: ${{ inputs.conan-channel }}
tooling: None
if: ${{ github.event_name != 'pull_request' }}

HomeStoreDeps:
needs: [IOMgrDeps, NuraftMesgDeps]
uses: eBay/homestore/.github/workflows/build_dependencies.yml@stable/v7.x
uses: eBay/homestore/.github/workflows/build_dependencies.yml@dev/v8.x
with:
branch: stable/v7.x
branch: dev/v8.x
platform: ${{ inputs.platform }}
build-type: ${{ inputs.build-type }}
malloc-impl: ${{ inputs.malloc-impl }}
prerelease: ${{ inputs.prerelease }}
compiler: ${{ inputs.compiler }}
conan-channel: ${{ inputs.conan-channel }}
tooling: None
if: ${{ github.event_name != 'pull_request' }}

Expand All @@ -74,6 +88,8 @@ jobs:
build-type: ${{ inputs.build-type }}
malloc-impl: ${{ inputs.malloc-impl }}
prerelease: ${{ inputs.prerelease }}
compiler: ${{ inputs.compiler }}
conan-channel: ${{ inputs.conan-channel }}
tooling: ${{ inputs.tooling }}
testing: 'True'
if: ${{ github.event_name != 'pull_request' }}
Expand All @@ -86,6 +102,8 @@ jobs:
build-type: ${{ inputs.build-type }}
malloc-impl: ${{ inputs.malloc-impl }}
prerelease: ${{ inputs.prerelease }}
compiler: ${{ inputs.compiler }}
conan-channel: ${{ inputs.conan-channel }}
tooling: ${{ inputs.tooling }}
testing: 'True'
if: ${{ github.event_name == 'pull_request' }}
127 changes: 96 additions & 31 deletions .github/workflows/build_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ on:
required: false
type: string
default: 'False'
compiler:
required: false
type: string
default: 'gcc'
conan-channel:
required: false
type: string
default: 'dev'
workflow_dispatch:
inputs:
platform:
Expand Down Expand Up @@ -64,7 +72,9 @@ on:
tooling:
required: false
type: choice
- 'Sanitize'
options:
- 'AddressSanitize'
- 'ThreadSanitize'
- 'Coverage'
- 'None'
default: 'None'
Expand All @@ -76,6 +86,16 @@ on:
- 'True'
- 'False'
default: 'True'
compiler:
required: false
type: choice
options:
- gcc
default: gcc
conan-channel:
required: false
type: string
default: 'dev'

jobs:
BuildHomeObjectDeps:
Expand All @@ -95,42 +115,63 @@ jobs:
if: ${{ inputs.testing == 'False' }}

- name: Setup Conan
uses: ebay/sisl/.github/actions/setup_conan2@stable/v13.x
uses: ebay/sisl/.github/actions/setup_conan2@dev/v14.x
with:
platform: ${{ inputs.platform }}
compiler: ${{ inputs.compiler }}
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Load HomeObject Cache
id: restore-cache
uses: eBay/sisl/.github/actions/load_conan2@stable/v13.x
uses: eBay/sisl/.github/actions/load_conan2@dev/v14.x
with:
testing: ${{ inputs.testing }}
key_prefix: HomeObjectDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.prerelease }}

- name: Retrieve Dependencies Sisl
uses: actions/checkout@v4
with:
repository: eBay/sisl
path: import/sisl
ref: dev/v14.x
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Load Sisl Cache
uses: eBay/sisl/.github/actions/load_conan2@stable/v13.x
uses: eBay/sisl/.github/actions/load_conan2@dev/v14.x
with:
testing: 'False'
path: import/sisl
key_prefix: SislDeps14-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.compiler }}
fail_on_cache_miss: true
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Retrieve Dependencies IOMgr
uses: actions/checkout@v4
with:
load_any: 'True'
key_prefix: SislDeps13-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}
repository: eBay/iomanager
path: import/iomgr
ref: dev/v13.x
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Load IOMgr Cache
uses: eBay/sisl/.github/actions/load_conan2@stable/v13.x
uses: eBay/sisl/.github/actions/load_conan2@dev/v14.x
with:
load_any: 'True'
key_prefix: IOMgrDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.prerelease }}
testing: 'False'
path: import/iomgr
key_prefix: IOMgrDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.compiler }}
fail_on_cache_miss: true
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Retrieve Dependencies NuRaftMesg
uses: actions/checkout@v4
with:
repository: eBay/nuraft_mesg
path: import/nuraft_mesg
ref: stable/v4.x
ref: dev/v5.x
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Load NuRaftMesg Cache
uses: eBay/sisl/.github/actions/load_conan2@stable/v13.x
uses: eBay/sisl/.github/actions/load_conan2@dev/v14.x
with:
testing: 'False'
path: import/nuraft_mesg
Expand All @@ -143,25 +184,41 @@ jobs:
with:
repository: eBay/HomeStore
path: import/homestore
ref: stable/v7.x
ref: dev/v8.x
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Load HomeStore Cache
uses: eBay/sisl/.github/actions/load_conan2@stable/v13.x
uses: eBay/sisl/.github/actions/load_conan2@dev/v14.x
with:
testing: 'False'
path: import/homestore
key_prefix: HomestoreDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.prerelease }}
key_prefix: HomestoreDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}
fail_on_cache_miss: true
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}


- name: Export Recipes
run: |
sudo apt-get install -y python3-pyelftools libaio-dev
python -m pip install pyelftools
conan export import/homestore
conan export import/nuraft_mesg
sudo rm -rf $ANDROID_HOME

pushd import/sisl
./prepare_v2.sh
conan export --user oss --channel ${{ inputs.conan-channel }} .
popd

pushd import/iomgr
conan export --user oss --channel ${{ inputs.conan-channel }} .
popd

pushd import/nuraft_mesg
./prepare_v2.sh
conan export --user oss --channel ${{ inputs.conan-channel }} .
popd

pushd import/homestore
conan export --user oss --channel ${{ inputs.conan-channel }} .
popd
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Build Cache
Expand All @@ -170,12 +227,11 @@ jobs:
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 homeobject/*:prerelease=${{ inputs.prerelease }} \
-o sisl/*:malloc_impl=${{ inputs.malloc-impl }} \
-o iomgr/*:testing=off \
-o homestore/*:testing=off \
Expand All @@ -184,31 +240,35 @@ jobs:
--format=json \
--build missing \
. > ~/build.json
conan list --graph ~/build.json --graph-binaries=build --format=json > ~/pkglist.json
conan list --graph ~/build.json --graph-binaries=build,cache --format=json > ~/pkglist.json
if: ${{ steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Save Conan Cache
uses: eBay/sisl/.github/actions/store_conan2@stable/v13.x
uses: eBay/sisl/.github/actions/store_conan2@dev/v14.x
with:
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
uses: eBay/sisl/.github/actions/load_conan2@dev/v14.x
with:
load_any: 'True'
key_prefix: SislDeps13-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}
testing: 'False'
path: import/sisl
key_prefix: SislDeps14-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.compiler }}
fail_on_cache_miss: true
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
uses: eBay/sisl/.github/actions/load_conan2@dev/v14.x
with:
load_any: 'True'
key_prefix: IOMgrDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.prerelease }}
testing: 'False'
path: import/iomgr
key_prefix: IOMgrDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.compiler }}
fail_on_cache_miss: true
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
uses: eBay/sisl/.github/actions/load_conan2@dev/v14.x
with:
testing: 'False'
path: import/nuraft_mesg
Expand All @@ -217,25 +277,29 @@ jobs:
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
uses: eBay/sisl/.github/actions/load_conan2@dev/v14.x
with:
testing: 'False'
path: import/homestore
key_prefix: HomestoreDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.prerelease }}
key_prefix: HomestoreDeps-${{ 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: Create and Test Package
run: |
sanitize=$([[ "${{ inputs.tooling }}" == "Sanitize" ]] && echo "True" || echo "False")
if [[ "${{ inputs.tooling }}" == "AddressSanitize" ]]; then sanitize="address"
elif [[ "${{ inputs.tooling }}" == "ThreadSanitize" ]]; then sanitize="thread"
else sanitize="False"; fi
pre=$([[ "${{ inputs.build-type }}" != "Debug" ]] && echo "-o iomgr/*:prerelease=${{ inputs.prerelease }}" || echo "")
conan create \
${pre} \
-o homeobject/*:prerelease=${{ inputs.prerelease }} \
-o sisl/*:malloc_impl=${{ inputs.malloc-impl }} \
-o iomgr/*:testing=off \
-o homestore/*:testing=off \
-o homeobject/*:sanitize=${sanitize} \
-s:h build_type=${{ inputs.build-type }} \
${{ inputs.conan-channel != '' && format('--user oss --channel {0}', inputs.conan-channel) || '' }} \
--build missing \
.
if: ${{ inputs.testing == 'True' && inputs.tooling != 'Coverage' }}
Expand All @@ -245,6 +309,7 @@ jobs:
pre=$([[ "${{ inputs.build-type }}" != "Debug" ]] && echo "-o iomgr/*:prerelease=${{ inputs.prerelease }}" || echo "")
conan build \
${pre} \
-o homeobject/*:prerelease=${{ inputs.prerelease }} \
-o sisl/*:malloc_impl=${{ inputs.malloc-impl }} \
-o iomgr/*:testing=off \
-o homestore/*:testing=off \
Expand Down
Loading
Loading