-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9326 from habitat-sh/aarch64-linux-cicd
Pipeline setup for aarch64-linux
- Loading branch information
Showing
28 changed files
with
739 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "$@" |
Oops, something went wrong.