Skip to content

Commit

Permalink
Take compiler as input
Browse files Browse the repository at this point in the history
  • Loading branch information
kendal committed May 3, 2024
1 parent 8434886 commit 133bfc4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ inputs:
default: ''
required: false

compiler:
description: Tell cmake to use this compiler.
default: '' # Let cmake decide.
required: false

runs:
using: composite
steps:
Expand Down Expand Up @@ -122,17 +127,17 @@ runs:
run: echo "${{ runner.arch }}"

- name: Configure bloaty (arm64)
if: steps.cache.outputs.cache-hit != 'true' && contains(fromJSON('["ARM64", "ARM"]'), runner.arch)
if: steps.cache.outputs.cache-hit != 'true' && inputs.compiler != ''
shell: pwsh
run: |
cmake -B ${{ inputs.bloaty-checkout-dir }}/.build `
-S ${{ inputs.bloaty-checkout-dir }} `
-G Ninja `
-D CMAKE_CXX_COMPILER="cl" `
-D CMAKE_C_COMPILER="cl"
-D CMAKE_CXX_COMPILER="${{ inputs.compiler }}" `
-D CMAKE_C_COMPILER="${{ inputs.compiler }}"
- name: Configure bloaty (x64)
if: steps.cache.outputs.cache-hit != 'true' && runner.arch != 'ARM64'
if: steps.cache.outputs.cache-hit != 'true' && inputs.compiler == ''
shell: pwsh
run: |
cmake -B ${{ inputs.bloaty-checkout-dir }}/.build `
Expand Down

0 comments on commit 133bfc4

Please sign in to comment.