From 4be84234276de96d8ff3d99870b69dff95ca9837 Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Tue, 9 Apr 2024 22:15:37 +0300 Subject: [PATCH] ARM based test environment Signed-off-by: Liora Milbaum --- .github/scripts/provision.sh | 8 +++++++- .github/workflows/testing-framework.yaml | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/scripts/provision.sh b/.github/scripts/provision.sh index 2ff1491a..4685c5ee 100755 --- a/.github/scripts/provision.sh +++ b/.github/scripts/provision.sh @@ -2,8 +2,14 @@ set -x +if [[ "$(uname -m)" == "aarch64" ]]; then + arch="arm64" +else + arch="amd64" +fi + dnf install -y podman wget \ - https://s3.us-east-2.amazonaws.com/amazon-ssm-us-east-2/latest/linux_amd64/amazon-ssm-agent.rpm + https://s3.us-east-2.amazonaws.com/amazon-ssm-us-east-2/latest/linux_${arch}/amazon-ssm-agent.rpm dnf clean all wget -P locallm/models https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_K_S.gguf diff --git a/.github/workflows/testing-framework.yaml b/.github/workflows/testing-framework.yaml index be949d8b..4be7bd84 100644 --- a/.github/workflows/testing-framework.yaml +++ b/.github/workflows/testing-framework.yaml @@ -12,7 +12,6 @@ on: env: TF_VAR_aws_region: "eu-west-2" - TF_VAR_aws_instance_type: "t3.large" TF_VAR_aws_ami_owners: '["125523088429"]' TF_VAR_aws_ami_name: '["Fedora-Cloud-Base-*"]' TF_VAR_aws_volume_size: 100 @@ -31,6 +30,16 @@ jobs: integration-tests: if: github.repository == 'containers/ai-lab-recipes' runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - arch: amd64 + aws_image_type: t3a.medium + aws_ami_architecture: x86_64 + - arch: arm64 + aws_image_type: m7g.medium + aws_ami_architecture: arm64 steps: - uses: actions/checkout@v4.1.1 with: @@ -58,6 +67,9 @@ jobs: id: up run: terraform apply -auto-approve -lock=false working-directory: terraform-test-environment-module + env: + TF_VAR_aws_instance_type: ${{ matrix.aws_image_type }} + TF_VAR_aws_ami_architecture: ${{ matrix.aws_ami_architecture }} - name: Terraform Output id: terraform-output @@ -89,6 +101,9 @@ jobs: if: always() run: terraform destroy -auto-approve -lock=false working-directory: terraform-test-environment-module + env: + TF_VAR_aws_instance_type: ${{ matrix.aws_image_type }} + TF_VAR_aws_ami_architecture: ${{ matrix.aws_ami_architecture }} - name: Publish Job Results to Slack id: slack