Skip to content

Commit c1210b3

Browse files
feat: update build scripts to build qchat (#364)
1 parent 4ee4bc4 commit c1210b3

File tree

7 files changed

+780
-2
lines changed

7 files changed

+780
-2
lines changed

build-config/buildspec-linux.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
version: 0.2
2+
3+
env:
4+
shell: bash
5+
6+
phases:
7+
install:
8+
run-as: root
9+
commands:
10+
- dnf update -y
11+
- dnf install -y python cmake bash zsh unzip git jq
12+
- dnf swap -y gnupg2-minimal gnupg2-full
13+
pre_build:
14+
commands:
15+
- export HOME=/home/codebuild-user
16+
- export PATH="$HOME/.local/bin:$PATH"
17+
- mkdir -p "$HOME/.local/bin"
18+
# Create fish config dir to prevent rustup from failing
19+
- mkdir -p "$HOME/.config/fish/conf.d"
20+
# Install cargo
21+
- curl --retry 5 --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
22+
- . "$HOME/.cargo/env"
23+
- rustup toolchain install `cat rust-toolchain.toml | grep channel | cut -d '=' -f2 | tr -d ' "'`
24+
# Install cross only if the musl env var is set and not null
25+
- if [ ! -z "${AMAZON_Q_BUILD_MUSL:+x}" ]; then cargo install cross --git https://github.com/cross-rs/cross; fi
26+
# Install python/node via mise (https://mise.jdx.dev/continuous-integration.html)
27+
- curl --retry 5 --proto '=https' --tlsv1.2 -sSf https://mise.run | sh
28+
- mise install
29+
- eval "$(mise activate bash --shims)"
30+
# Install python deps
31+
- pip3 install -r build-scripts/requirements.txt
32+
build:
33+
commands:
34+
- python3.11 build-scripts/qchatmain.py build
35+
36+
artifacts:
37+
discard-paths: "yes"
38+
base-directory: "build"
39+
files:
40+
- ./*.tar.gz
41+
- ./*.zip
42+
# Hashes
43+
- ./*.sha256
44+
# Signatures
45+
- ./*.asc
46+
- ./*.sig
47+

build-config/buildspec-macos.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version: 0.2
2+
3+
phases:
4+
pre_build:
5+
commands:
6+
- whoami
7+
- echo "$HOME"
8+
- echo "$SHELL"
9+
- pwd
10+
- ls
11+
- mkdir -p "$HOME/.local/bin"
12+
- export PATH="$HOME/.local/bin:$PATH"
13+
# Create fish config dir to prevent rustup from failing
14+
- mkdir -p "$HOME/.config/fish/conf.d"
15+
# Install cargo
16+
- export CARGO_HOME="$HOME/.cargo"
17+
- curl --retry 5 --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
18+
- . "$HOME/.cargo/env"
19+
- rustup toolchain install `cat rust-toolchain.toml | grep channel | cut -d '=' -f2 | tr -d ' "'`
20+
# Install cross only if the musl env var is set and not null
21+
- if [ ! -z "${AMAZON_Q_BUILD_MUSL:+x}" ]; then cargo install cross --git https://github.com/cross-rs/cross; fi
22+
# Install python/node via mise (https://mise.jdx.dev/continuous-integration.html)
23+
- curl --retry 5 --proto '=https' --tlsv1.2 -sSf https://mise.run | sh
24+
- mise install
25+
- eval "$(mise activate zsh --shims)"
26+
# Install python deps
27+
- python3 -m venv scripts/.env
28+
- source build-scripts/.env/bin/activate
29+
- pip3 install -r build-scripts/requirements.txt
30+
build:
31+
commands:
32+
- python3 build-scripts/qchatmain.py build --skip-lints --skip-tests --not-release
33+
34+
artifacts:
35+
discard-paths: "yes"
36+
base-directory: "build"
37+
files:
38+
- ./*.zip
39+
# Hashes
40+
- ./*.sha256
41+

0 commit comments

Comments
 (0)