Merge pull request #16 from threeal/shorter-configure-args-var-name

Shorter `CONFIGURE_ARGS` Variable Name
This commit is contained in:
Alfi Maulana 2023-01-11 13:09:57 +07:00 committed by GitHub
commit 4ba6e49b5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,21 +31,21 @@ runs:
- name: Process inputs - name: Process inputs
shell: bash shell: bash
run: | run: |
CONFIGURE_ARGS="${{ inputs.source-dir }} -B ${{ inputs.build-dir }}" ARGS="${{ inputs.source-dir }} -B ${{ inputs.build-dir }}"
BUILD_ARGS="--build ${{ inputs.build-dir }}" BUILD_ARGS="--build ${{ inputs.build-dir }}"
if [ -n '${{ inputs.generator }}' ]; then if [ -n '${{ inputs.generator }}' ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS -G ${{ inputs.generator }}" ARGS="$ARGS -G ${{ inputs.generator }}"
fi fi
if [ -n '${{ inputs.c-compiler }}' ]; then if [ -n '${{ inputs.c-compiler }}' ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS -D CMAKE_C_COMPILER=${{ inputs.c-compiler }}" ARGS="$ARGS -D CMAKE_C_COMPILER=${{ inputs.c-compiler }}"
fi fi
if [ -n '${{ inputs.cxx-compiler }}' ]; then if [ -n '${{ inputs.cxx-compiler }}' ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS -D CMAKE_CXX_COMPILER=${{ inputs.cxx-compiler }}" ARGS="$ARGS -D CMAKE_CXX_COMPILER=${{ inputs.cxx-compiler }}"
fi fi
if [ -n '${{ inputs.args }}' ]; then if [ -n '${{ inputs.args }}' ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS ${{ inputs.args }}" ARGS="$ARGS ${{ inputs.args }}"
fi fi
echo "CMAKE_CONFIGURE_ARGS=${CONFIGURE_ARGS//[$'\t\r\n']}" >> $GITHUB_ENV echo "CMAKE_ARGS=${ARGS//[$'\t\r\n']}" >> $GITHUB_ENV
echo "CMAKE_BUILD_ARGS=${BUILD_ARGS//[$'\t\r\n']}" >> $GITHUB_ENV echo "CMAKE_BUILD_ARGS=${BUILD_ARGS//[$'\t\r\n']}" >> $GITHUB_ENV
- name: Install Ninja - name: Install Ninja
@ -60,7 +60,7 @@ runs:
- name: Configure CMake - name: Configure CMake
shell: bash shell: bash
run: cmake ${{ env.CMAKE_CONFIGURE_ARGS }} run: cmake ${{ env.CMAKE_ARGS }}
- name: Build targets - name: Build targets
shell: bash shell: bash