Skip to content

Commit

Permalink
Merge branch 'magma:master' into ci_add_federated_integ_test_multi_ue
Browse files Browse the repository at this point in the history
  • Loading branch information
orion-belt committed Aug 1, 2022
2 parents f5298b3 + 476d7b0 commit 485078f
Show file tree
Hide file tree
Showing 447 changed files with 13,734 additions and 10,954 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ build --test_env=PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin
# Use MAGMA_ROOT from the host system in tests.
# Needed by python tests (e.g. freedomfi_one_tests in enodebd)
build --test_env=MAGMA_ROOT
build --test_env=S1AP_TESTER_ROOT

# MME specific compile time defines
# Compile mme libraries with unit test flag
Expand Down
1 change: 0 additions & 1 deletion .devcontainer/bazel-base/bazelrcs/devcontainer.bazelrc

This file was deleted.

1 change: 0 additions & 1 deletion .devcontainer/bazel-base/bazelrcs/docker.bazelrc

This file was deleted.

1 change: 0 additions & 1 deletion .devcontainer/bazel-base/bazelrcs/vm.bazelrc

This file was deleted.

13 changes: 5 additions & 8 deletions .devcontainer/post-create-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ echo "alias magtivate='source /home/vscode/build/python/bin/activate'" >> ~/.bas
# Locally opened Devcontainer has access to persistent cache directory in .bazel-cache and .bazel-cache-repo.
# This is a little hacky, but GITHUB_CODESPACE_TOKEN should only be defined for the Codespace case
if [[ -z $GITHUB_CODESPACE_TOKEN ]]; then
echo "Assuming the devcontainer is opened locally, not pulling in Bazel cache..."
echo "Assuming the devcontainer is opened locally, not using Bazel remote cache..."
else
echo "Assuming the devcontainer is opened in GitHub Codespaces, pulling in Bazel cache..."
# Pull in cache to speed up Bazel build. The cache is populated by a GitHub Action job periodically (.github/workflows/bazel-cache-push.yml)
# Fetch repository cache
wget -qO- https://magma-cache.s3.amazonaws.com/bazel-cache-repo-devcontainer.tar.gz | tar xvfz -
# Fetch build cache
wget -qO- https://magma-cache.s3.amazonaws.com/bazel-cache-devcontainer.tar.gz | tar xvfz -
echo "Assuming the devcontainer is opened in GitHub Codespaces, using read-only Bazel remote cache..."
cache_key=bazel-base-image # the devcontainer is based on the bazel-base container
(cd "$1" && bazel/scripts/remote_cache_bazelrc_setup.sh $cache_key)
fi

echo "Generating compile_commands.json for C/C++ code navigation"
"$1"/dev_tools/gen_compilation_database.py
"$1"/dev_tools/gen_compilation_database.py
30 changes: 4 additions & 26 deletions .github/workflows/agw-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ jobs:
SKIP_SUDO_TESTS: 1
steps:
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
- name: setup pyenv
uses: "gabrielfalcao/pyenv-action@5327db2939908b2ef8f62d284403d678c4b611d0" # pin@v8
with:
default: 3.8.10
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a # pin@v2
with:
python-version: '3.8.10'
Expand Down Expand Up @@ -146,20 +142,11 @@ jobs:
name: C/C++ unit tests with Bazel
runs-on: ubuntu-latest
steps:
- name: Maximize build space
shell: bash
run: |
echo "Available storage before:"
df -h
echo "Removing /usr/share/dotnet, /usr/local/lib/android, /opt/ghc"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
echo "Available storage after:"
df -h
- name: Check Out Repo
# This is necessary for overlays into the Docker container below.
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
- name: Maximize build space
uses: ./.github/workflows/composite/maximize-build-space
- name: Setup Bazel Base Image
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # pin@v3
with:
Expand Down Expand Up @@ -339,20 +326,11 @@ jobs:
BRANCH: "${{ github.base_ref }}"
REVISION: "${{ github.sha }}"
steps:
- name: Maximize build space
shell: bash
run: |
echo "Available storage before:"
df -h
echo "Removing /usr/share/dotnet, /usr/local/lib/android, /opt/ghc"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
echo "Available storage after:"
df -h
- name: Check Out Repo
# This is necessary for overlays into the Docker container below.
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
- name: Maximize build space
uses: ./.github/workflows/composite/maximize-build-space
- name: Setup Devcontainer Image
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # pin@v3
with:
Expand Down
166 changes: 0 additions & 166 deletions .github/workflows/bazel-cache-push.yml

