diff --git a/.bazelrc b/.bazelrc index 44b3641c..f9707cce 100644 --- a/.bazelrc +++ b/.bazelrc @@ -16,17 +16,14 @@ common --incompatible_strict_action_env common --reuse_sandbox_directories common --repo_env=RJE_VERBOSE=true -# Workers -common --worker_verbose -common --experimental_worker_multiplex -common --experimental_shrink_worker_pool -common --experimental_worker_for_repo_fetching=platform - # JAVA - START common --experimental_strict_java_deps=off # Turn off strict java deps -common --java_runtime_version=remotejdk_11 # Use inbuilt Java 11 for hermeticity -common --tool_java_runtime_version=remotejdk_11 +common --java_runtime_version=remotejdk_17 # Use inbuilt Java 17 for hermeticity +common --tool_java_runtime_version=remotejdk_17 +common --tool_java_language_version=17 +common --java_language_version=17 common --jvmopt="-Djava.locale.providers=COMPAT,SPI" # Use Java 8 default locale provider +common --jvmopt="--add-exports=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED" common --experimental_java_classpath=bazel common --experimental_java_header_input_pruning # JAVA - END @@ -47,9 +44,16 @@ common --output_library_merged_assets=false # Turn off asset merging artifact # common --experimental_use_package_aware_rtxt=true # Use package aware R.txt files (required for databinding) # common --define=nontransitive_r_class=1 # Adapt bazel common rules for non transitive R class +# Workers +common --worker_verbose +common --experimental_worker_multiplex +common --experimental_shrink_worker_pool +common --experimental_worker_for_repo_fetching=platform + common --experimental_persistent_aar_extractor common --persistent_multiplex_android_tools common --persistent_android_dex_desugar + common --strategy=DatabindingStubs=worker common --worker_max_instances=Javac=1 common --worker_max_instances=KotlinCompile=1 @@ -78,6 +82,6 @@ run --ui_event_filters=-info,-stdout --noshow_progress # Ci Config common:ci --noshow_progress -common:ci --color=no +common:ci --color=yes try-import local.bazelrc \ No newline at end of file diff --git a/.bazelversion b/.bazelversion index 4b49d9bb..468c41f9 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.2.1 \ No newline at end of file diff --git a/.github/actions/bazel/action.yml b/.github/actions/bazel/action.yml index 6bc8d8e6..48c5d685 100644 --- a/.github/actions/bazel/action.yml +++ b/.github/actions/bazel/action.yml @@ -1,5 +1,5 @@ name: 'Run Bazel Command' -description: 'Ensures bazelisk, mounts Bazel Cache from artifacts and runs Bazel command' +description: 'Runs bazel command with setup-bazel' inputs: bazel-config: description: 'The bazel configuration to use.' @@ -17,19 +17,19 @@ inputs: runs: using: "composite" steps: - - name: Setup Bazelisk - uses: bazelbuild/setup-bazelisk@v2 - - name: Install JDK 11 - uses: actions/setup-java@v3 + - name: Install JDK 17 + uses: actions/setup-java@v4 with: distribution: "zulu" - java-version: "11" - - - name: Mount bazel cache - uses: actions/cache@v3 + java-version: "17" + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.8.5 with: - path: "bazel-cache" - key: ${{ inputs.cache-key }} + bazelisk-cache: true + # Store build cache per workflow. + disk-cache: ${{ inputs.cache-key }}-${{ github.workflow }} + # Share repository cache between workflows. + repository-cache: true - name: Run bazel command shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9f5cb69..7290a492 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Build workflow +name: CI workflow on: push: @@ -6,11 +6,15 @@ on: - master pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Bazel build uses: ./.github/actions/bazel with: @@ -20,7 +24,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Bazel build uses: ./.github/actions/bazel with: @@ -30,7 +34,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Bazel test uses: ./.github/actions/bazel with: