Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Homomorphic Encryption FL using TenSEAL #827

Open
wants to merge 3,983 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3983 commits
Select commit Hold shift + click to select a range
00c5545
Update smoke_test_ml_engines_linux.yml
chaoyanghe Sep 10, 2022
3f5ef9a
Update smoke_test_ml_engines_linux.yml
chaoyanghe Sep 10, 2022
b14723c
[dp]
han-shanshan Sep 11, 2022
d5221b9
Merge pull request #566 from FedML-AI/dev/v0.7.0
chaoyanghe Sep 11, 2022
143cdbd
Merge pull request #567 from FedML-AI/test/v0.7.0
chaoyanghe Sep 11, 2022
e570b84
debug wheels.
Sep 11, 2022
d3e0b58
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
Sep 11, 2022
355018e
publish version 0.7.317.
Sep 11, 2022
7258a7b
Merge pull request #569 from FedML-AI/dev/v0.7.0
fedml-alex Sep 11, 2022
cd91ce0
Merge pull request #570 from FedML-AI/test/v0.7.0
fedml-alex Sep 11, 2022
d92e158
debug wheels.
Sep 11, 2022
e46a699
Merge pull request #571 from FedML-AI/dev/v0.7.0
fedml-alex Sep 11, 2022
31dd43f
Merge pull request #572 from FedML-AI/test/v0.7.0
fedml-alex Sep 11, 2022
6b41be3
Update build_wheels_and_releases.yml
chaoyanghe Sep 11, 2022
61e6e90
Update build_wheels_and_releases.yml
chaoyanghe Sep 11, 2022
2da9508
Update build_wheels_and_releases.yml
chaoyanghe Sep 11, 2022
68b1c88
Update build_wheels_and_releases.yml
chaoyanghe Sep 11, 2022
7c57a78
Update build_wheels_and_releases.yml
chaoyanghe Sep 11, 2022
c5a604d
Update build_wheels_and_releases.yml
chaoyanghe Sep 11, 2022
221eb7a
Update build_wheels_and_releases.yml
chaoyanghe Sep 11, 2022
efd0473
Update build_wheels_and_releases.yml
chaoyanghe Sep 11, 2022
b30bb65
[dp] rename solutions to frames
han-shanshan Sep 11, 2022
7afd7b9
[defense] update readme
han-shanshan Sep 11, 2022
31c8a19
add NbAFL
Nicole456 Sep 12, 2022
daebbdb
[defense] ResidualBasedReweighting add base functions;
han-shanshan Sep 12, 2022
2512955
[krum defense] add gpu config
han-shanshan Sep 12, 2022
33d6641
[defense] update script
han-shanshan Sep 12, 2022
a826e21
[examples] fine-tune the configuration and launch scripts for cifar-1…
chaoyanghe Sep 12, 2022
9b380e5
[example] update README.md
han-shanshan Sep 12, 2022
dc9d11d
[security] update README.md
han-shanshan Sep 13, 2022
7b8f08e
upd gpu config
phenomenal-manish Sep 13, 2022
3516ca5
upd gpu config
phenomenal-manish Sep 13, 2022
cca3918
add gpu_mapping.yaml
han-shanshan Sep 13, 2022
9442e5a
security example - gpu config
han-shanshan Sep 13, 2022
c9a0e2c
[DP] NbAFL.py
han-shanshan Sep 13, 2022
e413ba4
[DP] typo
han-shanshan Sep 13, 2022
387cfca
Merge pull request #575 from FedML-AI/dev/v0.7.0
chaoyanghe Sep 13, 2022
34406b6
add contribution assessor test framework
chaoyanghe Sep 16, 2022
7d8c18e
add contribution assessor test framework (bug fix)
chaoyanghe Sep 16, 2022
6d3837e
clean code for cifar10 dataset
chaoyanghe Sep 17, 2022
c3c52b3
add smoke test for ml engines on windows.
Sep 18, 2022
5d1a46a
update tf,jax,mxnet docs.
Sep 18, 2022
8dafad3
build(fedcv): add metrics, checkpoint, file logger
beiyuouo Sep 18, 2022
8c27a94
add mqtt+ipfs communication backend.
Sep 19, 2022
8971ee0
add LOO method
chaoyanghe Sep 19, 2022
28ce32c
Update smoke_test_cross_silo_fedavg_defense_linux.yml
han-shanshan Sep 19, 2022
5ffdd38
attack defense examples - upd configs; add gpu mapping for attack
han-shanshan Sep 19, 2022
e3f4dc9
add ipfs model crypto.
Sep 19, 2022
956837f
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
Sep 19, 2022
ea482d0
add encrypt lib on installation.
Sep 19, 2022
e62a78b
change the defender to foolsgold
chaoyanghe Sep 19, 2022
1b0101e
Update server_aggregator.py
chaoyanghe Sep 19, 2022
d7a312f
remove "Note: please run the server first."
chaoyanghe Sep 20, 2022
d517387
sp algorithms
phenomenal-manish Sep 22, 2022
1d6678d
add bootstrap.bat on windows platform.
Sep 22, 2022
ce97763
Merge pull request #578 from FedML-AI/dev/v0.7.0
fedml-alex Sep 22, 2022
9e170ea
update setup version.
Sep 22, 2022
4b9e734
Merge pull request #579 from FedML-AI/dev/v0.7.0
fedml-alex Sep 22, 2022
2e8840d
Merge branch 'master' into test/v0.7.0
fedml-alex Sep 22, 2022
061f6d2
Merge pull request #580 from FedML-AI/test/v0.7.0
fedml-alex Sep 22, 2022
796465d
fixed pip init error.
Sep 22, 2022
414790d
Merge pull request #581 from FedML-AI/dev/v0.7.0
fedml-alex Sep 22, 2022
faef960
Merge pull request #582 from FedML-AI/test/v0.7.0
fedml-alex Sep 22, 2022
6ab5897
update bootstrap on windows.
Sep 22, 2022
d67a7f5
update bootstrap on windows.
Sep 22, 2022
7864310
update bootstrap on windows.
Sep 22, 2022
df9d34f
example - fix a typo
han-shanshan Sep 22, 2022
21ff7b6
debug foolsgold
chaoyanghe Sep 23, 2022
016321e
debug foolsgold
chaoyanghe Sep 23, 2022
574eac7
foolsgold remove use_memory parameter
han-shanshan Sep 23, 2022
91ba190
foolsgold debugging
chaoyanghe Sep 23, 2022
789de86
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
chaoyanghe Sep 23, 2022
bb2109b
fixed bootstrap log level to info.
Sep 23, 2022
360d20b
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
Sep 23, 2022
2fde71b
update setup version.
Sep 23, 2022
d3c0ee6
Merge pull request #583 from FedML-AI/dev/v0.7.0
fedml-alex Sep 23, 2022
f213744
Merge pull request #584 from FedML-AI/test/v0.7.0
fedml-alex Sep 23, 2022
4c015db
change the model for defense method to CIFAR-10
chaoyanghe Sep 23, 2022
94e85cc
defense method debug
chaoyanghe Sep 23, 2022
5096e39
add privacy budget accountant
Nicole456 Sep 24, 2022
341bebf
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
Nicole456 Sep 24, 2022
e6b41a5
Update naive_budget_accountant.py
Nicole456 Sep 24, 2022
b10827f
a
phenomenal-manish Sep 24, 2022
a5d30b7
sp optimizers
wizard1203 Sep 24, 2022
4aeb10c
Merge branch 'dev/v0.7.0' of https://github.com/wizard1203/FedML into…
wizard1203 Sep 24, 2022
16e1a0b
Update accountant.py
Nicole456 Sep 24, 2022
06e719d
Merge remote-tracking branch 'base/dev/v0.7.0' into dev/v0.7.0
wizard1203 Sep 24, 2022
9add80e
Merge branch 'dev/v0.7.0' of https://github.com/wizard1203/FedML into…
wizard1203 Sep 24, 2022
c20f4a3
test fedml flow
wizard1203 Sep 24, 2022
3aa646b
Merge pull request #585 from wizard1203/dev/v0.7.0
chaoyanghe Sep 24, 2022
1593442
Merge branch 'test/v0.7.0' into dev/v0.7.0
chaoyanghe Sep 24, 2022
9c7daac
Update device.py
chaoyanghe Sep 24, 2022
7edd99f
Add three sigma defense
han-shanshan Sep 24, 2022
360b24c
foolsgold numpy add .cpu()
han-shanshan Sep 25, 2022
98bdef2
update get_started docs.
Sep 25, 2022
e98bb1d
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
Sep 25, 2022
db0a916
add device killed status and update new version.
Sep 25, 2022
324a710
update bootstrap on windows.
Sep 25, 2022
b70b214
Merge pull request #586 from FedML-AI/dev/v0.7.0
fedml-alex Sep 25, 2022
3a9ab71
Merge pull request #587 from FedML-AI/test/v0.7.0
fedml-alex Sep 25, 2022
07f3bc2
Modified Home Page ACCURACY Not updated
Sep 26, 2022
d0c7e97
3 sigma - foolsgold score remove rescaling
han-shanshan Sep 27, 2022
ae6be69
foolsgold example
chaoyanghe Sep 27, 2022
c56f478
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
chaoyanghe Sep 27, 2022
9df86ec
defense example - update config
chaoyanghe Sep 27, 2022
7a4364e
Merge branch 'dev/v0.7.0' of github.com:FedML-AI/FedML into dev/v0.7.0
Sep 27, 2022
c5f208c
update bootstrap on windows in fedcv-object-detection app.
Sep 27, 2022
4b2eab5
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
Sep 27, 2022
cfa2787
add gpu device info for fedml env
chaoyanghe Sep 27, 2022
d9cc7d9
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
chaoyanghe Sep 27, 2022
ac58556
attack and defense example on cifar10 and resnet56
phenomenal-manish Sep 28, 2022
620bba0
attack and defense defense example of cifar10 and resnet56
phenomenal-manish Sep 28, 2022
bdb2af8
retire is_mobile args
chaoyanghe Sep 28, 2022
0fde6a6
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
chaoyanghe Sep 28, 2022
dcc6210
attacker - set extra_auxiliary_info to global model
han-shanshan Sep 29, 2022
41e096d
example remove pretrained model
han-shanshan Sep 29, 2022
d17a11a
3sigma + geo median
han-shanshan Sep 29, 2022
90e026d
Create codeql-analysis.yml
avestime Sep 30, 2022
f1f40a0
0.7.328
chaoyanghe Sep 30, 2022
80d89d7
fix security issue of PB library
chaoyanghe Sep 30, 2022
5004548
Merge pull request #592 from FedML-AI/dev/v0.7.0
chaoyanghe Sep 30, 2022
d374319
Merge pull request #593 from FedML-AI/test/v0.7.0
chaoyanghe Sep 30, 2022
5747d78
defense example - revert to default setting (mnist + lr)
han-shanshan Sep 30, 2022
3ff4afd
attack and defense example - update torch_mpi.py
han-shanshan Sep 30, 2022
ed0abef
add update_dataset() interface for client_trainer
chaoyanghe Oct 2, 2022
b241a90
byzantine attack add device
han-shanshan Oct 3, 2022
c08eee0
defense example - change to MQTT_S3 backend
han-shanshan Oct 3, 2022
0345672
Update fedml_server_manager.py
chaoyanghe Oct 3, 2022
cd8812a
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
chaoyanghe Oct 3, 2022
3a3ed4e
Update fedml_server_manager.py
chaoyanghe Oct 3, 2022
f3c46d3
optimized 3sigma defense
han-shanshan Oct 3, 2022
e65ae39
enable personalized model parameters for each client
chaoyanghe Oct 3, 2022
fd24afa
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
chaoyanghe Oct 3, 2022
829885d
0.7.330
chaoyanghe Oct 3, 2022
7b7ff5d
remove comments related to gpu mapping.md
han-shanshan Oct 4, 2022
d0766b7
update cli.
Oct 4, 2022
2bcf242
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
Oct 4, 2022
a9d65e7
update samples.
Oct 4, 2022
6d41fd8
update version.
Oct 4, 2022
f61df4c
update logs.
Oct 4, 2022
f80b23e
update bootstrap shell from sh to bash.
Oct 4, 2022
6f0647f
update bootstrap.sh.
Oct 5, 2022
7aaa278
Merge pull request #598 from FedML-AI/dev/v0.7.0
fedml-alex Oct 5, 2022
ffa5ea0
fix sp-mime init missing issue.
Oct 6, 2022
ee56f2a
Merge pull request #599 from FedML-AI/dev/v0.7.0
fedml-alex Oct 6, 2022
7e0fd56
add nccl-fedavg init file.
Oct 7, 2022
837155c
update version.
Oct 7, 2022
a8da511
Merge pull request #600 from FedML-AI/dev/v0.7.0
fedml-alex Oct 7, 2022
529a000
optimized krum (geometric median) to original (square distances)
han-shanshan Oct 7, 2022
709df15
add lr_cifar10 model
han-shanshan Oct 8, 2022
0a3379e
add dp budget accountant
Nicole456 Oct 9, 2022
6b70b89
add web3 storage and theta edge store, update bootstrap in the examples.
Oct 9, 2022
f46e47c
Merge branch 'dev/v0.7.0' of https://github.com/FedML-AI/FedML into d…
Oct 9, 2022
c3fd2b9
update version.
Oct 9, 2022
3a7af99
Merge pull request #602 from FedML-AI/dev/v0.7.0
fedml-alex Oct 9, 2022
9e0b20c
update dependency lib.
Oct 9, 2022
cf72aa9
update version.
Oct 9, 2022
0d2e79b
Merge pull request #603 from FedML-AI/dev/v0.7.0
fedml-alex Oct 9, 2022
f7c11fb
update dependency lib.
Oct 9, 2022
2359376
update version.
Oct 9, 2022
c2d1a3c
Merge pull request #604 from FedML-AI/dev/v0.7.0
fedml-alex Oct 9, 2022
19445bc
update dependency libs.
Oct 9, 2022
c422619
Merge pull request #605 from FedML-AI/dev/v0.7.0
fedml-alex Oct 9, 2022
f4f4d1b
update mnist-mqtt-s3 example doc about the client_id_list param.
Oct 10, 2022
d5718c0
Merge pull request #606 from FedML-AI/dev/v0.7.0
fedml-alex Oct 10, 2022
3b7e928
update example config in docs.
Oct 13, 2022
9566390
Merge pull request #608 from FedML-AI/dev/v0.7.0
fedml-alex Oct 15, 2022
bf0923c
code refactoring
han-shanshan Oct 21, 2022
0529b23
backdoor attack - model replacement
han-shanshan Oct 22, 2022
7d57ee1
update a defense: compute score distributions in each round
han-shanshan Oct 23, 2022
ea7be6f
update fedml docker build files.
Oct 24, 2022
f1325ba
add fedml docker build script.
Oct 24, 2022
bd78b4f
update dependency libs.
Oct 25, 2022
5a85195
Merge pull request #614 from FedML-AI/dev/v0.7.0
fedml-alex Oct 25, 2022
b3a45f2
release new version.
Oct 25, 2022
11dd30f
Merge pull request #615 from FedML-AI/dev/v0.7.0
fedml-alex Oct 25, 2022
a093e7f
update fedml dockerfile.
Oct 25, 2022
8308fac
update fedml dockerfile.
Oct 25, 2022
5f331be
update fedml dockefile.
Oct 25, 2022
39dc733
update fedml dockerfile.
Oct 25, 2022
6de660f
update fedml dockerfile.
Oct 25, 2022
2ebf952
update fedml dockerfile.
Oct 25, 2022
afc34ce
update fedml dockerfile.
Oct 25, 2022
321f5f5
update fedml dockerfile and jenkinsfile.
Oct 25, 2022
414901a
Merge pull request #617 from FedML-AI/dev/v0.7.0
fedml-alex Oct 25, 2022
4c129ae
update fedml dockerfile.
Oct 25, 2022
8bb43b3
Merge pull request #618 from FedML-AI/dev/v0.7.0
fedml-alex Oct 25, 2022
dfa5319
update fedml dockerfile and jenkinsfile.
Oct 25, 2022
ec0aa92
Merge pull request #619 from FedML-AI/dev/v0.7.0
fedml-alex Oct 25, 2022
37c544b
update fedml dockerfile and jenkinsfile.
Oct 25, 2022
f3cb11a
Merge pull request #620 from FedML-AI/dev/v0.7.0
fedml-alex Oct 25, 2022
3bd606a
Update codeql-analysis.yml
fedml-alex Oct 26, 2022
a1804a6
update pylint yml.
Oct 26, 2022
9ab4249
update pylint yml.
Oct 26, 2022
f0ec455
update pylint yml.
Oct 26, 2022
a10f41e
update pylint yml.
Oct 26, 2022
1747e4a
update github actions.
Oct 26, 2022
69f2875
Merge pull request #621 from FedML-AI/dev/v0.7.0
fedml-alex Oct 26, 2022
9e507ea
update pylint yml.
Oct 26, 2022
7e74642
update pylint yml.
Oct 26, 2022
2521386
update github actions.
Oct 26, 2022
e6eccb6
update pylint yml.
Oct 26, 2022
1bd1290
Merge pull request #622 from FedML-AI/dev/v0.7.0
fedml-alex Oct 26, 2022
1114ba2
update pylint yml.
Oct 26, 2022
0dd48df
update github actions.
Oct 26, 2022
ef623a5
update github action.
Oct 26, 2022
7f17330
update github action.
Oct 26, 2022
c7be1e0
update pylint yml.
Oct 26, 2022
7de4c16
update github actions.
Oct 26, 2022
e91f66c
update github actions.
Oct 26, 2022
32386f1
update fedml dockerfile for arm64.
Oct 26, 2022
1616cd4
Merge pull request #624 from FedML-AI/dev/v0.7.0
fedml-alex Oct 26, 2022
926bf7b
update fedml dockerfile and github actions.
Oct 26, 2022
f9f545b
Merge pull request #625 from FedML-AI/dev/v0.7.0
fedml-alex Oct 26, 2022
33cae6b
update fedml dockerfile.
Oct 26, 2022
2c1909f
Merge pull request #626 from FedML-AI/dev/v0.7.0
fedml-alex Oct 26, 2022
6698acb
update docker-build docs.
Oct 26, 2022
d623509
update base docker.
Oct 26, 2022
ba37365
Merge pull request #627 from FedML-AI/dev/v0.7.0
fedml-alex Oct 26, 2022
7b90ab7
update jenkinsfile.
Oct 26, 2022
4027d08
Merge pull request #628 from FedML-AI/dev/v0.7.0
fedml-alex Oct 26, 2022
ffcf315
update jenkinsfile.
Oct 27, 2022
8202430
update mpi action.
Oct 27, 2022
bd0b220
update mpi action.
Oct 27, 2022
1c3948b
update mpi action.
Oct 27, 2022
4517379
update mpi action.
Oct 27, 2022
d72ffc3
update mpi action.
Oct 27, 2022
eb437f0
update mpi action.
Oct 27, 2022
5a02f59
update mpi action.
Oct 27, 2022
0c83dcd
update mpi action.
Oct 27, 2022
28bafed
update mpi action.
Oct 27, 2022
1c1a6d6
update mpi action.
Oct 27, 2022
f092808
update mpi action.
Oct 27, 2022
aae95b8
update mpi action.
Oct 27, 2022
884c734
update mpi action.
Oct 27, 2022
e3ac995
Merge pull request #629 from FedML-AI/dev/v0.7.0
fedml-alex Oct 27, 2022
bcdde90
update fedml docker building files and add diagnosis cli.
Oct 31, 2022
a991e13
update diagnosis readme.
Oct 31, 2022
0e0de3c
update version to 0.7.340.
Oct 31, 2022
f8bd2ba
Merge pull request #631 from FedML-AI/dev/v0.7.0
fedml-alex Oct 31, 2022
0251d03
display model url and update version to 0.7.341.
Oct 31, 2022
e3cbf69
Merge pull request #632 from FedML-AI/dev/v0.7.0
fedml-alex Oct 31, 2022
3553938
Update: new functionality with FHE. Phase 1 where all encrypted opera…
wzjin2017 Nov 9, 2022
61f5c9a
Update: encrypted model communication between server and clients
wzjin2017 Nov 15, 2022
634ce5c
Update env installation instructions
wzjin2017 Dec 8, 2022
f36dcef
Update env installation instructions:v2
wzjin2017 Dec 8, 2022
01d9231
Update: add key authority server and some cleanup about generated tes…
wzjin2017 Dec 21, 2022
a2c031c
Fix: fix the bug in on_before_local_training() in client_trainer. Bug…
wzjin2017 Jan 4, 2023
ed627f7
Update: TenSeal Version
wzjin2017 Mar 22, 2023
5720a87
Fix: tenseal context file cannot be read in
wzjin2017 Apr 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Empty file modified .github/FUNDING.yml
100644 → 100755
Empty file.
190 changes: 190 additions & 0 deletions .github/workflows/build_wheels_and_releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
name: Build-Wheels-PyPi
# https://github.com/pypa/cibuildwheel
# Controls when the workflow will run
on:
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
# Build the wheels for Linux, Windows and macOS for Python 3.8 and newer
build_wheels:
name: Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: python

strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
include:
# Window 64 bit
- os: windows-2019
python: 38
bitness: 64
platform_id: win_amd64
- os: windows-latest
python: 39
bitness: 64
platform_id: win_amd64
- os: windows-latest
python: 310
bitness: 64
platform_id: win_amd64

# Window 32 bit
- os: windows-latest
python: 38
bitness: 32
platform_id: win32
- os: windows-latest
python: 39
bitness: 32
platform_id: win32

# Linux 64 bit manylinux2014
- os: ubuntu-latest
python: 38
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: ubuntu-latest
python: 39
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2014

# NumPy on Python 3.10 only supports 64bit and is only available with manylinux2014
- os: ubuntu-latest
python: 310
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2014

# MacOS x86_64
- os: macos-latest
bitness: 64
python: 38
platform_id: macosx_x86_64
- os: macos-latest
bitness: 64
python: 39
platform_id: macosx_x86_64
- os: macos-latest
bitness: 64
python: 310
platform_id: macosx_x86_64

# MacOS arm64
- os: macos-latest
bitness: 64
python: 38
platform_id: macosx_arm64
- os: macos-latest
bitness: 64
python: 39
platform_id: macosx_arm64
- os: macos-latest
bitness: 64
python: 310
platform_id: macosx_arm64

steps:
- name: Checkout fedml
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
#with:
# python-version: '3.9'

- name: Build and test wheels
env:
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_ARCHS: all
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }}
CIBW_TEST_SKIP: "*-macosx_arm64"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir} ${{ matrix.bitness }}
CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }} ${{ matrix.bitness }}
CIBW_TEST_COMMAND: bash {project}/build_tools/github/test_wheels.sh
CIBW_TEST_COMMAND_WINDOWS: bash {project}/build_tools/github/test_windows_wheels.sh ${{ matrix.python }} ${{ matrix.bitness }}
CIBW_BUILD_VERBOSITY: 1

#run: bash build_tools/github/build_wheels.sh
run: |
python -m pip install -U wheel setuptools
python setup.py sdist bdist_wheel
pwd
ls dist/*.whl
ls dist/*.tar.gz

- name: Upload source zip file
uses: actions/upload-artifact@v3
with:
path: python/dist/*.tar.gz

- name: Upload Wheels
uses: actions/upload-artifact@v3
with:
path: python/dist/*.whl

# Build the source distribution under Linux
# build_sdist:
# name: Source distribution
# needs: [ build_wheels ]
# runs-on: ubuntu-latest
# defaults:
# run:
# shell: bash
# working-directory: python
#
# steps:
# - name: Checkout fedml
# uses: actions/checkout@v3
#
# - name: Setup Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.9' # update once build dependencies are available
#
# - name: Build source distribution
# run: bash build_tools/github/build_source.sh
#
# - name: Test source distribution
# run: bash build_tools/github/test_source.sh
# env:
# OMP_NUM_THREADS: 2
# OPENBLAS_NUM_THREADS: 2
#
# - name: Store artifacts
# uses: actions/upload-artifact@v3
# with:
# path: python/dist/*.tar.gz

upload_pypi:
name: Upload pypi
needs: [ build_wheels ]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
# if: github.event_name == 'push' && contains(github.event.comment, 'release v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: python/dist

- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
skip_existing: true
packages_dir: python/dist
user: ${{ secrets.PYPI_USER_NAME }}
password: ${{ secrets.PYPI_PASSWORD }}
# To test: repository_url: https://test.pypi.org/legacy/
Loading