Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
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
63 changes: 63 additions & 0 deletions .github/actions/load_conan2/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 'Load Conan Cache'
description: 'Loads Local Conan Cache'
inputs:
testing:
description: 'Support building tests'
required: true
key_prefix:
description: 'Cache prefix'
required: true
default: 'Deps'
fail_on_cache_miss:
description: 'Fail if key missing'
required: false
default: false
path:
description: 'Recipe path'
required: false
default: '.'
load_any:
description: 'Load cache miss'
required: false
default: 'False'
outputs:
cache-hit:
description: 'Cache match found'
value: ${{ steps.restore-cache.outputs.cache-hit }}
runs:
using: "composite"
steps:
- id: hash-key-primary
shell: bash
run: |
echo "key=${{ inputs.path }}/conanfile.py" >> $GITHUB_OUTPUT

- id: hash-key-3rd
shell: bash
run: |
echo "keys=${{ inputs.path }}/3rd_party/**/conanfile.py" >> $GITHUB_OUTPUT

- name: Restore Cache
id: restore-cache
uses: actions/cache/restore@v4
with:
path: |
~/conan_cache_save.tgz
key: ${{ inputs.key_prefix }}-${{ hashFiles(steps.hash-key-primary.outputs.key, steps.hash-key-3rd.outputs.keys) }}
fail-on-cache-miss: ${{ inputs.fail_on_cache_miss }}

- name: Restore Testing Cache
uses: actions/cache/restore@v4
with:
path: |
~/conan_cache_save.tgz
key: ${{ inputs.key_prefix }}-${{ hashFiles(steps.hash-key-primary.outputs.key, steps.hash-key-3rd.outputs.keys) }}
restore-keys: ${{ inputs.key_prefix }}-
if: ${{ steps.restore-cache.outputs.cache-hit != 'true' && (( github.event_name == 'pull_request' && inputs.testing == 'True' ) || ( inputs.load_any == 'True' )) }}

- name: Restore Tarball
shell: bash
run: |
conan cache restore ~/conan_cache_save.tgz
if: ${{ ((steps.restore-cache.outputs.cache-hit == 'true') || ( inputs.load_any == 'True' ))}}

32 changes: 32 additions & 0 deletions .github/actions/setup_conan2/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Setup Conan v2'
description: 'Sets up Conan v2 for Sisl v13+ Builds'
inputs:
platform:
description: 'Platform conan will be building on'
required: true
default: 'ubuntu-24.04'
runs:
using: "composite"
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Setup Conan and Export Recipes
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install conan~=2.0
python -m pip install gcovr
conan profile detect --name default

- name: Fixup libstdc++
shell: bash
run: |
# Set std::string to non-CoW C++11 version
sed -i 's,compiler.libcxx=libstdc++$,compiler.libcxx=libstdc++11,g' ~/.conan2/profiles/default
# Set C++ version to C++20
sed -i 's,compiler.cppstd=.*$,compiler.cppstd=20,g' ~/.conan2/profiles/default
if: ${{ inputs.platform == 'ubuntu-24.04' }}

22 changes: 22 additions & 0 deletions .github/actions/store_conan2/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Store Conan Cache'
description: 'Cleans Local Conan Cache and Persists Dirty Packages'
inputs:
key_prefix:
description: 'Cache prefix'
required: true
default: 'Deps'
runs:
using: "composite"
steps:
- name: Setup Conan and Export Recipes
shell: bash
run: |
conan cache save --no-source --file ~/conan_cache_save.tgz -l ~/pkglist.json

- name: Save Cache
uses: actions/cache/save@v4
with:
path: |
~/conan_cache_save.tgz
key: ${{ inputs.key_prefix }}-${{ hashFiles('conanfile.py', '3rd_party/**/conanfile.py') }}

