-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #265 from Z1Turn0/main
Optimize compile time
- Loading branch information
Showing
5 changed files
with
125 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: 'Check Loser Homework' | ||
description: 'Use cmake to check loser homework' | ||
inputs: | ||
shell: | ||
description: 'shell to use' | ||
required: false | ||
default: bash | ||
build-path: | ||
description: 'path to build' | ||
required: false | ||
default: 'build' | ||
extra-gen-params: | ||
description: 'extra cmake generation parameters' | ||
required: false | ||
default: '' | ||
use-ninja: | ||
description: 'use ninja to build' | ||
required: false | ||
default: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: seanmiddleditch/gha-setup-ninja@master | ||
if: inputs.use-ninja == 'true' | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
cache: 'pip' | ||
- run: pip install -r requirements.txt | ||
shell: ${{ inputs.shell }} | ||
|
||
- name: Configure CMake | ||
if: inputs.use-ninja == 'false' | ||
run: cmake -B ${{ inputs.build-path }} ${{ inputs.extra-gen-params}} | ||
shell: ${{ inputs.shell }} | ||
|
||
- name: Build | ||
if: inputs.use-ninja == 'false' | ||
run: cmake --build ${{ inputs.build-path }} --target build_loser_homework | ||
shell: ${{ inputs.shell }} | ||
|
||
- name: Check run | ||
if: inputs.use-ninja == 'false' | ||
run: cmake --build ${{ inputs.build-path }} --target run_loser_homework | ||
shell: ${{ inputs.shell }} | ||
|
||
- name: Configure CMake with Ninja | ||
if: inputs.use-ninja == 'true' | ||
run: cmake -B ${{ inputs.build-path }} -G Ninja ${{ inputs.extra-gen-params}} | ||
shell: ${{ inputs.shell }} | ||
|
||
- name: Build with Ninja | ||
if: inputs.use-ninja == 'true' | ||
run: ninja -C ${{ inputs.build-path }} build_loser_homework | ||
shell: ${{ inputs.shell }} | ||
|
||
- name: Check run with Ninja | ||
if: inputs.use-ninja == 'true' | ||
run: ninja -C ${{ inputs.build-path }} run_loser_homework | ||
shell: ${{ inputs.shell }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters