Skip to content

Commit

Permalink
Update LLVM versions in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthab committed Sep 19, 2023
1 parent 5a276de commit 8acd4ac
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ jobs:
- uses: actions/checkout@v3
- name: Download and Extract LLVM distribution
env:
release: llvmorg-15.0.6
archive: clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04
release: llvmorg-16.0.0
archive: clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04
ext: .tar.xz
local_path: /tmp/llvm-15
local_path: /tmp/llvm-16
run: wget --no-verbose "https://github.com/llvm/llvm-project/releases/download/${release}/${archive}${ext}" && tar -xf "${archive}${ext}" && mv "${archive}" "${local_path}"
- name: Test
run: tests/scripts/run_tests.sh -t @llvm_toolchain_with_system_llvm//:cc-toolchain-x86_64-linux
19 changes: 8 additions & 11 deletions tests/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
# llvm_toolchain below, sys_paths_test in the workflows file, and xcompile_test
# through the `llvm_toolchain_with_sysroot` toolchain.
LLVM_VERSION = "15.0.6"
LLVM_VERSIONS = {
"": "16.0.0",
"darwin-aarch64": "16.0.5",
"darwin-x86_64": "15.0.7",
}

llvm.toolchain(
name = "llvm_toolchain",
llvm_versions = {
"": "15.0.6",
"darwin-aarch64": "15.0.7",
"darwin-x86_64": "15.0.7",
},
llvm_versions = LLVM_VERSIONS,
)
use_repo(llvm, "llvm_toolchain", "llvm_toolchain_llvm")

Expand Down Expand Up @@ -144,19 +145,15 @@ llvm.toolchain(
llvm_version = LLVM_VERSION,
# For this toolchain to work, the LLVM distribution archive would need to be unpacked here.
# A path in /tmp to be part of system tmp cleanup schedule.
toolchain_roots = {"": "/tmp/llvm-15"},
toolchain_roots = {"": "/tmp/llvm-16"},
)
use_repo(llvm, "llvm_toolchain_with_system_llvm")

# ## Toolchain example with a sysroot.

llvm.toolchain(
name = "llvm_toolchain_with_sysroot",
llvm_versions = {
"": "15.0.6",
"darwin-x86_64": "15.0.7",
"darwin-aarch64": "15.0.7",
},
llvm_versions = LLVM_VERSIONS,
sysroot = {
"linux-x86_64": "@org_chromium_sysroot_linux_x64//:sysroot",
},
Expand Down
28 changes: 11 additions & 17 deletions tests/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,24 @@ load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain")
# When updating this version, also update the versions associated with
# llvm_toolchain below, sys_paths_test in the workflows file, and xcompile_test
# through the `llvm_toolchain_with_sysroot` toolchain.
LLVM_VERSION = "15.0.6"
LLVM_VERSION = "16.0.0"

LLVM_VERSIONS = {
"": "16.0.0",
"darwin-aarch64": "16.0.5",
"darwin-x86_64": "15.0.7",
}

llvm_toolchain(
name = "llvm_toolchain",
llvm_versions = {
"": "15.0.6",
"darwin-aarch64": "15.0.7",
"darwin-x86_64": "15.0.7",
},
llvm_versions = LLVM_VERSIONS,
)

# Example toolchain with user provided URLs.
# TODO(siddharthab): Add test.
llvm_toolchain(
name = "llvm_toolchain_with_urls",
llvm_versions = {
"": "15.0.6",
"darwin-aarch64": "15.0.7",
"darwin-x86_64": "15.0.7",
},
llvm_versions = LLVM_VERSIONS,
sha256 = {
"": "38bc7f5563642e73e69ac5626724e206d6d539fbef653541b34cae0ba9c3f036",
"darwin-aarch64": "867c6afd41158c132ef05a8f1ddaecf476a26b91c85def8e124414f9a9ba188d",
Expand Down Expand Up @@ -96,7 +94,7 @@ llvm_toolchain(
llvm_version = LLVM_VERSION,
# For this toolchain to work, the LLVM distribution archive would need to be unpacked here.
# A path in /tmp to be part of system tmp cleanup schedule.
toolchain_roots = {"": "/tmp/llvm-15"},
toolchain_roots = {"": "/tmp/llvm-16"},
)

## Toolchain example with a sysroot.
Expand All @@ -117,11 +115,7 @@ filegroup(

llvm_toolchain(
name = "llvm_toolchain_with_sysroot",
llvm_versions = {
"": "15.0.6",
"darwin-x86_64": "15.0.7",
"darwin-aarch64": "15.0.7",
},
llvm_versions = LLVM_VERSIONS,
sysroot = {
"linux-x86_64": "@org_chromium_sysroot_linux_x64//:sysroot",
},
Expand Down

0 comments on commit 8acd4ac

Please sign in to comment.