77 changes: 29 additions & 48 deletions .github/workflows/build_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
platform:
required: false
default: 'ubuntu-22.04'
default: 'ubuntu-24.04'
type: string
branch:
required: true
Expand All @@ -16,10 +16,6 @@ on:
malloc-impl:
required: true
type: string
prerelease:
required: false
type: string
default: 'False'
tooling:
required: false
type: string
Expand All @@ -34,11 +30,8 @@ on:
required: true
type: choice
options:
- ubuntu-22.04
- ubuntu-20.04
- macos-13
- macos-12
default: 'ubuntu-22.04'
- ubuntu-24.04
default: 'ubuntu-24.04'
branch:
required: true
type: string
Expand All @@ -57,14 +50,6 @@ on:
- libc
- tcmalloc
- jemalloc
prerelease:
description: 'Fault Instrumentation'
required: false
type: choice
options:
- 'True'
- 'False'
default: 'False'
tooling:
required: false
type: choice
Expand Down Expand Up @@ -94,73 +79,69 @@ jobs:
- name: Retrieve Recipe
uses: actions/checkout@main
with:
repository: eBay/sisl
repository: ebay/sisl
ref: ${{ inputs.branch }}
if: ${{ inputs.testing == 'False' }}

- name: Load Conan Cache
id: restore-cache
uses: eBay/sisl/.github/actions/load_conan@master
with:
testing: ${{ inputs.testing }}
key_prefix: SislDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.prerelease }}

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

- name: Load Conan Cache
id: restore-cache
uses: ebay/sisl/.github/actions/load_conan2@dev/v13.x
with:
testing: ${{ inputs.testing }}
key_prefix: SislDeps13-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}

- name: Prepare Recipes
run: |
./prepare.sh
cached_pkgs=$(ls -1d ~/.conan/data/*/*/*/*/export 2>/dev/null | sed 's,.*data/,,' | cut -d'/' -f1,2 | paste -sd',' - -)
echo "::info:: Pre-cached: ${cached_pkgs}"
./prepare_v2.sh
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Build Cache
run: |
conan install \
-o prerelease=${{ inputs.prerelease }} \
-o malloc_impl=${{ inputs.malloc-impl }} \
-s build_type=${{ inputs.build-type }} \
-o sisl/*:malloc_impl=${{ inputs.malloc-impl }} \
-s:h build_type=${{ inputs.build-type }} \
--format=json \
--build missing \
.
. > ~/build.json
conan list --graph ~/build.json --graph-binaries=build --format=json > ~/pkglist.json
if: ${{ steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Save Conan Cache
uses: eBay/sisl/.github/actions/store_conan@master
uses: ebay/sisl/.github/actions/store_conan2@dev/v13.x
with:
key_prefix: SislDeps-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}-${{ inputs.prerelease }}
key_prefix: SislDeps13-${{ inputs.platform }}-${{ inputs.build-type }}-${{ inputs.malloc-impl }}
if: ${{ 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:sanitize=${sanitize} \
-s build_type=${{ inputs.build-type }} \
-o sisl/*:malloc_impl=${{ inputs.malloc-impl }} \
-o sisl/*:sanitize=${sanitize} \
-s:h build_type=${{ inputs.build-type }} \
--build missing \
.
if: ${{ inputs.testing == 'True' && inputs.tooling != 'Coverage' }}

- name: Code Coverage Run
run: |
conan install \
-o prerelease=${{ inputs.prerelease }} \
-o malloc_impl=${{ inputs.malloc-impl }} \
-o coverage=True \
-s build_type=${{ inputs.build-type }} \
conan build \
-o sisl/*:malloc_impl=${{ inputs.malloc-impl }} \
-o sisl/*:coverage=True \
-s:h build_type=${{ inputs.build-type }} \
--build missing \
.
conan build .
if: ${{ inputs.testing == 'True' && inputs.tooling == 'Coverage' }}

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
gcov: true
verbose: true
if: ${{ inputs.testing == 'True' && inputs.tooling == 'Coverage' }}
55 changes: 26 additions & 29 deletions .github/workflows/merge_build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Sisl Build
name: Sisl v13 Build

on:
workflow_dispatch:
push:
branches:
- dev/v13.x
- stable/v12.x
- master

Expand All @@ -12,14 +13,11 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: ["ubuntu-22.04"]
platform: ["ubuntu-24.04"]
build-type: ["Debug", "Release"]
malloc-impl: ["libc", "tcmalloc"]
prerelease: ["True", "False"]
tooling: ["Sanitize", "Coverage", "None"]
exclude:
- build-type: Debug
prerelease: "False"
- build-type: Debug
tooling: None
- build-type: Debug
Expand All @@ -36,29 +34,28 @@ jobs:
branch: ${{ github.ref }}
build-type: ${{ matrix.build-type }}
malloc-impl: ${{ matrix.malloc-impl }}
prerelease: ${{ matrix.prerelease }}
tooling: ${{ matrix.tooling }}
testing: 'True'
ChainBuild:
runs-on: "ubuntu-22.04"
steps:
- name: Start IOManager Build
run: |
curl -L \
-X POST \
-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/iomanager/actions/workflows/merge_build.yml/dispatches \
-d '{"ref":"master","inputs":{}}'
if: ${{ github.ref == 'refs/heads/master' }}
- name: Start NuraftMesg Build
run: |
curl -L \
-X POST \
-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/nuraft_mesg/actions/workflows/conan_build.yml/dispatches \
-d '{"ref":"main","inputs":{}}'
if: ${{ github.ref == 'refs/heads/master' }}
# ChainBuild:
# runs-on: "ubuntu-22.04"
# steps:
# - name: Start IOManager Build
# run: |
# curl -L \
# -X POST \
# -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/iomanager/actions/workflows/merge_build.yml/dispatches \
# -d '{"ref":"master","inputs":{}}'
# if: ${{ github.ref == 'refs/heads/master' }}
# - name: Start NuraftMesg Build
# run: |
# curl -L \
# -X POST \
# -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/nuraft_mesg/actions/workflows/conan_build.yml/dispatches \
# -d '{"ref":"main","inputs":{}}'
# if: ${{ github.ref == 'refs/heads/master' }}
9 changes: 3 additions & 6 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Sisl Build
name: Sisl v13 Build

on:
workflow_dispatch:
pull_request:
branches:
- dev/v13.x
- stable/v12.x
- master

Expand All @@ -12,14 +13,11 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: ["ubuntu-22.04"]
platform: ["ubuntu-24.04"]
build-type: ["Debug", "Release"]
malloc-impl: ["libc", "tcmalloc"]
prerelease: ["True", "False"]
tooling: ["Sanitize", "Coverage", "None"]
exclude:
- build-type: Debug
prerelease: "False"
- build-type: Debug
tooling: None
- build-type: Debug
Expand All @@ -36,6 +34,5 @@ jobs:
branch: ${{ github.ref }}
build-type: ${{ matrix.build-type }}
malloc-impl: ${{ matrix.malloc-impl }}
prerelease: ${{ matrix.prerelease }}
tooling: ${{ matrix.tooling }}
testing: 'True'
3 changes: 1 addition & 2 deletions .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pipeline {
agent { label 'sds-builder-v5' }
agent { label 'sds-builder-v8' }

environment {
ARTIFACTORY_PASS = credentials('ARTIFACTORY_PASS')
Expand Down Expand Up @@ -37,7 +37,6 @@ pipeline {
sh "conan create ${BUILD_MISSING} -s:h build_type=Debug -o ${PROJECT}/*:sanitize=True ${CONAN_FLAGS} . ; \
conan create ${BUILD_MISSING} -s:h build_type=Debug ${CONAN_FLAGS} . ; \
conan create ${BUILD_MISSING} -s:h build_type=RelWithDebInfo -o ${PROJECT}/*:malloc_impl=tcmalloc ${CONAN_FLAGS} . ; \
conan create ${BUILD_MISSING} -s:h build_type=RelWithDebInfo -o ${PROJECT}/*:prerelease=True -o ${PROJECT}/*:malloc_impl=tcmalloc ${CONAN_FLAGS} . ; \
"
}
}
Expand Down
Loading