forked from OpenMined/PySyft
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (81 loc) · 2.98 KB
/
pr-tests-stack-arm64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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.11"]
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@v3
# 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"
- name: Check for file changes
uses: dorny/paths-filter@v2
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@v3
with:
python-version: ${{ matrix.python-version }}
# - name: Get pip cache dir
# id: pip-cache
# shell: bash
# run: |
# echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
# - name: pip cache
# uses: actions/cache@v3
# with:
# path: ${{ steps.pip-cache.outputs.dir }}
# key: ${{ runner.os }}-pip-py${{ matrix.python-version }}
# restore-keys: |
# ${{ runner.os }}-pip-py${{ matrix.python-version }}
- name: Upgrade pip
run: |
python -m pip install --upgrade --user pip
- name: Install tox
run: |
pip install -U tox
- 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@v2
with:
timeout_seconds: 36000
max_attempts: 3
command: EMULATION="true" HAGRID_FLAGS="--tag=local --test --platform linux/arm64" tox -e stack.test.integration