forked from TheAlgorithms/C
-
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.
Merge branch 'TheAlgorithms:master' into master
- Loading branch information
Showing
7 changed files
with
40 additions
and
162 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
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 |
---|---|---|
|
@@ -18,13 +18,22 @@ jobs: | |
- name: Add python dependencies | ||
run: | | ||
pip install requests | ||
- name: Write leectode DIRECTORY.md | ||
- name: Write LeetCode DIRECTORY.md | ||
run: | | ||
python3 scripts/leetcode_directory_md.py 2>&1 | tee leetcode/DIRECTORY.md | ||
git config --global user.name github-actions[bot] | ||
git config --global user.email '[email protected]' | ||
- name: Update LeetCode's directory | ||
git pull || true | ||
- name: Commit and push changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
id: commit-push | ||
with: | ||
commit_message: "docs: updating `leetcode/DIRECTORY.md`" | ||
branch: "leetcode-directory-${{ github.sha }}" | ||
create_branch: true | ||
- name: Creating and merging the PR | ||
shell: bash | ||
if: steps.commit-push.outputs.changes_detected == 'true' | ||
run: | | ||
git add leetcode/DIRECTORY.md | ||
git commit -am "updating DIRECTORY.md" || true | ||
git push origin HEAD:$GITHUB_REF || true | ||
gh pr create --base ${GITHUB_REF##*/} --head leetcode-directory-${{ github.sha }} --title 'docs: updating `leetcode/DIRECTORY.md`' --body 'Updated LeetCode directory (see the diff. for changes).' | ||
gh pr merge --admin --merge --subject 'docs: updating `leetcode/DIRECTORY.md' --delete-branch | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# If necessary, use the RELATIVE flag, otherwise each source file may be listed | ||
# with full pathname. The RELATIVE flag makes it easier to extract an executable's name | ||
# automatically. | ||
|
||
file( GLOB APP_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.c ) | ||
foreach( testsourcefile ${APP_SOURCES} ) | ||
string( REPLACE ".c" "" testname ${testsourcefile} ) # File type. Example: `.c` | ||
add_executable( ${testname} ${testsourcefile} ) | ||
|
||
if(OpenMP_C_FOUND) | ||
target_link_libraries(${testname} OpenMP::OpenMP_C) | ||
endif() | ||
if(MATH_LIBRARY) | ||
target_link_libraries(${testname} ${MATH_LIBRARY}) | ||
endif() | ||
install(TARGETS ${testname} DESTINATION "bin/cipher") # Folder name. Do NOT include `<>` | ||
|
||
endforeach( testsourcefile ${APP_SOURCES} ) |
File renamed without changes.