Skip to content

Commit f9be723

Browse files
authored
Rename swift-ci folder to main (swiftlang#407)
* Move the folder from master -> main * Remove .github/.DS_Store * Add support for logs in GitHub Actions * Prune after building docker images
1 parent d00efae commit f9be723

File tree

27 files changed

+15
-5
lines changed

27 files changed

+15
-5
lines changed

.github/.DS_Store

-6 KB
Binary file not shown.

.github/workflows/pull_request.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,14 @@ jobs:
1010
name: Build Docker images
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
14-
- run: env && ./ci_test.py
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
- name: Build Docker images
16+
run: ./ci_test.py
17+
- name: Archive production artifacts
18+
uses: actions/upload-artifact@v4
19+
if: always()
20+
with:
21+
name: docker-logs
22+
path: |
23+
*.log

ci_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ def main():
6969
sys.stdout.flush()
7070
log_file = dockerfile.replace(docker_dir,"").replace("/", "_")
7171
log_file = "{}.log".format(log_file)
72-
cmd = "docker build --no-cache=true --build-arg http_proxy={} --build-arg https_proxy={} {}".format(os.environ['http_proxy'], os.environ['https_proxy'], dockerfile)
72+
cmd = f"docker build --no-cache=true {dockerfile}"
7373
if "buildx" in dockerfile:
7474
# if "buildx" is part of the path, we want to use the new buildx build system and build
7575
# for both amd64 and arm64.
76-
cmd = "docker buildx create --use --driver-opt env.http_proxy={} --driver-opt env.https_proxy={}".format(os.environ['http_proxy'], os.environ['https_proxy'])
76+
cmd = "docker buildx create --use"
7777
run_command(cmd, log_file)
7878
cmd = "docker buildx inspect --bootstrap"
7979
run_command(cmd, log_file)
80-
cmd = "docker buildx build --platform linux/arm64,linux/amd64 --no-cache=true --build-arg env.http_proxy={} --build-arg env.https_proxy={} {}".format(os.environ['http_proxy'], os.environ['https_proxy'], dockerfile)
80+
cmd = f"docker buildx build --platform linux/arm64,linux/amd64 --no-cache=true {dockerfile}"
8181
status = run_command(cmd, log_file)
8282
results[dockerfile] = status
8383
if status != 0:
@@ -90,6 +90,7 @@ def main():
9090
run_command(cmd)
9191
print("[{}] - {}".format(results[dockerfile], dockerfile))
9292
sys.stdout.flush()
93+
run_command("docker image prune -f")
9394

9495
for dockerfile in dockerfiles:
9596
if results[dockerfile] == "FAILED":

0 commit comments

Comments
 (0)