Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 27 additions & 58 deletions .github/workflows/agw-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,10 @@ jobs:
SLACK_COLOR: "#FF0000"
SLACK_FOOTER: ' '

mme-clang-tidy:
mme-clang-tidy-and-warning-and-cpp-cov:
needs: path_filter
if: ${{ needs.path_filter.outputs.should_not_skip == 'true' }}
name: mme clang tidy job
name: mme clang tidy/warning and cpp cov
runs-on: ubuntu-latest
env:
MAGMA_ROOT: "${{ github.workspace }}"
Expand All @@ -348,10 +348,30 @@ jobs:
- uses: satackey/[email protected]
continue-on-error: true
- name: Run mme-clang-tidy
continue-on-error: true
if: always()
id: mme-clang-tidy
# yamllint disable rule:line-length
run: |
docker build --tag magma-mme-build --file ${{ env.MAGMA_ROOT }}/lte/gateway/docker/mme/Dockerfile.ubuntu20.04 .
docker run --env BRANCH=${{ env.BRANCH}} --env REVISION=${{ env.REVISION }} --volume ${{ env.MAGMA_ROOT }}:/magma --interactive magma-mme-build:latest /bin/bash -c 'cd /magma/lte/gateway;make clang_tidy_oai_upload'
- name: Run mme-clang-warnings
continue-on-error: true
if: always()
id: mme-clang-warning
# yamllint disable rule:line-length
run: |
docker build --tag magma-mme-build --file ${{ env.MAGMA_ROOT }}/lte/gateway/docker/mme/Dockerfile.ubuntu20.04 .
docker run --env BRANCH=${{ env.BRANCH }} --env REVISION=${{ env.REVISION }} --volume ${{ env.MAGMA_ROOT }}:/magma --volume ${{ env.MAGMA_ROOT }}/lte/gateway/configs:/etc/magma --interactive magma-mme-build:latest /bin/bash -c "cd /magma/lte/gateway;make clang_warning_oai_upload"
- name: Run codecov
continue-on-error: true
if: always()
id: c-cpp-codecov
# yamllint disable rule:line-length
run: |
docker build --tag magma/c_cpp_build --file ${{ env.MAGMA_ROOT }}/lte/gateway/docker/mme/Dockerfile.ubuntu20.04 .
ci_env=$(bash <(curl -s https://codecov.io/env))
docker run $ci_env --env CI=true --volume ${{ env.MAGMA_ROOT }}:/magma --volume ${{ env.MAGMA_ROOT }}/lte/gateway/configs:/etc/magma --interactive magma/c_cpp_build:latest /bin/bash -c "cd /magma/lte/gateway;make coverage;ls -al /tmp/;bash <(curl -s https://codecov.io/bash) -f /build/c/coverage.info -F c_cpp"
- name: Extract commit title
# yamllint enable
if: failure() && github.event_name == 'push'
Expand All @@ -360,44 +380,18 @@ jobs:
str="$(jq '.head_commit.message' $GITHUB_EVENT_PATH)" # get the head_commit message
echo ::set-output name=title::${str%%\\n*} | tr -d '"'
- name: Notify failure to slack
if: failure() && github.event_name == 'push'
if: steps.c-cpp-codecov.outcome=='failure' && github.event_name == 'push'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_CI }}
SLACK_TITLE: "Github action mme-clang-tidy failed"
SLACK_TITLE: "Github action c-cpp-codecov failed"
SLACK_USERNAME: "AGW workflow"
SLACK_MESSAGE: "${{ steps.commit.outputs.title}}"
SLACK_ICON_EMOJI: ":boom:"
SLACK_COLOR: "#FF0000"
SLACK_FOOTER: ' '

