-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipeline setup for aarch64-linux #9326
Changes from all commits
73fcf21
ba51756
36dd3ed
d60ff0e
e66c553
82843de
562c30b
f01ea3d
1e36f37
e44cd28
6ffe273
4ac55a7
efc61d0
1ca7adc
e8234bf
eeac7ce
dea96d8
7da0dd3
5727d66
047bb91
5f90c51
dc2dcc2
b479d1d
19cc606
05ba30d
31f473f
aceebb1
e2e3a50
0e99a63
e3e3225
229bb41
319cf48
cf3f5c2
3959879
761a0e1
d0133f1
3d8c8cf
ff3f02f
e8da464
798661f
973758c
4b121e8
aaa5bdd
2a26e83
a53ce9c
339d7e9
d4e011b
f5eb005
1385d03
53dff91
f934eb7
c102d24
82fc262
c9befb7
5866c8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,12 +22,6 @@ steps: | |
# Release! | ||
####################################################################### | ||
|
||
- label: "[:linux: build hab (ARM)]" | ||
command: | ||
- .expeditor/scripts/release_habitat/package_and_upload_arm_binary.sh | ||
agents: | ||
queue: docker-linux-arm64 | ||
|
||
- label: "[:linux: build hab]" | ||
command: | ||
- .expeditor/scripts/release_habitat/build_component.sh hab | ||
|
@@ -38,6 +32,15 @@ steps: | |
environment: | ||
- BUILD_PKG_TARGET=x86_64-linux | ||
|
||
- label: "[:linux: build aarch64 hab]" | ||
agents: | ||
queue: default-privileged-aarch64 | ||
env: | ||
HAB_FALLBACK_CHANNEL: "LTS-2024" | ||
BUILD_PKG_TARGET: "aarch64-linux" | ||
command: | ||
- sudo -E .expeditor/scripts/release_habitat/build_component.sh hab | ||
|
||
- label: "[:linux: :two: build hab]" | ||
command: | ||
- .expeditor/scripts/release_habitat/build_component.sh hab | ||
|
@@ -111,6 +114,15 @@ steps: | |
environment: | ||
- BUILD_PKG_TARGET=x86_64-linux | ||
|
||
- label: "[:linux: build aarch64 hab-plan-build]" | ||
agents: | ||
queue: default-privileged-aarch64 | ||
env: | ||
HAB_FALLBACK_CHANNEL: "LTS-2024" | ||
BUILD_PKG_TARGET: "aarch64-linux" | ||
command: | ||
- sudo -E .expeditor/scripts/release_habitat/build_component.sh plan-build | ||
|
||
- label: "[:linux: :two: build hab-plan-build]" | ||
command: | ||
- .expeditor/scripts/release_habitat/build_component.sh plan-build | ||
|
@@ -146,6 +158,15 @@ steps: | |
environment: | ||
- BUILD_PKG_TARGET=x86_64-linux | ||
|
||
- label: "[:linux: build aarch64 hab-backline]" | ||
agents: | ||
queue: default-privileged-aarch64 | ||
env: | ||
HAB_FALLBACK_CHANNEL: "LTS-2024" | ||
BUILD_PKG_TARGET: "aarch64-linux" | ||
command: | ||
- sudo -E .expeditor/scripts/release_habitat/build_component.sh backline | ||
|
||
- label: "[:linux: :two: build hab-backline]" | ||
command: | ||
- .expeditor/scripts/release_habitat/build_component.sh backline | ||
|
@@ -170,6 +191,15 @@ steps: | |
environment: | ||
- BUILD_PKG_TARGET=x86_64-linux | ||
|
||
- label: "[:linux: build aarch64 hab-studio]" | ||
agents: | ||
queue: default-privileged-aarch64 | ||
env: | ||
HAB_FALLBACK_CHANNEL: "LTS-2024" | ||
BUILD_PKG_TARGET: "aarch64-linux" | ||
command: | ||
- sudo -E .expeditor/scripts/release_habitat/build_component.sh studio | ||
|
||
- label: "[:linux: :two: build hab-studio]" | ||
command: | ||
- .expeditor/scripts/release_habitat/build_component.sh studio | ||
|
@@ -208,6 +238,15 @@ steps: | |
environment: | ||
- BUILD_PKG_TARGET=x86_64-linux | ||
|
||
- label: "[:linux: build aarch64 launcher]" | ||
agents: | ||
queue: default-privileged-aarch64 | ||
env: | ||
HAB_FALLBACK_CHANNEL: "LTS-2024" | ||
BUILD_PKG_TARGET: "aarch64-linux" | ||
command: | ||
- sudo -E .expeditor/scripts/release_habitat/build_component.sh launcher | ||
|
||
- label: "[:linux: :two: build launcher]" | ||
command: | ||
- .expeditor/scripts/release_habitat/build_component.sh launcher | ||
|
@@ -241,6 +280,15 @@ steps: | |
environment: | ||
- BUILD_PKG_TARGET=x86_64-linux | ||
|
||
- label: "[:linux: build aarch64 hab-sup]" | ||
agents: | ||
queue: default-privileged-aarch64 | ||
env: | ||
HAB_FALLBACK_CHANNEL: "LTS-2024" | ||
BUILD_PKG_TARGET: "aarch64-linux" | ||
command: | ||
- sudo -E .expeditor/scripts/release_habitat/build_component.sh sup | ||
|
||
- label: "[:linux: :two: build hab-sup]" | ||
command: | ||
- .expeditor/scripts/release_habitat/build_component.sh sup | ||
|
@@ -274,6 +322,15 @@ steps: | |
environment: | ||
- BUILD_PKG_TARGET=x86_64-linux | ||
|
||
- label: "[:linux: build aarch64 hab-pkg-export-container]" | ||
agents: | ||
queue: default-privileged-aarch64 | ||
env: | ||
HAB_FALLBACK_CHANNEL: "LTS-2024" | ||
BUILD_PKG_TARGET: "aarch64-linux" | ||
command: | ||
- sudo -E .expeditor/scripts/release_habitat/build_component.sh pkg-export-container | ||
|
||
- label: "[:windows: build hab-pkg-export-container]" | ||
command: | ||
- powershell .expeditor/scripts/release_habitat/build_component.ps1 pkg-export-container | ||
|
@@ -295,6 +352,15 @@ steps: | |
environment: | ||
- BUILD_PKG_TARGET=x86_64-linux | ||
|
||
- label: "[:linux: build aarch64 hab-pkg-export-tar]" | ||
agents: | ||
queue: default-privileged-aarch64 | ||
env: | ||
HAB_FALLBACK_CHANNEL: "LTS-2024" | ||
BUILD_PKG_TARGET: "aarch64-linux" | ||
command: | ||
- sudo -E .expeditor/scripts/release_habitat/build_component.sh pkg-export-tar | ||
|
||
- label: "[:linux: :two: build hab-pkg-export-tar]" | ||
command: | ||
- .expeditor/scripts/release_habitat/build_component.sh pkg-export-tar | ||
|
@@ -352,6 +418,16 @@ steps: | |
environment: | ||
- BUILD_PKG_TARGET=x86_64-linux | ||
|
||
- label: "[:linux: upload hab aarch64 binary]" | ||
agents: | ||
queue: default-privileged-aarch64 | ||
env: | ||
HAB_FALLBACK_CHANNEL: "LTS-2024" | ||
BUILD_PKG_TARGET: "aarch64-linux" | ||
command: | ||
- sudo -E .expeditor/scripts/release_habitat/package_and_upload_binary.sh | ||
if: build.creator.name == 'Chef Expeditor' || build.env("UPLOAD_AND_PROMOTE") == 'true' | ||
|
||
- label: "[:linux: :two: upload hab binary]" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need a ARM There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, Will do that in a seperate PR! |
||
command: | ||
- .expeditor/scripts/release_habitat/package_and_upload_binary.sh | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
set -eou pipefail | ||
|
||
package_path=${1?package_path argument required} | ||
|
||
# Install hab from a temporarily uploaded aarch64 package | ||
curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- -t "$BUILD_PKG_TARGET" -c "$HAB_FALLBACK_CHANNEL" -v 1.6.1178 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could we just put this package in stable and not need to rely on a specific build number? I don't see a problem with that since we have not publicized arm support and it wouldn't be possible for customers to see it on the official downloads site. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once this is merged, I am thinking of updating the channel to dev to build the latest hab and update the pipeline. If that doesn’t work, I can promote the build created by the release pipeline and then update it here. |
||
|
||
# Since we are only verifying we don't have build failures, make everything | ||
# temp! | ||
export HAB_ORIGIN | ||
HAB_ORIGIN=core | ||
# let's make a selfcontained tempdir for this job | ||
export JOB_TEMP_ROOT | ||
JOB_TEMP_ROOT=$(mktemp -d /tmp/job-root-XXXXXX) | ||
export HAB_CACHE_KEY_PATH | ||
HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" | ||
|
||
export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL | ||
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL="$HAB_FALLBACK_CHANNEL" | ||
export HAB_PREFER_LOCAL_CHEF_DEPS="true" | ||
|
||
echo "--- :key: Generating temporary origin key" | ||
hab origin key generate "$HAB_ORIGIN" | ||
echo "--- :hab: Running hab pkg build for $package_path" | ||
# Install the temporarily built hab-studio. | ||
# Once hab is released in the LTS channel, this step may no longer be required. | ||
hab pkg install core/hab-studio -c "$HAB_FALLBACK_CHANNEL" | ||
hab pkg build "$package_path" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/bin/bash | ||
|
||
set -eou pipefail | ||
|
||
# Install hab from a temporarily uploaded aarch64 package | ||
curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- -t aarch64-linux -c lts24-aarch64-linux -v 1.6.1178 | ||
|
||
# shellcheck source=.expeditor/scripts/shared.sh | ||
source .expeditor/scripts/verify/shared.sh | ||
|
||
if [[ ${1:-"--"} = "--" ]]; then | ||
scope="habitat workspace" | ||
else | ||
component="$1" | ||
shift | ||
scope="$component" | ||
fi | ||
|
||
toolchain=$(get_toolchain) | ||
|
||
sudo -E hab pkg install core/zeromq | ||
sudo -E hab pkg install core/protobuf | ||
sudo -E hab pkg install core/rust/"$toolchain" | ||
sudo -E hab pkg install core/xz | ||
sudo -E hab pkg install core/coreutils | ||
sudo -E hab pkg install core/openssl | ||
sudo -E hab pkg install core/perl | ||
sudo -E hab pkg install core/make | ||
|
||
export OPENSSL_DIR | ||
OPENSSL_DIR="$(hab pkg path core/openssl)/bin" | ||
export OPENSSL_LIB_DIR | ||
OPENSSL_LIB_DIR="$(hab pkg path core/openssl)/lib" | ||
|
||
export LIBZMQ_PREFIX | ||
LIBZMQ_PREFIX=$(hab pkg path core/zeromq) | ||
# now include zeromq and gcc so they exist in the runtime library path when cargo test is run | ||
export LD_LIBRARY_PATH | ||
LD_LIBRARY_PATH="$(hab pkg path core/gcc-base)/lib:$(hab pkg path core/zeromq)/lib:$(hab pkg path core/xz)/lib:$(hab pkg path core/openssl)/lib" | ||
|
||
export LIBRARY_PATH | ||
LIBRARY_PATH="$(hab pkg path core/xz)/lib" | ||
|
||
export PROTOC_NO_VENDOR=1 | ||
export PROTOC | ||
PROTOC=$(hab pkg path core/protobuf)/bin/protoc | ||
|
||
_oldPth=$PATH | ||
_pth="$(hab pkg path core/coreutils)/bin:$(hab pkg path core/openssl)/bin:$(hab pkg path core/perl)/bin:$(hab pkg path core/make)/bin" | ||
eval "$(hab pkg env core/rust/"$toolchain"):$PATH" | ||
export PATH="$PATH:$_pth:$_oldPth" | ||
|
||
# Set testing filesystem root | ||
export FS_ROOT | ||
FS_ROOT=$(mktemp -d /tmp/testing-fs-root-XXXXXX) | ||
|
||
export RUST_BACKTRACE=1 | ||
|
||
# Build the all the hab binaries so that we can run integration tests | ||
if [[ "$scope" == "sup" ]]; then | ||
cargo build | ||
fi | ||
|
||
echo "--- Running cargo test with scope '$scope' and args '$*'" | ||
|
||
if [[ -n ${component:-} ]]; then | ||
cd "components/$component" | ||
fi | ||
|
||
# We do not have any packages in the stable channel for aarch64 and probably never will. | ||
# Set the HAB_INTERPRETER_IDENT to point to LTS-2024 to proceed with the tests. | ||
export HAB_INTERPRETER_IDENT="core/busybox-static/1.36.1/20240805133911" | ||
|
||
# Always add `--quiet` to avoid the noise of compilation in test output. | ||
# The invocation to this script can add `--format pretty` to the test runner | ||
# args (that is, after --, like --nocapture and --test-threads) if the names | ||
# of the tests being run is desired in the output. | ||
cargo test --quiet "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove the
[:linux: build hab (ARM)]
build above?