Bump actions/setup-java from 5.0.0 to 5.1.0 #233
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2020 Google LLC | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # https://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # Format reference: https://docs.github.com/en/actions/reference | |
| name: Run Tests | |
| # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| schedule: | |
| # Daily at 12pm UTC | |
| - cron: '0 12 * * *' | |
| # Can be called from other workflow to run the tests | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| env: | |
| VERSION_NODEJS: '22' | |
| UNSYMLINK_DIR: bazel-bin-unsymlink | |
| # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobs | |
| jobs: | |
| build-and-test: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Java | |
| # https://github.com/marketplace/actions/setup-java-jdk | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: zulu | |
| java-version: '21' | |
| java-package: jdk | |
| architecture: x64 | |
| # Clone closure-compiler repo from the commit under test into current directory. | |
| - name: Checkout Current closure-compiler Commit | |
| # https://github.com/marketplace/actions/checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| # https://github.com/bazel-contrib/setup-bazel | |
| - uses: bazel-contrib/setup-bazel@4fd964a13a440a8aeb0be47350db2fc640f19ca8 # v0.15.0 | |
| with: | |
| # Avoid downloading Bazel every time. | |
| bazelisk-cache: true | |
| # Store build cache per workflow. | |
| disk-cache: ${{ github.workflow }} | |
| # Share repository cache between workflows | |
| repository-cache: true | |
| - name: Build and Test | |
| run: unset ANDROID_HOME && bazelisk test //:all | |
| - name: Unsymlink Bazel Artifacts | |
| # upload-artifact doesn't support paths with symlinks | |
| run: | | |
| mkdir -p ${{ env.UNSYMLINK_DIR }} | |
| cp -t ${{ env.UNSYMLINK_DIR }} bazel-bin/compiler_uberjar_deploy.jar | |
| cp -t ${{ env.UNSYMLINK_DIR }} bazel-bin/*_bundle.jar | |
| # Share the following files with other jobs in this workflow. They can be grabbed using ID | |
| # `unshaded_compiler`. This is made possible by uploading the files to GitHub controlled | |
| # storage. | |
| - name: Share Unshaded Compiler | |
| # https://github.com/marketplace/actions/upload-a-build-artifact | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: unshaded_compiler | |
| path: ${{ env.UNSYMLINK_DIR }}/compiler_uberjar_deploy.jar | |
| if-no-files-found: error | |
| test-closure-compiler-npm: | |
| name: Make Sure closure-compiler-npm is Compatible with this Compiler Build | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-and-test | |
| steps: | |
| - name: Setup Java | |
| # https://github.com/marketplace/actions/setup-java-jdk | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: zulu | |
| java-version: '21' | |
| java-package: jdk | |
| architecture: x64 | |
| - name: Setup Node.js | |
| # https://github.com/marketplace/actions/setup-node-js-environment | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: ${{ env.VERSION_NODEJS }} | |
| # Clone closure-compiler-npm repo from master into the current directory. | |
| - name: Checkout Current closure-compiler-npm Commit | |
| # https://github.com/marketplace/actions/checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| repository: chadkillingsworth/closure-compiler-npm | |
| ref: master | |
| # Clone closure-compiler repo from the commit under test into the npm repo compiler | |
| # submodule | |
| - name: Checkout Current closure-compiler Commit | |
| # https://github.com/marketplace/actions/checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| path: compiler | |
| # Grab the compiler binary that was shared from `build-and-test` and put the file into | |
| # ./compiler/bazel-bin. | |
| - name: Grab Unshaded Compiler | |
| # https://github.com/marketplace/actions/download-a-build-artifact | |
| uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 | |
| with: | |
| name: unshaded_compiler | |
| # Put the binary where bazel would have put it. | |
| path: compiler/bazel-bin | |
| - name: Test closure-compiler-npm | |
| run: compiler/.github/ci_support/test_closure-compiler-npm.sh compiler/bazel-bin/compiler_uberjar_deploy.jar |