Pass CMAKE_ARGS via step outputs

This commit is contained in:
Cheng
2025-11-23 10:12:16 +09:00
parent c6b3d3be9a
commit df57648d2b

View File

@@ -10,6 +10,7 @@ runs:
using: "composite" using: "composite"
steps: steps:
- name: Install Python package - name: Install Python package
id: python_build
shell: sh shell: sh
env: env:
DEBUG: 1 DEBUG: 1
@@ -25,7 +26,7 @@ runs:
fi fi
pip install --no-build-isolation -e ".[dev]" -v pip install --no-build-isolation -e ".[dev]" -v
# Pass the CMAKE_ARGS to following steps. # Pass the CMAKE_ARGS to following steps.
echo CMAKE_ARGS="$CMAKE_ARGS" > $GITHUB_ENV echo CMAKE_ARGS="$CMAKE_ARGS" >> $GITHUB_OUTPUT
- name: Generate package stubs - name: Generate package stubs
shell: sh shell: sh
@@ -36,5 +37,5 @@ runs:
- name: Build CPP only - name: Build CPP only
shell: bash shell: bash
run: | run: |
cmake . -B build -DCMAKE_BUILD_TYPE=Debug ${{ env.CMAKE_ARGS }} cmake . -B build -DCMAKE_BUILD_TYPE=Debug ${{ steps.python_build.outputs.CMAKE_ARGS }}
cmake --build build -j $(nproc) cmake --build build -j $(nproc)