mme-clang-warnings:
needs: path_filter
if: ${{ needs.path_filter.outputs.should_not_skip == 'true' }}
name: mme clang warnings job
runs-on: ubuntu-latest
env:
MAGMA_ROOT: "${{ github.workspace }}"
BRANCH: "${{ github.base_ref }}"
REVISION: "${{ github.sha }}"
steps:
- uses: actions/checkout@v2
- uses: satackey/[email protected]
continue-on-error: true
- name: Run mme-clang-warnings
# yamllint disable rule:line-length
run: |
docker build --tag magma-mme-build --file ${{ env.MAGMA_ROOT }}/lte/gateway/docker/mme/Dockerfile.ubuntu20.04 .
docker run --env BRANCH=${{ env.BRANCH }} --env REVISION=${{ env.REVISION }} --volume ${{ env.MAGMA_ROOT }}:/magma --volume ${{ env.MAGMA_ROOT }}/lte/gateway/configs:/etc/magma --interactive magma-mme-build:latest /bin/bash -c "cd /magma/lte/gateway;make clang_warning_oai_upload"
- name: Extract commit title
# yamllint enable
if: failure() && github.event_name == 'push'
id: commit
run: |
str="$(jq '.head_commit.message' $GITHUB_EVENT_PATH)" # get the head_commit message
echo ::set-output name=title::${str%%\\n*} | tr -d '"'
- name: Notify failure to slack
if: failure() && github.event_name == 'push'
if: steps.mme-clang-warning.outcome=='failure' && github.event_name == 'push'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_CI }}
Expand All @@ -407,37 +401,12 @@ jobs:
SLACK_ICON_EMOJI: ":boom:"
SLACK_COLOR: "#FF0000"
SLACK_FOOTER: ' '

