Skip to content

Commit 6c15efb

Browse files
committed
[libc++] Reorganize and fix the libc++ CI dockerfiles
Instead of having one large Dockerfile building multiple images with relatively confusing inheritance, explicitly have three standalone Dockerfiles each building one image. Then, tie the three images together using the docker-compose file which explicitly versions the base image used by the Android and the Github Actions images.
1 parent a51c1f8 commit 6c15efb

File tree

7 files changed

+352
-393
lines changed

7 files changed

+352
-393
lines changed

.github/workflows/libcxx-build-containers.yml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ on:
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

2525
jobs:
@@ -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-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 android-buildkite-builder
5455
env:
5556
TAG: ${{ github.sha }}
5657

@@ -61,19 +62,6 @@ jobs:
6162
username: ${{ github.actor }}
6263
password: ${{ secrets.GITHUB_TOKEN }}
6364

64-
- name: Push the Linux builder image
65-
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 }}
72-
73-
- name: Push the Android builder image
65+
- name: Push the images
7466
if: github.event_name == 'push'
75-
working-directory: libcxx/utils/ci
76-
run: |
77-
docker compose push android-buildkite-builder
78-
env:
79-
TAG: ${{ github.sha }}
67+
run: docker compose push libcxx-builder-base libcxx-linux-builder android-buildkite-builder

libcxx/utils/ci/Dockerfile

Lines changed: 0 additions & 329 deletions
This file was deleted.

0 commit comments

Comments
 (0)