-
Notifications
You must be signed in to change notification settings - Fork 942
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-xgboost-template
- Loading branch information
Showing
510 changed files
with
104,166 additions
and
80,863 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
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,69 @@ | ||
name: Build Docker Images Main Branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
parameters: | ||
if: github.repository == 'adap/flower' | ||
name: Collect docker build parameters | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
outputs: | ||
pip-version: ${{ steps.versions.outputs.pip-version }} | ||
setuptools-version: ${{ steps.versions.outputs.setuptools-version }} | ||
flwr-version-ref: ${{ steps.versions.outputs.flwr-version-ref }} | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- uses: ./.github/actions/bootstrap | ||
id: bootstrap | ||
|
||
- id: versions | ||
run: | | ||
echo "pip-version=${{ steps.bootstrap.outputs.pip-version }}" >> "$GITHUB_OUTPUT" | ||
echo "setuptools-version=${{ steps.bootstrap.outputs.setuptools-version }}" >> "$GITHUB_OUTPUT" | ||
echo "flwr-version-ref=git+${{ github.server_url }}/${{ github.repository }}.git@${{ github.sha }}" >> "$GITHUB_OUTPUT" | ||
build-docker-base-images: | ||
name: Build base images | ||
if: github.repository == 'adap/flower' | ||
uses: ./.github/workflows/_docker-build.yml | ||
needs: parameters | ||
with: | ||
namespace-repository: flwr/base | ||
file-dir: src/docker/base/ubuntu | ||
build-args: | | ||
PIP_VERSION=${{ needs.parameters.outputs.pip-version }} | ||
SETUPTOOLS_VERSION=${{ needs.parameters.outputs.setuptools-version }} | ||
FLWR_VERSION_REF=${{ needs.parameters.outputs.flwr-version-ref }} | ||
tags: unstable | ||
secrets: | ||
dockerhub-user: ${{ secrets.DOCKERHUB_USERNAME }} | ||
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
build-docker-binary-images: | ||
name: Build binary images | ||
if: github.repository == 'adap/flower' | ||
uses: ./.github/workflows/_docker-build.yml | ||
needs: build-docker-base-images | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
images: [ | ||
{ repository: "flwr/superlink", file_dir: "src/docker/superlink" }, | ||
{ repository: "flwr/supernode", file_dir: "src/docker/supernode" }, | ||
{ repository: "flwr/serverapp", file_dir: "src/docker/serverapp" }, | ||
{ repository: "flwr/superexec", file_dir: "src/docker/superexec" }, | ||
{ repository: "flwr/clientapp", file_dir: "src/docker/clientapp" } | ||
] | ||
with: | ||
namespace-repository: ${{ matrix.images.repository }} | ||
file-dir: ${{ matrix.images.file_dir }} | ||
build-args: BASE_IMAGE=unstable | ||
tags: unstable | ||
secrets: | ||
dockerhub-user: ${{ secrets.DOCKERHUB_USERNAME }} | ||
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} |
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,51 @@ | ||
name: Update Docker READMEs | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- 'src/docker/**/README.md' | ||
|
||
jobs: | ||
collect: | ||
if: ${{ github.repository == 'adap/flower' }} | ||
name: Collect Docker READMEs | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
outputs: | ||
readme_files: ${{ steps.filter.outputs.readme_files }} | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | ||
id: filter | ||
with: | ||
list-files: "json" | ||
filters: | | ||
readme: | ||
- 'src/docker/**/README.md' | ||
update: | ||
if: ${{ needs.collect.outputs.readme_files != '' && toJson(fromJson(needs.collect.outputs.readme_files)) != '[]' }} | ||
name: Update Docker READMEs | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
needs: collect | ||
strategy: | ||
matrix: | ||
readme_path: ${{ fromJSON(needs.collect.outputs.readme_files) }} | ||
|
||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- id: repository | ||
run: echo "name=$(basename $(dirname ${{ matrix.readme_path }}))" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Docker Hub Description | ||
uses: peter-evans/dockerhub-description@e98e4d1628a5f3be2be7c231e50981aee98723ae # v4.0.0 | ||
with: | ||
repository: flwr/${{ steps.repository.outputs.name }} | ||
readme-filepath: ${{ matrix.readme_path }} | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} |
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,79 @@ | ||
name: Translations | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Runs every day at midnight | ||
workflow_dispatch: # Allows to manually trigger the workflow | ||
|
||
jobs: | ||
update-and-pr: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
env: | ||
branch-name: auto-update-trans-text | ||
name: Update text | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Bootstrap | ||
uses: ./.github/actions/bootstrap | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m poetry install | ||
pip install sphinx==7.3.7 | ||
- name: Install pandoc | ||
uses: nikeee/setup-pandoc@v1 | ||
|
||
- name: Update text and translations for all locales | ||
run: | | ||
cd doc | ||
make update-text | ||
for langDir in locales/*; do | ||
if [ -d "$langDir" ]; then | ||
lang=$(basename $langDir) | ||
echo "Updating language $lang" | ||
make update-lang lang=$lang | ||
fi | ||
done | ||
- name: Commit changes | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git add doc/locales | ||
git commit -m "Update text and language files" | ||
continue-on-error: true | ||
|
||
- name: Calculate diff # Even without doc changes the update-lang command will generate 228 additions and 60 deletions, so we only want to open a PR when there is more | ||
id: calculate_diff | ||
run: | | ||
additions=$(git diff --numstat HEAD^1 | awk '{s+=$1} END {print s}') | ||
deletions=$(git diff --numstat HEAD^1 | awk '{s+=$2} END {print s}') | ||
echo "Additions: $additions" | ||
echo "Deletions: $deletions" | ||
echo "additions=$additions" >> $GITHUB_OUTPUT | ||
echo "deletions=$deletions" >> $GITHUB_OUTPUT | ||
- name: Push changes | ||
if: steps.calculate_diff.outputs.additions > 228 && steps.calculate_diff.outputs.deletions > 60 | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: '${{ env.branch-name }}' | ||
|
||
- name: Create Pull Request | ||
if: steps.calculate_diff.outputs.additions > 228 && steps.calculate_diff.outputs.deletions > 60 | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: '${{ env.branch-name }}' | ||
delete-branch: true | ||
title: 'docs(framework:skip) Update source texts for translations (automated)' | ||
body: 'This PR is auto-generated to update text and language files.' | ||
draft: false |
Oops, something went wrong.