diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 07755ef69c6a3..f49d899170d49 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -207,6 +207,14 @@ updates: labels: - "dependabot" - "dependencies" + - directory: /distribution/archives/darwin-arm64-tar/ + open-pull-requests-limit: 1 + package-ecosystem: gradle + schedule: + interval: weekly + labels: + - "dependabot" + - "dependencies" - directory: /distribution/archives/integ-test-zip/ open-pull-requests-limit: 1 package-ecosystem: gradle diff --git a/CHANGELOG.md b/CHANGELOG.md index 136d4141e3c8d..f5c8fa44f9f0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Bump `jackson` from 2.14.2 to 2.15.0 ([#7286](https://github.com/opensearch-project/OpenSearch/pull/7286) ### Changed +- Enable `./gradlew build` on MacOS by disabling bcw tests ([#7303](https://github.com/opensearch-project/OpenSearch/pull/7303)) ### Deprecated diff --git a/build.gradle b/build.gradle index 7da57fe4a3667..220f6f3daf5ac 100644 --- a/build.gradle +++ b/build.gradle @@ -225,8 +225,16 @@ tasks.register("verifyVersions") { */ boolean bwc_tests_enabled = true + /* place an issue link here when committing bwc changes */ -final String bwc_tests_disabled_issue = "" +String bwc_tests_disabled_issue = "" + +/* there's no existing MacOS release, therefore disable bcw tests */ +if (Os.isFamily(Os.FAMILY_MAC)) { + bwc_tests_enabled = false + bwc_tests_disabled_issue = "https://github.com/opensearch-project/OpenSearch/issues/4173" +} + if (bwc_tests_enabled == false) { if (bwc_tests_disabled_issue.isEmpty()) { throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false") diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index a32644fa6542c..d4dfb1f0ccf61 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -187,6 +187,7 @@ if (project != rootProject) { dependencies { reaper project('reaper') distribution project(':distribution:archives:darwin-tar') + distribution project(':distribution:archives:darwin-arm64-tar') distribution project(':distribution:archives:linux-arm64-tar') distribution project(':distribution:archives:linux-tar') distribution project(':distribution:archives:windows-zip') diff --git a/distribution/build.gradle b/distribution/build.gradle index 21e1cf3c17875..631813aadd615 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -344,7 +344,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) { modulesFiles = { platform -> copySpec { eachFile { - if (it.relativePath.segments[-2] == 'bin' || (platform == 'darwin-x64' && it.relativePath.segments[-2] == 'MacOS')) { + if (it.relativePath.segments[-2] == 'bin' || ((platform == 'darwin-x64' || platform == 'darwin-arm64') && it.relativePath.segments[-2] == 'MacOS')) { // bin files, wherever they are within modules (eg platform specific) should be executable // and MacOS is an alternative to bin on macOS it.mode = 0755 @@ -622,6 +622,7 @@ subprojects { } ['archives:darwin-tar', + 'archives:darwin-arm64-tar', 'archives:integ-test-zip', 'archives:linux-arm64-tar', 'archives:linux-tar', diff --git a/distribution/docker/build.gradle b/distribution/docker/build.gradle index ad8678c608b54..64471139e025b 100644 --- a/distribution/docker/build.gradle +++ b/distribution/docker/build.gradle @@ -33,6 +33,7 @@ configurations { } dependencies { + arm64DockerSource project(path: ":distribution:archives:darwin-arm64-tar", configuration:"default") arm64DockerSource project(path: ":distribution:archives:linux-arm64-tar", configuration:"default") s390xDockerSource project(path: ":distribution:archives:linux-s390x-tar", configuration:"default") ppc64leDockerSource project(path: ":distribution:archives:linux-ppc64le-tar", configuration:"default")