Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/actions/free-disk-space/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

name: 'Free Disk Space'
description: 'Free up disk space on GitHub Actions runners'
runs:
using: 'composite'
steps:
- name: Free up disk space
shell: bash
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
1 change: 1 addition & 0 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/free-disk-space
- name: Acquire credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-pr-forks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: smithy-rs
- uses: ./smithy-rs/.github/actions/free-disk-space
- name: Acquire base image
id: acquire
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: smithy-rs
- uses: ./smithy-rs/.github/actions/free-disk-space
- name: Acquire base image
id: acquire
env:
Expand Down
5 changes: 5 additions & 0 deletions tools/ci-build/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target/
*.md
.github/
design/
examples/
21 changes: 6 additions & 15 deletions tools/ci-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ RUN cargo install --locked --path tools/ci-build/changelogger && \
cargo install --locked --path tools/ci-build/sdk-versioner && \
chmod g+rw -R /opt/cargo/registry && \
rm -rf /opt/cargo/registry/src && \
rm -rf /opt/cargo/git/db
rm -rf /opt/cargo/git/db && \
rm -rf /root/.cargo/registry/cache

FROM install_rust AS cargo_tools
ARG cargo_deny_version=0.16.4
Expand Down Expand Up @@ -149,7 +150,8 @@ RUN cargo install cargo-deny --locked --version ${cargo_deny_version} && \
cargo install mdbook --locked --version ${cargo_mdbook_version} && \
cargo install mdbook-mermaid --locked --version ${cargo_mdbook_mermaid_version} && \
rm -rf /opt/cargo/registry/src && \
rm -rf /opt/cargo/git/db
rm -rf /opt/cargo/git/db && \
rm -rf /root/.cargo/registry/cache

# nodejs needed by internal release process
FROM install_rust AS nodejs
Expand Down Expand Up @@ -196,6 +198,7 @@ RUN set -eux; \
bc \
ca-certificates \
clang \
cmake \
gcc \
git \
glibc-langpack-en \
Expand All @@ -209,7 +212,6 @@ RUN set -eux; \
python3-devel \
python3-pip \
shadow-utils \
cmake \
tar \
unzip && \
yum clean all && \
Expand All @@ -226,19 +228,8 @@ RUN set -eux; \

COPY --chown=build:build --from=local_tools /opt/cargo /opt/cargo
COPY --chown=build:build --from=gradle_wrapper /opt/gradle /home/build/.gradle
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/cargo-deny /opt/cargo/bin/cargo-deny
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/cargo-udeps /opt/cargo/bin/cargo-udeps
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/cargo-hack /opt/cargo/bin/cargo-hack
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/cargo-minimal-versions /opt/cargo/bin/cargo-minimal-versions
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/cargo-check-external-types /opt/cargo/bin/cargo-check-external-types
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/maturin /opt/cargo/bin/maturin
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/wasm-pack /opt/cargo/bin/wasm-pack
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/wasmtime /opt/cargo/bin/wasmtime
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/cargo-component /opt/cargo/bin/cargo-component
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/ /opt/cargo/bin/
COPY --chown=build:build --from=install_rust /opt/rustup /opt/rustup
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/cargo-semver-checks /opt/cargo/bin/cargo-semver-checks
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/mdbook /opt/cargo/bin/mdbook
COPY --chown=build:build --from=cargo_tools /opt/cargo/bin/mdbook-mermaid /opt/cargo/bin/mdbook-mermaid
COPY --chown=build:build --from=nodejs /opt/nodejs /opt/nodejs
COPY --chown=build:build --from=musl_toolchain /usr/local/musl/ /usr/local/musl/
ENV PATH=/opt/nodejs/bin:/opt/cargo/bin:$PATH:/usr/local/musl/bin/ \
Expand Down
Loading