This file was deleted.

34 changes: 8 additions & 26 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,16 @@ jobs:
# Only run workflow if this is a scheduled run on master branch,
# or a pull_request that skip-duplicate-action wants to run again.
if: |
(github.event_name == `schedule` && github.ref == 'refs/heads/master')
|| ${{ needs.path_filter.outputs.files_changed == 'true' }}
(github.event_name == 'schedule' && github.ref == 'refs/heads/master') ||
needs.path_filter.outputs.files_changed == 'true'
name: Bazel Build & Test Job
runs-on: ubuntu-latest
steps:
- name: Maximize build space
shell: bash
run: |
echo "Available storage before:"
df -h
echo "Removing /usr/share/dotnet, /usr/local/lib/android, /opt/ghc"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
echo "Available storage after:"
df -h
- name: Check Out Repo
# This is necessary for overlays into the Docker container below.
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
- name: Maximize build space
uses: ./.github/workflows/composite/maximize-build-space
- name: Setup Bazel Base Image
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # pin@v3
with:
Expand Down Expand Up @@ -152,25 +143,16 @@ jobs:
# Only run workflow if this is a scheduled run on master branch,
# or a pull_request that skip-duplicate-action wants to run again.
if: |
(github.event_name == `schedule` && github.ref == 'refs/heads/master')
|| ${{ needs.path_filter.outputs.files_changed == 'true' }}
(github.event_name == 'schedule' && github.ref == 'refs/heads/master') ||
needs.path_filter.outputs.files_changed == 'true'
name: Bazel Package Job
runs-on: ubuntu-latest
steps:
- name: Maximize build space
shell: bash
run: |
echo "Available storage before:"
df -h
echo "Removing /usr/share/dotnet, /usr/local/lib/android, /opt/ghc"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
echo "Available storage after:"
df -h
- name: Check Out Repo
# This is necessary for overlays into the Docker container below.
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
- name: Maximize build space
uses: ./.github/workflows/composite/maximize-build-space
- name: Setup Bazel Base Image
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # pin@v3
with:
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: build-all

on:
workflow_dispatch: null
push:
branches:
- master
Expand Down Expand Up @@ -101,22 +102,18 @@ jobs:
python ci-scripts/helm_repo_rotation.py
agw-build:
if: github.event_name == 'push' && github.repository_owner == 'magma'
runs-on: macos-10.15
runs-on: macos-12
outputs:
artifacts: ${{ steps.publish_packages.outputs.artifacts }}
steps:
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
with:
fetch-depth: 0
- name: Cache magma-dev-box
uses: actions/cache@v3
uses: actions/cache@0865c47f36e68161719c5b124609996bb5c40129 # pin@v3
with:
path: ~/.vagrant.d/boxes/magmacore-VAGRANTSLASH-magma_dev
key: vagrant-box-magma-dev
- name: setup pyenv
uses: "gabrielfalcao/pyenv-action@5327db2939908b2ef8f62d284403d678c4b611d0" # pin@v8
with:
default: 3.8.5
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a # pin@v2
with:
python-version: '3.8.10'
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/composite/maximize-build-space/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: maximize-build-space
description: Maximize build space on Github runner
# This local action is simpler than existing external
# actions that try to clean up the Github runner.

runs:
using: composite
steps:
- name: Maximize build space
shell: bash
run: |
echo "Available storage before:"
df -h --total
echo "Removing /usr/share/dotnet, /usr/local/lib/android, /opt/ghc"
sudo rm -rf \
/usr/share/dotnet \
/usr/local/lib/android \
/opt/ghc
echo "Available storage after:"
df -h --total
4 changes: 2 additions & 2 deletions .github/workflows/cwf-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ jobs:
with:
ref: ${{ env.SHA }}
- name: Cache Vagrant Boxes
uses: actions/cache@v3
uses: actions/cache@0865c47f36e68161719c5b124609996bb5c40129 # pin@v3
with:
path: ~/.vagrant.d/boxes
key: vagrant-boxes-cwf
key: vagrant-boxes-cwf-v20220722
- name: Setup Python env
uses: "gabrielfalcao/pyenv-action@5327db2939908b2ef8f62d284403d678c4b611d0" # pin@v8
with:
Expand Down

0 comments on commit 485078f

Please sign in to comment.