Skip to content

Add support for submitting a prebuilt image #51

Add support for submitting a prebuilt image

Add support for submitting a prebuilt image #51

name: PR Tests - Stack - Arm64
on:
workflow_call:
workflow_dispatch:
inputs:
none:
description: "Run Version Tests Manually"
required: false
concurrency:
group: stackarm64-${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.event.pull_request.number) || github.workflow_ref }}
cancel-in-progress: true
jobs:
pr-tests-stack-arm64:
strategy:
max-parallel: 3
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
runs-on: ${{matrix.os}}
steps:
# - name: set permissions on work folder for self-runners
# run: |
# sudo chown -R $USER:$USER ~/actions-runner/_work/
- uses: actions/checkout@v4
# free 10GB of space
- name: Remove unnecessary files
if: matrix.os == 'ubuntu-latest'
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
docker image prune --all --force
docker builder prune --all --force
docker system prune --all --force
- name: Check for file changes
uses: dorny/paths-filter@v3
id: changes
with:
base: ${{ github.ref }}
token: ${{ github.token }}
filters: .github/file-filters.yml
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
pip install --upgrade pip uv==0.1.35
uv --version
# - name: Get pip cache dir
# id: pip-cache
# shell: bash
# run: |
# echo "dir=$(uv cache dir)" >> $GITHUB_OUTPUT
# - name: pip cache
# uses: actions/cache@v3
# with:
# path: ${{ steps.pip-cache.outputs.dir }}
# key: ${{ runner.os }}-uv-py${{ matrix.python-version }}
# restore-keys: |
# ${{ runner.os }}-uv-py${{ matrix.python-version }}
- name: Install tox
run: |
pip install --upgrade tox tox-uv==1.5.1
- name: Install Docker Compose
if: runner.os == 'Linux'
shell: bash
run: |
mkdir -p ~/.docker/cli-plugins
DOCKER_COMPOSE_VERSION=v2.21.0
curl -sSL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
- name: Setup linux/arm64 Docker
run: |
docker rm $(docker ps -aq) --force || true
docker volume prune -f || true
docker buildx create --platform linux/arm64 --name arm64builder || true
docker buildx use arm64builder || true
docker run --privileged --rm tonistiigi/binfmt --install arm64
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Run integration tests
uses: nick-fields/retry@v3
with:
timeout_seconds: 36000
max_attempts: 3
command: EMULATION="true" HAGRID_FLAGS="--tag=local --test --platform linux/arm64" tox -e stack.test.integration