Debian Codegraph @

crt/s2n/codebuild/spec/buildspec_musl.yml

raw symbols SCIP
1 ---
2 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. A copy of the License is
6 # located at
7 #
8 # http://aws.amazon.com/apache2.0/
9 #
10 # or in the "license" file accompanying this file. This file is distributed on an
11 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 # implied. See the License for the specific language governing permissions and
13 # limitations under the License.
14 version: 0.2
15
16 env:
17 variables:
18 MUSL_DIR: "test-deps/musl"
19 LIBCRYPTO_DIR: "test-deps/musl-awslc"
20
21 phases:
22 pre_build:
23 on-failure: ABORT
24 commands:
25 # Install musl libc
26 - git clone --depth=1 https://git.musl-libc.org/git/musl $MUSL_DIR
27 - echo "Installing musl to $CODEBUILD_SRC_DIR/$MUSL_DIR"
28 - cd $MUSL_DIR
29 - ./configure --prefix=$CODEBUILD_SRC_DIR/$MUSL_DIR
30 - make install
31 - cd $CODEBUILD_SRC_DIR
32 # Install libcrypto.
33 # We need to modify the usual install so that the library can link to musl.
34 # If this becomes a problem, we can switch to more official cross compilation.
35 - CFLAGS="-U_FORTIFY_SOURCE -D_FILE_OFFSET_BITS=32"
36 - ./codebuild/bin/install_awslc.sh $(mktemp -d) $CODEBUILD_SRC_DIR/$LIBCRYPTO_DIR
37 build:
38 on-failure: ABORT
39 commands:
40 - CC="$CODEBUILD_SRC_DIR/$MUSL_DIR/bin/musl-gcc"
41 - cmake . -Bbuild -DCMAKE_PREFIX_PATH=$CODEBUILD_SRC_DIR/$LIBCRYPTO_DIR
42 - cmake --build ./build
43 post_build:
44 on-failure: ABORT
45 commands:
46 - CTEST_OUTPUT_ON_FAILURE=1 CTEST_PARALLEL_LEVEL=$(nproc) make -C build test