Skip to content

Commit

Permalink
Merge pull request #1772 from tweag/ip/test-supported-bazel-versions
Browse files Browse the repository at this point in the history
Test all supported bazel versions in integration tests
  • Loading branch information
mergify[bot] committed Jul 12, 2022
2 parents 072e23b + c4b5e1a commit 4d9d65f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
7 changes: 0 additions & 7 deletions bazel_versions.bzl

This file was deleted.

13 changes: 11 additions & 2 deletions haskell/private/versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
# in this file executes (and there's no way to execute it later; see first
# paragraph above).

SUPPORTED_BAZEL_VERSIONS = [
"4.0.0",
"4.2.2",
]

SUPPORTED_NIXPKGS_BAZEL_PACKAGES = [
"bazel_4",
]

def _parse_version_chunk(version_chunk):
"""
Args:
Expand Down Expand Up @@ -112,8 +121,8 @@ def check_bazel_version(minimum_bazel_version, maximum_bazel_version = None, baz
return (True, "")

def check_bazel_version_compatible(actual_version):
min_bazel = "4.0.0" # Change THIS LINE when changing bazel min version
max_bazel = "4.2.2" # Change THIS LINE when changing bazel max version
min_bazel = SUPPORTED_BAZEL_VERSIONS[0]
max_bazel = SUPPORTED_BAZEL_VERSIONS[-1]

(compatible, msg) = check_bazel_version(min_bazel, max_bazel, actual_version)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration_testing/dependencies.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl", "nixpkgs_package")
load("@contrib_rules_bazel_integration_test//bazel_integration_test:defs.bzl", "bazel_binaries")
load(
"//:bazel_versions.bzl",
"//haskell:private/versions.bzl",
"SUPPORTED_BAZEL_VERSIONS",
"SUPPORTED_NIXPKGS_BAZEL_PACKAGES",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load(
"integration_test_utils",
)
load(
"//:bazel_versions.bzl",
"//haskell:private/versions.bzl",
"SUPPORTED_BAZEL_VERSIONS",
"SUPPORTED_NIXPKGS_BAZEL_PACKAGES",
)
Expand Down

0 comments on commit 4d9d65f

Please sign in to comment.