Skip to content
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

Also test docker exec test without bzlmod #297

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions tests/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,20 @@ llvm_toolchain(
},
)

http_archive(
name = "bazel_skylib",
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz",
],
)

load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()
llvm_toolchain(
name = "llvm_toolchain_linux_exec",
exec_arch = "amd64",
# Option 2:
# distribution = "clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz",
exec_os = "linux",
llvm_version = "17.0.6",
# Option 1:
sha256 = {"": "884ee67d647d77e58740c1e645649e29ae9e8a6fe87c1376be0f3a30f3cc9ab3"},
strip_prefix = {"": "clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04"},
urls = {"": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz"]},
)

## Test dependencies.

# Well known repos; present here only for testing.

Expand Down
3 changes: 2 additions & 1 deletion tests/scripts/run_docker_exec_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ source "${scripts_dir}/bazel.sh"
cd "${scripts_dir}"

base_image="debian:stable-slim"
binpath="$("${bazel}" info bazel-bin)/stdlib_test"
binpath="$("${bazel}" info "${common_args[@]}" bazel-bin)/stdlib_test"

docker build --platform=linux/amd64 --pull --tag=bazel-docker-sandbox - <<-EOF
FROM ${base_image}
Expand All @@ -44,6 +44,7 @@ docker build --platform=linux/amd64 --pull --tag=bazel-docker-sandbox - <<-EOF
EOF

build_args=(
"${common_args[@]}"
# Platforms
"--platforms=@toolchains_llvm//platforms:linux-x86_64"
"--extra_execution_platforms=@toolchains_llvm//platforms:linux-x86_64"
Expand Down
3 changes: 2 additions & 1 deletion tests/scripts/run_xcompile_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source "${scripts_dir}/bazel.sh"

cd "${scripts_dir}"

binpath="$("${bazel}" info bazel-bin)/stdlib_test"
binpath="$("${bazel}" info "${common_args[@]}" bazel-bin)/stdlib_test"

check_with_image() {
if "${CI:-false}"; then
Expand All @@ -36,6 +36,7 @@ check_with_image() {
echo ""
echo "Testing static linked user libraries and dynamic linked system libraries"
build_args=(
"${common_args[@]}"
--platforms=@toolchains_llvm//platforms:linux-x86_64
--extra_toolchains=@llvm_toolchain_with_sysroot//:cc-toolchain-x86_64-linux
--symlink_prefix=/
Expand Down
2 changes: 1 addition & 1 deletion toolchain/internal/release_name.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def _linux(llvm_version, distname, version, arch):
major_llvm_version = _major_llvm_version(llvm_version)

# NOTE: Many of these systems are untested because I do not have access to them.
# If you find this mapping wrong, please send a Pull Request on Github.
# If you find this mapping wrong, please send a Pull Request on GitHub.
os_name = None
if arch in ["aarch64", "armv7a", "mips", "mipsel"]:
os_name = "linux-gnu"
Expand Down
Loading