-
Notifications
You must be signed in to change notification settings - Fork 68
87 lines (68 loc) Β· 2.19 KB
/
build.yaml
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
name: Workflow
on:
pull_request:
branches: ["*"]
jobs:
build:
name: Build and run all tests and checks
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Python tests and build
uses: ./.github/actions/python-build
with:
python_version: ${{ matrix.python_version }}
enforce_cache_constraint:
name: Make sure the cache constraint logic works
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Maximize build space for large container build
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 8000
swap-size-mb: 2048
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
- uses: actions/checkout@v3
- name: Setup /var/lib/docker
env:
MOUNT_PATH: ./docker-mount
shell: bash
run: |
# Starting state of docker dir
echo "Content of /var/lib/docker/"
sudo ls -lh /var/lib/docker/
# Stop docker first
sudo systemctl stop docker
sudo systemctl stop docker.socket
sudo systemctl stop containerd
mkdir -p $MOUNT_PATH/
touch $MOUNT_PATH/file # test to make sure its working. Should see this in /var/lib/docker now
sudo mount --bind ./docker-mount /var/lib/docker
sudo systemctl start docker
echo "Content of $MOUNT_PATH"
sudo ls -lh $MOUNT_PATH
echo "Content of /var/lib/docker/"
sudo ls -lh /var/lib/docker/
echo ""
findmnt
# Unclear what causes the permissions issue. Probably one of the disk space saving hacks.
- name: Fix permissions
run: |
ls -al .
sudo chown -R $USER:$USER .
sudo chmod -R a+r .
ls -al .
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run test
run: make test-cache-constraint