File: buildspec_integv2_nix.yml

package info (click to toggle)
aws-crt-python 0.28.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 78,428 kB
  • sloc: ansic: 437,955; python: 27,657; makefile: 5,855; sh: 4,289; ruby: 208; java: 82; perl: 73; cpp: 25; xml: 11
file content (140 lines) | stat: -rw-r--r-- 4,820 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

# Because the Ec2 reserved instance disks persist between runs,
# we need to do periodic clean up; The `nix store gc` command runs on Sunday to
# prevent the disk from filling up.
---
version: 0.2
env:
  shell: bash

batch:
  build-graph:
    # Cache job for x86
    - identifier: nixCache_x86_64
      env:
        fleet: ubuntu24_x86_64_nix
        variables:
          # max-jobs tell nix to use all available cores for building derivations.
          NIXDEV_ARGS: --max-jobs auto
          NIXDEV_LIBCRYPTO: .#default
          NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodx861-ehnvuoswh2yr?region=us-east-2

    # Cache Job for aarch64
    - identifier: nixCache_aarch64
      env:
        fleet: ubuntu24_aarch64_nix
        variables:
          # max-jobs tell nix to use all available cores for building derivations.
          NIXDEV_ARGS: --max-jobs auto
          NIXDEV_LIBCRYPTO: .#default
          NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2

    # AWSLC  x86
    - identifier: Integ_awslc_x86_0
      depend-on:
        - nixCache_x86_64
      env:
        fleet: ubuntu24_x86_64_nix
        variables:
          NIXDEV_LIBCRYPTO: .#awslc
          NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodx861-ehnvuoswh2yr?region=us-east-2

    # AWSLC aarch64
    - identifier: Integ_awslc_aarch64_0
      depend-on:
        - nixCache_aarch64
      env:
        fleet: ubuntu24_aarch64_nix
        variables:
          NIXDEV_LIBCRYPTO: .#awslc
          NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2

    # AWSLC-FIPS-2022
    - identifier: Integ_awslcfips2022_x86_64_0
      depend-on:
        - nixCache_x86_64
      env:
        fleet: ubuntu24_x86_64_nix
        variables:
          NIXDEV_LIBCRYPTO: .#awslcfips2022
          NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodx861-ehnvuoswh2yr?region=us-east-2

    # AWSLC-FIPS-2024
    - identifier: Integ_awslcfips2024_aarch64_0
      depend-on:
        - nixCache_aarch64
      env:
        fleet: ubuntu24_aarch64_nix
        variables:
          NIXDEV_LIBCRYPTO: .#awslcfips2024
          NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2

    # Openssl30 x86
    - identifier: Integ_openssl30_x86_0
      depend-on:
        - nixCache_x86_64
      env:
        fleet: ubuntu24_x86_64_nix
        variables:
          NIXDEV_LIBCRYPTO: .#default
          NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodx861-ehnvuoswh2yr?region=us-east-2

    # Openssl30 aarch64
    - identifier: Integ_openssl30_aarch64_0
      depend-on:
        - nixCache_aarch64
      env:
        fleet: ubuntu24_aarch64_nix
        variables:
          NIXDEV_LIBCRYPTO: .#default
          NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2

    # Openssl111 aarch64 only
    - identifier: Integ_openssl111_aarch64_0
      depend-on:
        - nixCache_aarch64
      env:
        fleet: ubuntu24_aarch64_nix
        variables:
          NIXDEV_LIBCRYPTO: .#openssl111
          NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2

phases:
  install:
    commands:
      - if [[ $(date +%u) -eq 0 ]]; then nix store gc; fi
      - |
        if [[ $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then
          echo "Refreshing nix cache..."
          nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs
          nix build .#devShell
          nix copy --to $NIX_CACHE_BUCKET .#devShell
        else
          echo "Downloading cache"
          nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs
        fi
  pre_build:
    commands:
      - |
        set -e
        if [[ ! $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then
          nix copy --from  $NIX_CACHE_BUCKET --all  --no-check-sigs
          nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh; configure"
        fi
  build:
    commands:
      - |
        set -e
        if [[ ! $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then
          nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh; build"
        fi
  post_build:
    # Dynamic_record_sizes is being excluded in nix/shell.sh and needs a rewrite.
    commands:
      - |
        set -e
        if [[ ! $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then
          nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh;uvinteg"
        fi