-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
86 additions
and
0 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,35 @@ | ||
name: ci | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
test-action: | ||
|
||
name: Test Github Action | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: List prerequisites non-recursively | ||
id: non-recursive-prerequisites | ||
uses: ./ | ||
with: | ||
working-directory: test | ||
target: test | ||
- name: Check non-recursive prerequisites | ||
run: | | ||
test "${{ steps.non-recursive-prerequisites.outputs.prerequisites }}" = "prereq" | ||
echo ${{ steps.non-recursive-prerequisites.outputs.hash }} | ||
- name: List recursive prerequisites | ||
id: recursive-prerequisites | ||
uses: ./ | ||
with: | ||
working-directory: test | ||
target: test | ||
flags: --recursive | ||
- name: Check recursive prerequisites | ||
run: | | ||
test "${{ steps.recursive-prerequisites.outputs.prerequisites }}" = "preprereq" | ||
echo ${{ steps.recursive-prerequisites.outputs.hash }} |
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,44 @@ | ||
name: "List Make Prerequisites Action" | ||
description: "List all prerequisites of a Makefile target" | ||
author: "Luca Colagrande" | ||
|
||
inputs: | ||
target: | ||
description: "Target to list prerequisites for" | ||
required: true | ||
working-directory: | ||
description: "Working directory to run Make in" | ||
required: false | ||
default: '.' | ||
flags: | ||
description: "Additional flags to pass to list-make-prerequisites.py" | ||
required: false | ||
default: '' | ||
|
||
outputs: | ||
hash: | ||
description: "Hash of all prerequisite file contents" | ||
value: ${{ steps.list-make-prerequisites.outputs.hash }} | ||
prerequisites: | ||
description: "List of all prerequisite files" | ||
value: ${{ steps.list-make-prerequisites.outputs.prerequisites }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install Dependencies | ||
shell: bash | ||
run: pip install -r requirements.txt | ||
- name: List Make Prerequisites | ||
id: list-make-prerequisites | ||
shell: bash | ||
working-directory: ${{ inputs.working-directory }} | ||
run: | | ||
hash=$(${GITHUB_ACTION_PATH}/list-make-prerequisites.py ${{ inputs.target }} ${{ inputs.flags }} --hash 2>/dev/null) | ||
prerequisites=$(${GITHUB_ACTION_PATH}/list-make-prerequisites.py ${{ inputs.target }} ${{ inputs.flags }} 2>/dev/null) | ||
echo "hash=$hash" >> $GITHUB_OUTPUT | ||
echo "prerequisites=$prerequisites" >> $GITHUB_OUTPUT |
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 @@ | ||
anytree |
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,5 @@ | ||
test: prereq | ||
cp $< $@ | ||
|
||
prereq: preprereq | ||
cp $< $@ |
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 @@ | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |