-
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
Chong Liu
committed
Dec 3, 2023
1 parent
5877e14
commit f14c0c3
Showing
3 changed files
with
81 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,53 @@ | ||
# This is a workflow to get source code and run tests of common functions | ||
name: Common Function Tests | ||
|
||
# Controls when the action will run. Workflow runs when manually triggered using the UI or API. | ||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
# Allows you to run this workflow every time a commit is pushed to the repository | ||
push: | ||
# Allows you to run this workflow every time a pull request is opened or updated | ||
pull_request: | ||
# Schedule a workflow to run automatically | ||
schedule: | ||
- cron: '0 2 * * *' | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# Job | ||
Common-Function-GTests: | ||
# Runner | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Step: Checkout source code | ||
- name: Checkout source code | ||
uses: actions/checkout@main | ||
|
||
# Step: Setup CMake | ||
- name: Setup CMake | ||
uses: jwlawson/[email protected] | ||
|
||
# Step: Tool Versions | ||
- name: Tool Versions | ||
run: cmake --version | ||
|
||
# Step: Build all the tests | ||
- name: Build all the GTests | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cmake --build . | ||
# Step: Run all test executables in the build/bin directory | ||
- name: Run Main | ||
run: | | ||
chmod +x .github/workflows/testRunner/runMain.sh | ||
.github/workflows/testRunner/runMain.sh | ||
# Step: Run all test executables in the build/bin directory | ||
- name: Run all GTests | ||
run: | | ||
chmod +x .github/workflows/testRunner/runGTests.sh | ||
.github/workflows/testRunner/runGTests.sh |
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,14 @@ | ||
#!/bin/bash | ||
|
||
# Exit immediately if a command exits with a non-zero status. | ||
set -e | ||
|
||
# run gtest executables in the output/exe/test directory | ||
for exe in $(find ./output/exe/test -executable -type f); do | ||
echo "==============================" | ||
$exe # run GTest executables | ||
done | ||
|
||
# finish up message | ||
echo "==============================" | ||
echo "All executables have been run!" |
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,14 @@ | ||
#!/bin/bash | ||
|
||
# Exit immediately if a command exits with a non-zero status. | ||
set -e | ||
|
||
# run executables in the output/exe/main directory | ||
for exe in $(find ./output/exe/main -executable -type f); do | ||
echo "==============================" | ||
$exe # run executables | ||
done | ||
|
||
# finish up message | ||
echo "==============================" | ||
echo "All executables have been run!" |