Skip to content

Commit

Permalink
Merge branch 'main' into non_iid_ness_utils_file
Browse files Browse the repository at this point in the history
  • Loading branch information
tanertopal authored Jun 18, 2024
2 parents 578832d + 0e007b4 commit 43c781b
Show file tree
Hide file tree
Showing 25 changed files with 14,516 additions and 9,746 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Release nightly
on:
schedule:
- cron: "0 23 * * *"
- cron: "30 23 * * *"

env:
FLWR_TELEMETRY_ENABLED: 0
Expand All @@ -25,15 +24,11 @@ jobs:
id: bootstrap
uses: ./.github/actions/bootstrap
- name: Release nightly
if: github.event.schedule == '0 23 * * *'
id: release
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: ./dev/publish-nightly.sh
- name: Read nightly version and name
if: github.event.schedule == '30 23 * * *'
id: release
run: |
RESULT=$(./dev/publish-nightly.sh --skip-publish)
RESULT=$(./dev/publish-nightly.sh)
if [ "$RESULT" == "There were no commits in the last 24 hours." ]; then
echo "skip=true" >> $GITHUB_OUTPUT
fi
Expand All @@ -45,7 +40,7 @@ jobs:
build-docker-base-images:
name: Build nightly base images
if: github.repository == 'adap/flower' && needs.release-nightly.outputs.skip != 'true' && github.event.schedule == '30 23 * * *'
if: github.repository == 'adap/flower' && needs.release-nightly.outputs.skip != 'true'
uses: ./.github/workflows/_docker-build.yml
needs: release-nightly
with:
Expand All @@ -65,7 +60,7 @@ jobs:

build-docker-binary-images:
name: Build nightly binary images
if: github.repository == 'adap/flower' && needs.release-nightly.outputs.skip != 'true' && github.event.schedule == '30 23 * * *'
if: github.repository == 'adap/flower' && needs.release-nightly.outputs.skip != 'true'
uses: ./.github/workflows/_docker-build.yml
needs: [release-nightly, build-docker-base-images]
strategy:
Expand Down
8 changes: 2 additions & 6 deletions dev/publish-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@ cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/../
# The version name in the pyproject.toml will be appended with "-dev" and the current date.
# The result will be a release on PyPi of the package "flwr-nightly" of version e.g.
# "0.1.1.dev20200716" as seen at https://pypi.org/project/flwr-nightly/
# If the script is called with the flag `--skip-publish`, the name and version are changed
# in the pyproject.toml but the package won't be published.

if [[ $(git log --since="24 hours ago" --pretty=oneline) ]]; then
sed -i -E "s/^name = \"(.+)\"/name = \"\1-nightly\"/" pyproject.toml
sed -i -E "s/^version = \"(.+)\"/version = \"\1.dev$(date '+%Y%m%d')\"/" pyproject.toml
if [ "$1" != "--skip-publish" ]; then
python -m poetry build
python -m poetry publish -u __token__ -p $PYPI_TOKEN
fi
python -m poetry build
python -m poetry publish -u __token__ -p $PYPI_TOKEN
else
echo "There were no commits in the last 24 hours."
fi
Loading

0 comments on commit 43c781b

Please sign in to comment.