-
Notifications
You must be signed in to change notification settings - Fork 4
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
3 changed files
with
66 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Run Tests on Emulated Platforms | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
preset: | ||
description: 'CMake preset used to build patomic and googletest' | ||
required: true | ||
type: string | ||
default: '' | ||
architecture: | ||
description: 'CPU architecture tests are run on, passed to QEMU' | ||
required: true | ||
type: string | ||
default: '' | ||
triple: | ||
description: 'Platform triple to compile for, used to install correct compiler and sysroot' | ||
required: true | ||
type: string | ||
default: '' | ||
cmake_build_shared: | ||
description: 'Determines value of BUILD_SHARED_LIBS for CMake, must be considered a boolean by CMake' | ||
required: true | ||
type: string | ||
default: '' | ||
|
||
jobs: | ||
warning: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check No Empty Inputs | ||
shell: bash | ||
run: | | ||
# checks input is not empty | ||
check_input() { | ||
input_name="${1}" | ||
input_value="${2}" | ||
if [[ -z "${input_value}" ]]; then | ||
echo "Error: required input '${input_name}' is empty or was not specified." | ||
exit 1 | ||
else | ||
echo "${input_name}: ${input_value}" | ||
fi | ||
} | ||
# apply function to all inputs | ||
check_input "preset" "${{ inputs.preset }}" | ||
check_input "architecture" "${{ inputs.architecture }}" | ||
check_input "triple" "${{ inputs.triple }}" | ||
check_input "cmake_build_shared" "${{ inputs.cmake_build_shared }}" |
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