1515 branches :
1616 - main
1717 paths :
18- - ' libcxx/utils/ci/**'
18+ - ' libcxx/utils/ci/docker/ **'
1919 - ' .github/workflows/libcxx-build-containers.yml'
2020 pull_request :
2121 paths :
22- - ' libcxx/utils/ci/**'
22+ - ' libcxx/utils/ci/docker/ **'
2323 - ' .github/workflows/libcxx-build-containers.yml'
2424
2525jobs :
@@ -40,17 +40,18 @@ jobs:
4040 echo '{ "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json
4141 sudo systemctl restart docker
4242
43- - name : Build the Linux builder image
44- working-directory : libcxx/utils/ci
45- run : |
46- docker compose build builder-base
47- docker compose build actions-builder
43+ - name : Build the base image
44+ run : docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-linux-builder-base
45+ env :
46+ TAG : ${{ github.sha }}
47+
48+ - name : Build the Linux Github Actions image
49+ run : docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-linux-builder
4850 env :
4951 TAG : ${{ github.sha }}
5052
5153 - name : Build the Android builder image
52- working-directory : libcxx/utils/ci
53- run : docker compose build android-buildkite-builder
54+ run : docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-android-builder
5455 env :
5556 TAG : ${{ github.sha }}
5657
@@ -61,19 +62,21 @@ jobs:
6162 username : ${{ github.actor }}
6263 password : ${{ secrets.GITHUB_TOKEN }}
6364
64- - name : Push the Linux builder image
65+ - name : Push the images
6566 if : github.event_name == 'push'
66- working-directory : libcxx/utils/ci
67- run : |
68- docker compose push builder-base
69- docker compose push actions-builder
70- env :
71- TAG : ${{ github.sha }}
67+ run : docker compose push libcxx-linux-builder-base libcxx-linux-builder libcxx-android-builder
7268
73- - name : Push the Android builder image
74- if : github.event_name == 'push'
75- working-directory : libcxx/utils/ci
69+ # We create tarballs with the images and upload them as artifacts, since that's useful for testing
70+ # the images when making changes.
71+ - name : Create image tarballs
7672 run : |
77- docker compose push android-buildkite-builder
78- env :
79- TAG : ${{ github.sha }}
73+ docker image save ghcr.io/llvm/libcxx-linux-builder-base:${{ github.sha }} | gzip > libcxx-linux-builder-base.tar.gz
74+ docker image save ghcr.io/llvm/libcxx-linux-builder:${{ github.sha }} | gzip > libcxx-linux-builder.tar.gz
75+ docker image save ghcr.io/llvm/libcxx-android-builder:${{ github.sha }} | gzip > libcxx-android-builder.tar.gz
76+ - uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
77+ with :
78+ name : libcxx-docker-images
79+ path : |
80+ libcxx-linux-builder-base.tar.gz
81+ libcxx-linux-builder.tar.gz
82+ libcxx-android-builder.tar.gz
0 commit comments