Skip to content

Commit

Permalink
Add default version (without compilation) (#5)
Browse files Browse the repository at this point in the history
* Add version without compilation

* Fix action.yml
  • Loading branch information
MinyazevR authored Jul 5, 2024
1 parent 6b6f557 commit e36b4c9
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ inputs:
Additional argument to prepend to the compiler command line.
required: false
default: ""
install-stable:
description: |
The stable version is being downloaded without compilation.
In this case, the version field is ignored.
required: false
default: false
ignore-headers:
description: |
Ignore thirdparty headers.
Expand Down Expand Up @@ -85,7 +91,7 @@ runs:
id: cache-clazy-standalone
with:
path: ~/.local/clazy/
key: ${{ runner.os }}-clazy-${{ inputs.version }}
key: ${{ runner.os }}-clazy-${{ inputs.version }}-${{ github.event.pull_request.number }}

- name: Install dependencies
shell: bash
Expand All @@ -95,9 +101,16 @@ runs:
libclang-dev \
llvm-dev
- name: Install clazy
if: ${{ inputs.install-stable }} == 'true'
shell: bash
run: |
sudo apt-get update
sudo apt-get install clazy
- name: Build clazy
shell: bash
if: steps.cache-clazy-standalone.outputs.cache-hit != 'true'
if: ${{ steps.cache-clazy-standalone.outputs.cache-hit != 'true' && inputs.install-stable != 'true' }}
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
Expand All @@ -111,11 +124,11 @@ runs:
&& cmake --build . --target install && cd .. && rm -rf ./clazy-${{ inputs.version }}
- name: Save clazy
if: steps.cache-clazy-standalone.outputs.cache-hit != 'true'
if: ${{ steps.cache-clazy-standalone.outputs.cache-hit != 'true' && inputs.install-stable != 'true' }}
uses: actions/cache@v4
with:
path: ~/.local/clazy
key: ${{ runner.os }}-clazy-${{ inputs.version }}
key: ${{ runner.os }}-clazy-${{ inputs.version }}-${{ github.event.pull_request.number }}

- name: Start clazy
id: clazy-check
Expand Down

0 comments on commit e36b4c9

Please sign in to comment.