-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-fds-e2e-tests-to-ci
- Loading branch information
Showing
714 changed files
with
77,728 additions
and
2,812 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: C++ SDK | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
paths: ['src/cc/flwr/**'] | ||
pull_request: | ||
branches: ['main'] | ||
paths: ['src/cc/flwr/**'] | ||
|
||
jobs: | ||
build_and_test: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Bootstrap | ||
uses: ./.github/actions/bootstrap | ||
|
||
- name: Cache restore SDK build | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: build/ | ||
key: ${{ runner.os }}-sdk-build | ||
|
||
- name: Cache restore example build | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: examples/quickstart-cpp/build/ | ||
key: ${{ runner.os }}-example-build | ||
|
||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y clang-format cmake g++ clang-tidy cppcheck | ||
- name: Check source Formatting | ||
run: | | ||
find src/cc/flwr/src -name '*.cc' | xargs clang-format -i | ||
git diff --exit-code | ||
- name: Check header Formatting | ||
run: | | ||
find src/cc/flwr/include -name '*.h' -not -path "src/cc/flwr/include/flwr/*" | xargs clang-format -i | ||
git diff --exit-code | ||
- name: Build | ||
run: | | ||
mkdir -p build | ||
cd build | ||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ../src/cc/flwr | ||
make | ||
- name: Run clang-tidy | ||
run: | | ||
cd build | ||
find ../src/cc/flwr/src -name '*.cc' | xargs clang-tidy | ||
- name: Run cppcheck | ||
run: | | ||
cd build | ||
cppcheck --enable=all -I../src/cc/flwr/include ../src/cc/flwr/src | ||
- name: End-to-end test | ||
run: | | ||
cd examples/quickstart-cpp | ||
cmake -DUSE_LOCAL_FLWR=ON -S . -B build | ||
cmake --build build | ||
pip install ../.. | ||
timeout 2m python server.py & | ||
pid=$! | ||
sleep 3 | ||
build/flwr_client 0 127.0.0.1:8080 & | ||
sleep 3 | ||
build/flwr_client 1 127.0.0.1:8080 & | ||
wait $pid | ||
res=$? | ||
if [[ "$res" = "0" ]]; | ||
then echo "Training worked correctly"; | ||
else echo "Training had an issue" && exit 1; | ||
fi | ||
- name: Cache save SDK build | ||
uses: actions/cache/save@v3 | ||
if: github.ref_name == 'main' | ||
with: | ||
path: build/ | ||
key: ${{ runner.os }}-sdk-build | ||
|
||
- name: Cache save example build | ||
uses: actions/cache/save@v3 | ||
if: github.ref_name == 'main' | ||
with: | ||
path: examples/quickstart-cpp/build/ | ||
key: ${{ runner.os }}-example-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Release Framework | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
publish: | ||
if: ${{ github.repository == 'adap/flower' }} | ||
name: Publish draft | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Wait for wheel to be built | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
check-name: 'Build, test and upload wheel' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 10 | ||
- name: Download wheel | ||
run: | | ||
tag_name=$(echo "${GITHUB_REF_NAME}" | cut -c2-) | ||
echo "TAG_NAME=$tag_name" >> "$GITHUB_ENV" | ||
wheel_name="flwr-${tag_name}-py3-none-any.whl" | ||
echo "WHEEL_NAME=$wheel_name" >> "$GITHUB_ENV" | ||
tar_name="flwr-${tag_name}.tar.gz" | ||
echo "TAR_NAME=$tar_name" >> "$GITHUB_ENV" | ||
wheel_url="https://artifact.flower.dev/py/main/${GITHUB_SHA::7}/${wheel_name}" | ||
tar_url="https://artifact.flower.dev/py/main/${GITHUB_SHA::7}/${tar_name}" | ||
curl $wheel_url --output $wheel_name | ||
curl $tar_url --output $tar_name | ||
- name: Upload wheel | ||
env: | ||
AWS_DEFAULT_REGION: ${{ secrets. AWS_DEFAULT_REGION }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets. AWS_SECRET_ACCESS_KEY }} | ||
run: | | ||
aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./${{ env.WHEEL_NAME }} s3://artifact.flower.dev/py/release/v${{ env.TAG_NAME }}/${{ env.WHEEL_NAME }} | ||
aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./${{ env.TAR_NAME }} s3://artifact.flower.dev/py/release/v${{ env.TAG_NAME }}/${{ env.TAR_NAME }} | ||
- name: Generate body | ||
run: | | ||
./dev/get-latest-changelog.sh > body.md | ||
cat body.md | ||
- name: Release | ||
uses: softprops/action-gh-release@de2c0eb | ||
with: | ||
body_path: ./body.md | ||
draft: true | ||
name: Flower ${{ env.TAG_NAME }} | ||
files: | | ||
${{ env.WHEEL_NAME }} | ||
${{ env.TAR_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.