-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test that optimization flags are preserved
- Loading branch information
Showing
7 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 OR ISC | ||
|
||
FROM fedora:41 | ||
|
||
RUN dnf install -y qemu-user-static mock | ||
RUN useradd mockbuilder | ||
RUN usermod -a -G mock mockbuilder \ | ||
&& chmod -R g+w /etc/mock | ||
|
||
COPY aws_lc_rs_build.sh / | ||
COPY entry.sh / | ||
|
||
ENV AWS_LC_RS_DISABLE_SLOW_TESTS=1 | ||
ENV CFLAGS="-O2 -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3" | ||
|
||
USER root | ||
ENTRYPOINT ["/entry.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 OR ISC | ||
|
||
set -ex -o pipefail | ||
|
||
SRC_DIR="${SRC_DIR:-/aws_lc_rs}" | ||
|
||
su mockbuilder -c "mock -r fedora-rawhide-s390x --install git cargo cmake perl rustfmt clang" | ||
su mockbuilder -c "mock -r fedora-rawhide-s390x --shell 'mkdir /builddir/aws-lc-rs/'" | ||
# Use globbing to avoid copying the .git directory | ||
su mockbuilder -c "mock -r fedora-rawhide-s390x --copyin /aws_lc_rs/* /builddir/aws-lc-rs/" | ||
su mockbuilder -c "mock -r fedora-rawhide-s390x --enable-network --cwd /builddir/aws-lc-rs/ --shell 'cargo test -p aws-lc-rs'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 OR ISC | ||
|
||
set -ex | ||
|
||
SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) | ||
|
||
|
||
# Log Docker hub limit https://docs.docker.com/docker-hub/download-rate-limit/#how-can-i-check-my-current-rate | ||
TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token) | ||
curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest | ||
|
||
EXTRA_ARGS=() | ||
if [[ -n "${GOPROXY:+x}" ]]; then | ||
EXTRA_ARGS=("--build-arg" "GOPROXY=${GOPROXY}" "${EXTRA_ARGS[@]}") | ||
fi | ||
|
||
pushd "${SCRIPT_DIR}" | ||
docker build -t fedora-41 . --load "${EXTRA_ARGS[@]}" | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 OR ISC | ||
|
||
set -ex -o pipefail | ||
|
||
/aws_lc_rs_build.sh "${argv[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters