mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
---
|
|
name: Infer
|
|
|
|
'on':
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
run_infer:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
java-version: 21
|
|
distribution: 'temurin'
|
|
|
|
- name: Set up OCaml
|
|
uses: ocaml/setup-ocaml@v3
|
|
with:
|
|
ocaml-compiler: 5
|
|
|
|
- name: Get current year/weak
|
|
run: echo "year_week=$(date +'%Y_%U')" >> $GITHUB_ENV
|
|
|
|
- name: Cache infer build
|
|
id: cache-infer
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: infer
|
|
key: ${{ runner.os }}-infer-${{ env.year_week }}
|
|
|
|
- name: Build infer
|
|
if: steps.cache-infer.outputs.cache-hit != 'true'
|
|
run: |
|
|
cd ..
|
|
git clone https://github.com/facebook/infer.git
|
|
cd infer
|
|
git checkout 02c2c43b71e4c5110c0be841e66153942fda06c9
|
|
./build-infer.sh java
|
|
cp -r infer ../Java
|
|
|
|
- name: Add infer to PATH
|
|
run: |
|
|
echo "infer/bin" >> $GITHUB_PATH
|
|
|
|
- name: Display infer version
|
|
run: |
|
|
which infer
|
|
infer --version
|
|
|
|
- name: Run infer
|
|
run: |
|
|
mvn clean
|
|
infer --fail-on-issue --print-logs --no-progress-bar -- mvn test
|
|
...
|