From 6e6b2a25ffdedfe46a5a8c0bde9204e4cd90dba6 Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Mon, 17 Jun 2024 15:28:47 +0800 Subject: [PATCH 1/8] add some file --- add_test.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 add_test.md diff --git a/add_test.md b/add_test.md new file mode 100644 index 000000000..5a29fcdad --- /dev/null +++ b/add_test.md @@ -0,0 +1 @@ +#aa From 12dae4d9d15cd026d7e17cbb49903dacec691cbc Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Mon, 17 Jun 2024 15:46:07 +0800 Subject: [PATCH 2/8] modify --- .github/workflows/CI_build.yml | 12 +++++++++--- .github/workflows/CI_federate.yml | 10 ++++++++-- .github/workflows/CI_launch.yml | 10 ++++++++-- .github/workflows/CI_serving.yml | 10 ++++++++-- .github/workflows/CI_train.yml | 10 ++++++++-- 5 files changed, 41 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index baffc0073..e9cc0dd98 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -29,8 +29,14 @@ jobs: steps: - name: Extract branch name shell: bash - run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT - id: extract_branch + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV + else + echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + fi + id: extract_branch + - id: fedml_source_code_home name: cd to master or dev branch and git pull shell: bash @@ -51,7 +57,7 @@ jobs: git checkout ${{ steps.extract_branch.outputs.branch }} echo "dir=$path" >> $GITHUB_OUTPUT fi - - name: install_test + - name: pip_install working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | homepath=${{ format('{0}', steps.fedml_source_code_home.outputs.dir) }} diff --git a/.github/workflows/CI_federate.yml b/.github/workflows/CI_federate.yml index edda3f00f..5da7e2fbb 100644 --- a/.github/workflows/CI_federate.yml +++ b/.github/workflows/CI_federate.yml @@ -33,7 +33,13 @@ jobs: steps: - name: Extract branch name shell: bash - run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV + else + echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + fi + id: extract_branch id: extract_branch - id: fedml_source_code_home name: cd to master or dev branch and git pull @@ -55,7 +61,7 @@ jobs: git checkout ${{ steps.extract_branch.outputs.branch }} echo "dir=$path" >> $GITHUB_OUTPUT fi - - name: sync git repo to local pip + - name: pip_install working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | homepath=${{ format('{0}', steps.fedml_source_code_home.outputs.dir) }} diff --git a/.github/workflows/CI_launch.yml b/.github/workflows/CI_launch.yml index 10683e948..287f18ab7 100644 --- a/.github/workflows/CI_launch.yml +++ b/.github/workflows/CI_launch.yml @@ -30,7 +30,13 @@ jobs: steps: - name: Extract branch name shell: bash - run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV + else + echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + fi + id: extract_branch id: extract_branch - id: fedml_source_code_home name: cd to master or dev branch and git pull @@ -52,7 +58,7 @@ jobs: git checkout ${{ steps.extract_branch.outputs.branch }} echo "dir=$path" >> $GITHUB_OUTPUT fi - - name: install + - name: pip_install working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | homepath=${{ format('{0}', steps.fedml_source_code_home.outputs.dir) }} diff --git a/.github/workflows/CI_serving.yml b/.github/workflows/CI_serving.yml index 367249873..866d50339 100644 --- a/.github/workflows/CI_serving.yml +++ b/.github/workflows/CI_serving.yml @@ -28,7 +28,13 @@ jobs: steps: - name: Extract branch name shell: bash - run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV + else + echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + fi + id: extract_branch id: extract_branch - id: fedml_source_code_home name: cd to master or dev branch and git pull @@ -50,7 +56,7 @@ jobs: git checkout ${{ steps.extract_branch.outputs.branch }} echo "dir=$path" >> $GITHUB_OUTPUT fi - - name: sync git repo to local pip + - name: pip_install working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | homepath=${{ format('{0}', steps.fedml_source_code_home.outputs.dir) }} diff --git a/.github/workflows/CI_train.yml b/.github/workflows/CI_train.yml index ddd0797b2..c3c0ef048 100644 --- a/.github/workflows/CI_train.yml +++ b/.github/workflows/CI_train.yml @@ -28,7 +28,13 @@ jobs: steps: - name: Extract branch name shell: bash - run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV + else + echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + fi + id: extract_branch id: extract_branch - id: fedml_source_code_home name: cd to master or dev branch and git pull @@ -50,7 +56,7 @@ jobs: git checkout ${{ steps.extract_branch.outputs.branch }} echo "dir=$path" >> $GITHUB_OUTPUT fi - - name: sync git repo to local pip + - name: pip_install working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | homepath=${{ format('{0}', steps.fedml_source_code_home.outputs.dir) }} From b3fc51ecd8bbde1f9f42431080642d47a12b787c Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Mon, 17 Jun 2024 15:51:21 +0800 Subject: [PATCH 3/8] modify bug --- .github/workflows/CI_build.yml | 2 +- .github/workflows/CI_federate.yml | 1 - .github/workflows/CI_launch.yml | 1 - .github/workflows/CI_serving.yml | 1 - .github/workflows/CI_train.yml | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index e9cc0dd98..461ae7220 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -35,7 +35,7 @@ jobs: else echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV fi - id: extract_branch + id: extract_branch - id: fedml_source_code_home name: cd to master or dev branch and git pull diff --git a/.github/workflows/CI_federate.yml b/.github/workflows/CI_federate.yml index 5da7e2fbb..6cfe1d95b 100644 --- a/.github/workflows/CI_federate.yml +++ b/.github/workflows/CI_federate.yml @@ -39,7 +39,6 @@ jobs: else echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV fi - id: extract_branch id: extract_branch - id: fedml_source_code_home name: cd to master or dev branch and git pull diff --git a/.github/workflows/CI_launch.yml b/.github/workflows/CI_launch.yml index 287f18ab7..f1e7c3d9f 100644 --- a/.github/workflows/CI_launch.yml +++ b/.github/workflows/CI_launch.yml @@ -36,7 +36,6 @@ jobs: else echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV fi - id: extract_branch id: extract_branch - id: fedml_source_code_home name: cd to master or dev branch and git pull diff --git a/.github/workflows/CI_serving.yml b/.github/workflows/CI_serving.yml index 866d50339..93b74e3c5 100644 --- a/.github/workflows/CI_serving.yml +++ b/.github/workflows/CI_serving.yml @@ -34,7 +34,6 @@ jobs: else echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV fi - id: extract_branch id: extract_branch - id: fedml_source_code_home name: cd to master or dev branch and git pull diff --git a/.github/workflows/CI_train.yml b/.github/workflows/CI_train.yml index c3c0ef048..aee3e6a9b 100644 --- a/.github/workflows/CI_train.yml +++ b/.github/workflows/CI_train.yml @@ -34,7 +34,6 @@ jobs: else echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV fi - id: extract_branch id: extract_branch - id: fedml_source_code_home name: cd to master or dev branch and git pull From 96b6dbfcef7562ec6bda976f23fd376c52fbcb1b Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Mon, 17 Jun 2024 16:23:40 +0800 Subject: [PATCH 4/8] test --- .github/workflows/CI_build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 461ae7220..b67528c33 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -27,6 +27,9 @@ jobs: timeout-minutes: 5 steps: + - name: Checkout fedml + uses: actions/checkout@v3 + - name: Extract branch name shell: bash run: | From 846a6c9025bab5ff6bb0c9b149ec57cfe5028aea Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Mon, 17 Jun 2024 16:26:51 +0800 Subject: [PATCH 5/8] ttt --- .github/workflows/CI_build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index b67528c33..3688dfe88 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -30,6 +30,10 @@ jobs: - name: Checkout fedml uses: actions/checkout@v3 + - name: test + shell: bash + run: pwd + - name: Extract branch name shell: bash run: | From 6d33c2fcdd093e8e15f6d129ef0916e7579dfa58 Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Mon, 17 Jun 2024 16:29:03 +0800 Subject: [PATCH 6/8] modify --- .github/workflows/CI_build.yml | 41 +--------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 3688dfe88..914a48c7e 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -29,54 +29,15 @@ jobs: steps: - name: Checkout fedml uses: actions/checkout@v3 - - - name: test - shell: bash - run: pwd - - name: Extract branch name - shell: bash - run: | - if [ "${{ github.event_name }}" == "pull_request" ]; then - echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV - else - echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - fi - id: extract_branch - - - id: fedml_source_code_home - name: cd to master or dev branch and git pull - shell: bash - run: | - ls - echo ${{ steps.extract_branch.outputs.branch }} - if [[ ${{ steps.extract_branch.outputs.branch }} == "master" ]]; then - echo "running on master" - path=/home/fedml/FedML - cd $path - git pull - echo "dir=$path" >> $GITHUB_OUTPUT - else - echo "running on dev" - path=/home/fedml/FedML - cd $path - git pull - git checkout ${{ steps.extract_branch.outputs.branch }} - echo "dir=$path" >> $GITHUB_OUTPUT - fi - name: pip_install - working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | - homepath=${{ format('{0}', steps.fedml_source_code_home.outputs.dir) }} - echo $Homepath - cd $homepath cd python pip install -e ./ - name: pylint - working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | cd python - echo "Pylint has been run successfully! + echo "Pylint has been run successfully!" # pip install mnn==1.1.6 From 95a9844cafa3a6ba217fc6873e2ab6d7e2fdf6f4 Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Mon, 17 Jun 2024 16:34:40 +0800 Subject: [PATCH 7/8] modify --- .github/workflows/CI_federate.yml | 41 +++---------------------------- .github/workflows/CI_launch.yml | 39 +++-------------------------- .github/workflows/CI_serving.yml | 37 +++------------------------- .github/workflows/CI_train.yml | 37 +++------------------------- 4 files changed, 13 insertions(+), 141 deletions(-) diff --git a/.github/workflows/CI_federate.yml b/.github/workflows/CI_federate.yml index 6cfe1d95b..bec790af6 100644 --- a/.github/workflows/CI_federate.yml +++ b/.github/workflows/CI_federate.yml @@ -17,10 +17,6 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: federate: - # defaults: - # run: - # shell: bash - # working-directory: python strategy: fail-fast: false matrix: @@ -31,46 +27,15 @@ jobs: runs-on: ${{ matrix.python-version }} timeout-minutes: 5 steps: - - name: Extract branch name - shell: bash - run: | - if [ "${{ github.event_name }}" == "pull_request" ]; then - echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV - else - echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - fi - id: extract_branch - - id: fedml_source_code_home - name: cd to master or dev branch and git pull - shell: bash - run: | - ls - echo ${{ steps.extract_branch.outputs.branch }} - if [[ ${{ steps.extract_branch.outputs.branch }} == "master" ]]; then - echo "running on master" - path=/home/fedml/FedML - cd $path - git pull - echo "dir=$path" >> $GITHUB_OUTPUT - else - echo "running on dev" - path=/home/fedml/FedML - cd $path - git pull - git checkout ${{ steps.extract_branch.outputs.branch }} - echo "dir=$path" >> $GITHUB_OUTPUT - fi + - name: Checkout fedml + uses: actions/checkout@v3 + - name: pip_install - working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | - homepath=${{ format('{0}', steps.fedml_source_code_home.outputs.dir) }} - echo $Homepath - cd $homepath cd python pip install -e ./ - name: federate_job_in_test_env - working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | cd python echo "Federate example has been tested successfully!" diff --git a/.github/workflows/CI_launch.yml b/.github/workflows/CI_launch.yml index f1e7c3d9f..3d0381a74 100644 --- a/.github/workflows/CI_launch.yml +++ b/.github/workflows/CI_launch.yml @@ -25,49 +25,18 @@ jobs: arch: [X64] python-version: ['3.8','3.9','3.10','3.11'] - runs-on: [ self-hosted, Linux ] + runs-on: ${{ matrix.python-version }} timeout-minutes: 5 steps: - - name: Extract branch name - shell: bash - run: | - if [ "${{ github.event_name }}" == "pull_request" ]; then - echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV - else - echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - fi - id: extract_branch - - id: fedml_source_code_home - name: cd to master or dev branch and git pull - shell: bash - run: | - ls - echo ${{ steps.extract_branch.outputs.branch }} - if [[ ${{ steps.extract_branch.outputs.branch }} == "master" ]]; then - echo "running on master" - path=/home/fedml/FedML - cd $path - git pull - echo "dir=$path" >> $GITHUB_OUTPUT - else - echo "running on dev" - path=/home/fedml/FedML - cd $path - git pull - git checkout ${{ steps.extract_branch.outputs.branch }} - echo "dir=$path" >> $GITHUB_OUTPUT - fi + - name: Checkout fedml + uses: actions/checkout@v3 + - name: pip_install - working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | - homepath=${{ format('{0}', steps.fedml_source_code_home.outputs.dir) }} - echo $Homepath - cd $homepath cd python pip install -e ./ - name: launch_job_in_test_env - working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | cd python echo "Launch example has been tested successfully!" diff --git a/.github/workflows/CI_serving.yml b/.github/workflows/CI_serving.yml index 93b74e3c5..95423baa7 100644 --- a/.github/workflows/CI_serving.yml +++ b/.github/workflows/CI_serving.yml @@ -26,46 +26,15 @@ jobs: python-version: ['python3.8', 'python3.9', 'python3.10', 'python3.11'] steps: - - name: Extract branch name - shell: bash - run: | - if [ "${{ github.event_name }}" == "pull_request" ]; then - echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV - else - echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - fi - id: extract_branch - - id: fedml_source_code_home - name: cd to master or dev branch and git pull - shell: bash - run: | - ls - echo ${{ steps.extract_branch.outputs.branch }} - if [[ ${{ steps.extract_branch.outputs.branch }} == "master" ]]; then - echo "running on master" - path=/home/fedml/FedML - cd $path - git pull - echo "dir=$path" >> $GITHUB_OUTPUT - else - echo "running on dev" - path=/home/fedml/FedML - cd $path - git pull - git checkout ${{ steps.extract_branch.outputs.branch }} - echo "dir=$path" >> $GITHUB_OUTPUT - fi + - name: Checkout fedml + uses: actions/checkout@v3 + - name: pip_install - working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | - homepath=${{ format('{0}', steps.fedml_source_code_home.outputs.dir) }} - echo $Homepath - cd $homepath cd python pip install -e ./ - name: serving_job_in_test_env - working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | cd python echo "Serving example has been tested successfully!" diff --git a/.github/workflows/CI_train.yml b/.github/workflows/CI_train.yml index aee3e6a9b..bae3ee9c9 100644 --- a/.github/workflows/CI_train.yml +++ b/.github/workflows/CI_train.yml @@ -26,46 +26,15 @@ jobs: python-version: ['python3.8', 'python3.9', 'python3.10', 'python3.11'] steps: - - name: Extract branch name - shell: bash - run: | - if [ "${{ github.event_name }}" == "pull_request" ]; then - echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV - else - echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - fi - id: extract_branch - - id: fedml_source_code_home - name: cd to master or dev branch and git pull - shell: bash - run: | - ls - echo ${{ steps.extract_branch.outputs.branch }} - if [[ ${{ steps.extract_branch.outputs.branch }} == "master" ]]; then - echo "running on master" - path=/home/fedml/FedML - cd $path - git pull - echo "dir=$path" >> $GITHUB_OUTPUT - else - echo "running on dev" - path=/home/fedml/FedML - cd $path - git pull - git checkout ${{ steps.extract_branch.outputs.branch }} - echo "dir=$path" >> $GITHUB_OUTPUT - fi + - name: Checkout fedml + uses: actions/checkout@v3 + - name: pip_install - working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | - homepath=${{ format('{0}', steps.fedml_source_code_home.outputs.dir) }} - echo $Homepath - cd $homepath cd python pip install -e ./ - name: training_job_in_test_env - working-directory: ${{ steps.fedml_source_code_home.outputs.dir }} run: | cd python echo "Train example has been tested successfully!" From 07f66166ea3ae463555d40f3a6fe79810265277e Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Mon, 17 Jun 2024 16:42:44 +0800 Subject: [PATCH 8/8] modify --- .github/workflows/CI_launch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_launch.yml b/.github/workflows/CI_launch.yml index 3d0381a74..1db60c412 100644 --- a/.github/workflows/CI_launch.yml +++ b/.github/workflows/CI_launch.yml @@ -23,7 +23,7 @@ jobs: matrix: os: [ ubuntu-latest ] arch: [X64] - python-version: ['3.8','3.9','3.10','3.11'] + python-version: ['python3.8','python3.9','python3.10','python3.11'] runs-on: ${{ matrix.python-version }} timeout-minutes: 5