forked from magma/magma
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): Switched from macOS runners to Ubuntu runners (magma#15381)
* Changing the Macos runners to ubuntu runners Changes: 1) Changed the macos-12-large runner label to ubuntu-latest , as the linux runners are efficient at nested virtualization 2) Changed the python-version to 3.10.12 as it is available with latest ubuntu runner 3) Added steps for installing the virtualbox and vagrant 4) Added the maximize build space action to freeup the space Signed-off-by: akhilamoyila9 <[email protected]> * Added a step for ssh Signed-off-by: akhilamoyila9 <[email protected]> * fix(ci):Switched from macOS runners to Ubuntu runners 1) Keeping the proper indentation for the comments Signed-off-by: akhilamoyila9 <[email protected]> * fix(ci):Switched from macOS runners to Ubuntu runners Changes: 1) Maintaining correct spacing for comments Signed-off-by: akhilamoyila9 <[email protected]> --------- Signed-off-by: akhilamoyila9 <[email protected]>
- Loading branch information
1 parent
0b6303e
commit f7b296b
Showing
5 changed files
with
58 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,12 +64,18 @@ jobs: | |
args: 'CWF integration test: docker build step failed in run <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|${{github.run_id}}> from commit ${{ github.sha }}: ${{ github.event.head_commit.message || github.event.pull_request.title }}' | ||
cwf-integ-test: | ||
if: github.repository_owner == 'magma' || github.event_name == 'workflow_dispatch' | ||
runs-on: macos-12-large | ||
runs-on: ubuntu-latest | ||
needs: docker-build | ||
steps: | ||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # [email protected] | ||
with: | ||
ref: ${{ github.sha }} | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # [email protected] | ||
with: | ||
# this might remove tools that are actually needed, | ||
# when set to "true" but frees about 6 GB | ||
tool-cache: true | ||
- name: Cache ubuntu generic box for CWF VMs | ||
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # [email protected] | ||
with: | ||
|
@@ -91,11 +97,15 @@ jobs: | |
fi | ||
- uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # [email protected] | ||
with: | ||
python-version: '3.8.10' | ||
python-version: '3.10.12' | ||
- name: Install pre requisites | ||
run: | | ||
pip3 install --upgrade pip | ||
pip3 install ansible fabric jsonpickle requests PyYAML firebase_admin | ||
sudo apt update && sudo apt install virtualbox | ||
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | ||
sudo apt update && sudo apt install vagrant | ||
vagrant plugin install vagrant-vbguest vagrant-reload vagrant-disksize | ||
- uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # [email protected] | ||
with: | ||
|
@@ -120,6 +130,7 @@ jobs: | |
- name: Run the integ test | ||
run: | | ||
cd cwf/gateway | ||
[ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -q | ||
fab integ-test --destroy-vm --transfer-images --test-result-xml=tests.xml --rerun-fails=3 --skip-docker-load --tar-path="/tmp/cwf-images" | ||
- name: Upload test results | ||
if: always() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,20 +77,30 @@ jobs: | |
|
||
federated-integ-test: | ||
if: github.repository_owner == 'magma' || github.event_name == 'workflow_dispatch' | ||
runs-on: macos-12-large | ||
runs-on: ubuntu-latest | ||
needs: [docker-build-orc8r, docker-build-feg] | ||
env: | ||
MAGMA_ROOT: "${{ github.workspace }}" | ||
AGW_ROOT: "${{ github.workspace }}/lte/gateway" | ||
steps: | ||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # [email protected] | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # [email protected] | ||
with: | ||
# this might remove tools that are actually needed, | ||
# when set to "true" but frees about 6 GB | ||
tool-cache: true | ||
- uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # [email protected] | ||
with: | ||
python-version: '3.8.5' | ||
python-version: '3.10.12' | ||
- name: Install pre requisites | ||
run: | | ||
pip3 install --upgrade pip | ||
pip3 install ansible fabric jsonpickle requests PyYAML firebase_admin | ||
sudo apt update && sudo apt install virtualbox | ||
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | ||
sudo apt update && sudo apt install vagrant | ||
vagrant plugin install vagrant-vbguest vagrant-disksize vagrant-scp vagrant-reload | ||
- name: Vagrant Host prerequisites for federated integ test | ||
run: | | ||
|
@@ -141,6 +151,7 @@ jobs: | |
else | ||
export MAGMA_PACKAGE=magma=${{ github.event.client_payload.magma_version }} | ||
fi | ||
[ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -q | ||
fab install-agw | ||
# Download to local and delete artifacts from remote | ||
- uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,13 @@ on: | |
jobs: | ||
lte-integ-test-bazel-magma-deb: | ||
if: github.repository_owner == 'magma' || github.event_name == 'workflow_dispatch' | ||
runs-on: macos-12-large | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # [email protected] | ||
with: | ||
ref: ${{ github.event.client_payload.trigger_sha || github.sha }} | ||
|
||
- name: Maximize build space | ||
uses: ./.github/workflows/composite/maximize-build-space | ||
- name: Cache magma-deb-box | ||
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # [email protected] | ||
with: | ||
|
@@ -51,11 +52,15 @@ jobs: | |
|
||
- uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # [email protected] | ||
with: | ||
python-version: '3.8.10' | ||
python-version: '3.10.12' | ||
- name: Install pre requisites | ||
run: | | ||
pip3 install --upgrade pip | ||
pip3 install ansible fabric jsonpickle requests PyYAML firebase_admin | ||
sudo apt update && sudo apt install virtualbox | ||
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | ||
sudo apt update && sudo apt install vagrant | ||
vagrant plugin install vagrant-vbguest vagrant-disksize vagrant-reload | ||
- name: Open up network interfaces for VM | ||
run: | | ||
|
@@ -75,6 +80,7 @@ jobs: | |
export MAGMA_PACKAGE=magma=${{ github.event.client_payload.magma_version }} | ||
fi | ||
echo "Starting integration tests using magma artifact \"${MAGMA_PACKAGE}\"." | ||
[ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -q | ||
fab integ-test-deb-installation | ||
- name: Get test results | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ on: | |
|
||
jobs: | ||
lte-integ-test-containerized: | ||
runs-on: macos-12-large | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Show inputs | ||
run: | | ||
|
@@ -63,9 +63,9 @@ jobs: | |
- name: Write image tag to docker-compose.yaml | ||
working-directory: lte/gateway/docker | ||
run: | | ||
sed -i '' "s#image:.*agw_gateway_c.*#image: ${{ inputs.registry }}/${{ steps.set-registry.outputs.image_prefix }}agw_gateway_c:${{ inputs.image_tag }}#" docker-compose.yaml | ||
sed -i '' "s#image:.*agw_gateway_python.*#image: ${{ inputs.registry }}/${{ steps.set-registry.outputs.image_prefix }}agw_gateway_python:${{ inputs.image_tag }}#" docker-compose.yaml | ||
sed -i '' "s#image:.*gateway_go.*#image: ${{ inputs.registry }}/${{ steps.set-registry.outputs.image_prefix }}gateway_go:${{ inputs.image_tag }}#" docker-compose.yaml | ||
sed -i "s#image:.*agw_gateway_c.*#image: ${{ inputs.registry }}/${{ steps.set-registry.outputs.image_prefix }}agw_gateway_c:${{ inputs.image_tag }}#" docker-compose.yaml | ||
sed -i "s#image:.*agw_gateway_python.*#image: ${{ inputs.registry }}/${{ steps.set-registry.outputs.image_prefix }}agw_gateway_python:${{ inputs.image_tag }}#" docker-compose.yaml | ||
sed -i "s#image:.*gateway_go.*#image: ${{ inputs.registry }}/${{ steps.set-registry.outputs.image_prefix }}gateway_go:${{ inputs.image_tag }}#" docker-compose.yaml | ||
- name: Show docker-compose yaml to verify correct docker images hashes | ||
run: cat lte/gateway/docker/docker-compose.yaml | ||
- name: Cache magma-dev-box | ||
|
@@ -88,11 +88,15 @@ jobs: | |
cache-key-prefix: magma_test | ||
- uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # [email protected] | ||
with: | ||
python-version: '3.8.10' | ||
python-version: '3.10.12' | ||
- name: Install pre requisites | ||
run: | | ||
pip3 install --upgrade pip | ||
pip3 install ansible fabric jsonpickle PyYAML requests | ||
sudo apt update && sudo apt install virtualbox | ||
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | ||
sudo apt update && sudo apt install vagrant | ||
vagrant plugin install vagrant-vbguest vagrant-disksize vagrant-reload | ||
- name: Open up network interfaces for VM | ||
run: | | ||
|
@@ -105,11 +109,14 @@ jobs: | |
MAGMA_DEV_MEMORY_MB: 9216 | ||
working-directory: lte/gateway | ||
# the image is directly concatenated to the registry, so we need the slash as delimiter | ||
run: fab --debug integ-test-containerized --test-mode=${{ inputs.test_targets }} --docker-registry=${{ inputs.registry }}/ | ||
run: | | ||
[ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -q | ||
fab --debug integ-test-containerized --test-mode=${{ inputs.test_targets }} --docker-registry=${{ inputs.registry }}/ | ||
- name: Get test results | ||
if: always() | ||
working-directory: lte/gateway | ||
run: | | ||
[ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -q | ||
fab get-test-summaries --integration-tests | ||
- name: Publish Unit Test Results | ||
if: always() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,11 @@ on: | |
jobs: | ||
sudo-python-tests: | ||
if: github.repository_owner == 'magma' || github.event_name == 'workflow_dispatch' | ||
runs-on: macos-12-large | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # [email protected] | ||
- name: Maximize build space | ||
uses: ./.github/workflows/composite/maximize-build-space | ||
- name: Cache magma-dev-box | ||
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # [email protected] | ||
with: | ||
|
@@ -44,11 +46,15 @@ jobs: | |
fi | ||
- uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # [email protected] | ||
with: | ||
python-version: '3.8.10' | ||
python-version: '3.10.12' | ||
- name: Install pre requisites | ||
run: | | ||
pip3 install --upgrade pip | ||
pip3 install ansible fabric jsonpickle requests PyYAML firebase_admin | ||
sudo apt update && sudo apt install virtualbox | ||
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | ||
sudo apt update && sudo apt install vagrant | ||
vagrant plugin install vagrant-vbguest vagrant-disksize vagrant-reload | ||
- name: Open up network interfaces for VM | ||
run: | | ||
|
@@ -60,10 +66,12 @@ jobs: | |
cd lte/gateway | ||
export MAGMA_DEV_CPUS=3 | ||
export MAGMA_DEV_MEMORY_MB=9216 | ||
[ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -q | ||
fab provision-magma-dev-vm | ||
- name: Run the sudo python tests | ||
run: | | ||
cd lte/gateway | ||
[ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -q | ||
vagrant ssh -c 'cd ~/magma; bazel/scripts/run_sudo_tests.sh --retry-on-failure --retry-attempts 1;' magma | ||
- name: Get test results | ||
if: always() | ||
|