forked from hanabu/lambda-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
70 lines (69 loc) · 1.71 KB
/
buildspec.yml
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
version: 0.2
env:
variables:
PATH: "/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/codebuild/user/bin"
# key: "value"
#parameter-store:
# key: "value"
# key: "value"
#secrets-manager:
# key: secret-id:json-key:version-stage:version-id
# key: secret-id:json-key:version-stage:version-id
#exported-variables:
# - variable
# - variable
#git-credential-helper: yes
#batch:
#fast-fail: true
#build-list:
#build-matrix:
#build-graph:
phases:
install:
commands:
# Install rust toolchanin
- curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
pre_build:
commands:
# Uncomment if you require custom build setting
#- mkdir -p .cargo
#- |
# cat > .cargo/config.toml <<EOF
# [profile.release]
# codegen-units = 1
# opt-level = "s"
# lto = "fat"
# EOF
build:
commands:
# check compiler
- rustc -V
# build axum example
- cargo build --release --features=hyper --example axum
# binary name must be "bootstrap" for Lambda custom runtime
- mv target/release/examples/axum bootstrap
# strip & check size, dependencies
- strip --strip-all bootstrap
- size bootstrap
- ldd bootstrap
#post_build:
#commands:
# - command
#reports:
#report-name-or-arn:
#files:
# - location
# - location
#base-directory: location
#discard-paths: yes
#file-format: JunitXml | CucumberJson
artifacts:
files:
- bootstrap
# - add other resources such as CSS, Javascript assets, etc.
#discard-paths: yes
#name: $(date +%Y-%m-%d)
#base-directory: location
#cache:
#paths:
# - paths