c-cpp-codecov:
needs: path_filter
if: ${{ needs.path_filter.outputs.should_not_skip == 'true' }}
name: c-cpp code coverage job
runs-on: ubuntu-latest
env:
MAGMA_ROOT: "${{ github.workspace }}"
steps:
- uses: actions/checkout@v2
- uses: satackey/[email protected]
continue-on-error: true
- name: Run codecov
# yamllint disable rule:line-length
run: |
docker build --tag magma/c_cpp_build --file ${{ env.MAGMA_ROOT }}/lte/gateway/docker/mme/Dockerfile.ubuntu20.04 .
ci_env=$(bash <(curl -s https://codecov.io/env))
docker run $ci_env --env CI=true --volume ${{ env.MAGMA_ROOT }}:/magma --volume ${{ env.MAGMA_ROOT }}/lte/gateway/configs:/etc/magma --interactive magma/c_cpp_build:latest /bin/bash -c "cd /magma/lte/gateway;make coverage;ls -al /tmp/;bash <(curl -s https://codecov.io/bash) -f /build/c/coverage.info -F c_cpp"
- name: Extract commit title
# yamllint enable
if: failure() && github.event_name == 'push'
id: commit
run: |
str="$(jq '.head_commit.message' $GITHUB_EVENT_PATH)" # get the head_commit message
echo ::set-output name=title::${str%%\\n*} | tr -d '"'
- name: Notify failure to slack
if: failure() && github.event_name == 'push'
if: steps.mme-clang-tidy.outcome=='failure' && github.event_name == 'push'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_CI }}
SLACK_TITLE: "Github action c-cpp-codecov failed"
SLACK_TITLE: "Github action mme-clang-tidy failed"
SLACK_USERNAME: "AGW workflow"
SLACK_MESSAGE: "${{ steps.commit.outputs.title}}"
SLACK_ICON_EMOJI: ":boom:"
Expand Down
159 changes: 59 additions & 100 deletions .github/workflows/cloud-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
- [".github/workflows/cloud-workflow.yml", "wifi/cloud/**", "lte/proto/**", "cwf/cloud/**", "fbinternal/cloud/**", "feg/cloud/**", "lte/cloud/**", "orc8r/cloud/**", "orc8r/lib/**"]
# Fail if checked-in generated code doesn't match output from
# generation command.
insync-checkin:
cloud-tests:
needs: path_filter
if: ${{ needs.path_filter.outputs.should_not_skip == 'true' }}
name: insync checkin job
name: cloud-tests
runs-on: ubuntu-latest
env:
MAGMA_ROOT: "${{ github.workspace }}"
Expand All @@ -45,7 +45,10 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Run build.py
- name: insync-checkin
if: always()
id: insync-checkin
continue-on-error: true
run: |
cd ${MAGMA_ROOT}/orc8r/cloud/docker
python3 build.py --generate
Expand All @@ -54,14 +57,55 @@ jobs:
echo GIT_STATUS=$(git status) >> $GITHUB_ENV
git status
git diff-index --quiet HEAD
- name: deploy-sync-checkin
if: always()
id: deploy-sync-checkin
continue-on-error: true
run: |
cd ${MAGMA_ROOT}/orc8r/cloud/deploy/orc8r_deployer/docker
./run_deployer.bash --deploy-dir /tmp/deploy_dir --build --test check_all
- name: Lint cloud Go code
if: always()
continue-on-error: true
id: cloud-lint-lint
run: |
cd ${MAGMA_ROOT}/orc8r/cloud/docker
python3 build.py --lint
- name: Generate test coverage
continue-on-error: true
id: cloud-lint-cov
run: |
cd ${MAGMA_ROOT}/orc8r/cloud/docker
python3 build.py --coverage
- uses: codecov/codecov-action@v1
continue-on-error: true
id: cloud-lint-codecov
with:
files: '${{ env.MAGMA_ROOT}}/orc8r/cloud/coverage/all.gocov'
flags: cloud_lint
- name: Run tests cloud Go
continue-on-error: true
if: always()
id: cloud-test
run: |
cd ${MAGMA_ROOT}/orc8r/cloud/docker
python3 build.py --tests --up
ls ${MAGMA_ROOT}/orc8r/cloud/test-results
timeout-minutes: 15
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: Unit Test Results
path: "${{ env.MAGMA_ROOT}}/orc8r/cloud/test-results/*"
- name: Extract commit title
if: failure() && github.event_name == 'push'
id: commit
run: |
str="$(jq '.head_commit.message' $GITHUB_EVENT_PATH)" # get the head_commit message
echo ::set-output name=title::${str%%\\n*} | tr -d '"'
- name: Notify failure to Slack
if: failure() && github.event_name == 'push'
- name: Notify failure to Slack for insync-checkin
if: steps.insync-checkin.outcome=='failure' && github.event_name == 'push'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_CI }}
Expand All @@ -71,115 +115,30 @@ jobs:
SLACK_ICON_EMOJI: ":boom:"
SLACK_COLOR: "#FF0000"
SLACK_FOOTER: ' '
# Fail if terraform variables, helm charts and orcl is out of sync
# Ensure all Helm chart values are in-sync across Orc8r deployment mechanisms
deploy-sync-checkin:
needs: path_filter
if: ${{ needs.path_filter.outputs.should_not_skip == 'true' }}
name: deploy sync job
runs-on: ubuntu-latest
env:
MAGMA_ROOT: "${{ github.workspace }}"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Run build.py
run: |
cd ${MAGMA_ROOT}/orc8r/cloud/deploy/orc8r_deployer/docker
./run_deployer.bash --deploy-dir /tmp/deploy_dir --build --test check_all
- name: Extract commit title
id: commit
run: |
str="$(jq '.head_commit.message' $GITHUB_EVENT_PATH)" # get the head_commit message
echo ::set-output name=title::${str%%\\n*} | tr -d '"'
- name: Notify failure to Slack
if: failure() && github.event_name == 'push'
- name: Notify failure to Slack for deploy-sync-checkin
if: steps.deploy-sync-checkin.outcome=='failure' && github.event_name == 'push'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_CI }}
SLACK_TITLE: "Github action deploy-sync-checkin failed"
SLACK_MESSAGE: "${{ steps.commit.outputs.title}}"
SLACK_TITLE: "Github action insync-checkin failed"
SLACK_USERNAME: "Cloud workflow"
SLACK_MESSAGE: "COMMIT TITLE:\n ${{steps.commit.outputs.title}}\n\n\n GIT STATUS OUTPUT:\n ${{env.GIT_STATUS}}"
SLACK_ICON_EMOJI: ":boom:"
SLACK_COLOR: "#FF0000"
SLACK_FOOTER: ' '
# Fail if code doesn't pass formatting requirements.
# Upload test coverage statistics.
cloud-lint:
needs: path_filter
if: ${{ needs.path_filter.outputs.should_not_skip == 'true' }}
name: cloud lint job
runs-on: ubuntu-latest
env:
MAGMA_ROOT: "${{ github.workspace }}"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Lint cloud Go code
run: |
cd ${MAGMA_ROOT}/orc8r/cloud/docker
python3 build.py --lint
- name: Generate test coverage
run: |
cd ${MAGMA_ROOT}/orc8r/cloud/docker
python3 build.py --coverage
- uses: codecov/codecov-action@v1
with:
files: '${{ env.MAGMA_ROOT}}/orc8r/cloud/coverage/all.gocov'
flags: cloud_lint
- name: Extract commit title
id: commit
if: failure() && github.event_name == 'push'
run: |
str="$(jq '.head_commit.message' $GITHUB_EVENT_PATH)" # get the head_commit message
echo ::set-output name=title::${str%%\\n*} | tr -d '"'
- name: Notify failure to Slack
if: failure() && github.event_name == 'push'
- name: Notify failure to Slack for cloud-test
if: steps.cloud-test.outcome=='failure' && github.event_name == 'push'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_CI }}
SLACK_TITLE: "Github action cloud-lint failed"
SLACK_TITLE: "Github action cloud-test failed"
SLACK_MESSAGE: "${{ steps.commit.outputs.title}}"
SLACK_USERNAME: "Cloud workflow"
SLACK_ICON_EMOJI: ":boom:"
SLACK_COLOR: "#FF0000"
SLACK_FOOTER: ' '
cloud-test:
needs: path_filter
if: ${{ needs.path_filter.outputs.should_not_skip == 'true' }}
name: cloud test job
runs-on: ubuntu-latest
env:
MAGMA_ROOT: "${{ github.workspace }}"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Run tests cloud Go
run: |
cd ${MAGMA_ROOT}/orc8r/cloud/docker
python3 build.py --tests --up
ls ${MAGMA_ROOT}/orc8r/cloud/test-results
timeout-minutes: 15
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: Unit Test Results
path: "${{ env.MAGMA_ROOT}}/orc8r/cloud/test-results/*"
- name: Extract commit title
id: commit
if: failure() && github.event_name == 'push'
run: |
str="$(jq '.head_commit.message' $GITHUB_EVENT_PATH)" # get the head_commit message
echo ::set-output name=title::${str%%\\n*} | tr -d '"'
- name: Notify failure to Slack
if: failure() && github.event_name == 'push'
- name: Notify failure to Slack for cloud-lint
if: ( steps.cloud-lint.outcome=='failure' || steps.cloud-lint-codecov.outcome=='failure' || steps.cloud-lint-cov.outcome=='failure' ) && github.event_name == 'push'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_CI }}
Expand All @@ -188,4 +147,4 @@ jobs:
SLACK_USERNAME: "Cloud workflow"
SLACK_ICON_EMOJI: ":boom:"
SLACK_COLOR: "#FF0000"
SLACK_FOOTER: ' '
SLACK_FOOTER: ' '
37 changes: 0 additions & 37 deletions .github/workflows/cwag-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,40 +77,3 @@ jobs:
SLACK_ICON_EMOJI: ":boom:"
SLACK_COLOR: "#FF0000"
SLACK_FOOTER: ' '
cwag-build:
needs: path_filter
if: ${{ needs.path_filter.outputs.should_not_skip == 'true'}}
name: cwag build job
runs-on: ubuntu-latest
env:
MAGMA_ROOT: "${{ github.workspace }}"
steps:
- uses: actions/checkout@v2
- name: Run docker compose
id: cwag-build-docker-compose
continue-on-error: true
# yamllint disable rule:line-length
env:
DOCKER_REGISTRY: cwf_
run: |
cd ${MAGMA_ROOT}/cwf/gateway/docker
docker-compose build --parallel
- name: Retry docker compose on failure
id: retry-cwag-build-docker-compose
continue-on-error: true
if: steps.cwag-docker-compose.outcome=='failure'
env:
DOCKER_REGISTRY: cwf_
run: |
cd ${MAGMA_ROOT}/cwf/gateway/docker
docker-compose build --parallel
- name: Set the job status
if: always()
run: |
if ${{ steps.cwag-build-docker-compose.outcome=='success' || steps.retry-cwag-build-docker-compose.outcome=='success' }}; then
echo "Docker compose completed successfully"
else
echo "Docker compose failed"
exit 1
fi
# TODO bring up the containers and check for crashloops
Loading