3838 runs-on : ubuntu-latest
3939 strategy :
4040 fail-fast : false
41+ max-parallel : 3 # limit concurrent docker builds to reduce overlay pressure
4142 matrix :
4243 TARGET_PLATFORM :
4344 - oraclelinux,8
@@ -61,19 +62,29 @@ jobs:
6162 uses : actions/checkout@v2
6263
6364 - name : Install package dependencies
64- run : sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources
65+ run : |
66+ sudo apt-get update
67+ sudo apt-get install --no-install-recommends -y libcurl4-openssl-dev libssl-dev python3-testresources
68+ sudo apt-get clean
69+ sudo rm -rf /var/lib/apt/lists/*
70+
71+ - name : Disk usage before build
72+ run : |
73+ df -h /
74+ docker system df || true
6575
6676 - name : Install wheel for el/8
6777 if : matrix.TARGET_PLATFORM == 'centos,8'
6878 run : python -m pip install wheel
6979
7080 - name : Build image for the target platform
71- run : |
72- git checkout -- dockerfiles
73- ./update_image
7481 env :
7582 TARGET_PLATFORM : ${{ matrix.TARGET_PLATFORM }}
7683 POSTGRES_VERSION : ${{ matrix.POSTGRES_VERSION }}
84+ DOCKER_BUILDKIT : 1
85+ run : |
86+ git checkout -- dockerfiles
87+ ./update_image
7788
7889 - name : Clone tools repo for test
7990 run : git clone -b v0.8.35 --depth=1 https://github.com/citusdata/tools.git tools
@@ -92,3 +103,15 @@ jobs:
92103 env :
93104 TARGET_PLATFORM : ${{ matrix.TARGET_PLATFORM }}
94105 POSTGRES_VERSION : ${{ matrix.POSTGRES_VERSION }}
106+
107+ - name : Remove build artifacts
108+ if : always()
109+ run : |
110+ rm -rf tools packages dist build .pytest_cache || true
111+
112+ - name : Cleanup docker cache and free disk
113+ if : always()
114+ uses : ./.github/actions/cleanup-runner-disk
115+ with :
116+ aggressive : true
117+
0 commit comments