Refact: Update magic_enum library #209
Workflow file for this 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
name: Main CI | |
# Controls when the workflow will run | |
on: | |
pull_request: | |
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: robocin/soccer-common:latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: check-coding-style | |
run: | | |
( | |
cd ${GITHUB_WORKSPACE} | |
format_files=$( | |
find . -type d \( -path ./bin -o -path ./lib -o -path ./libs -o -path ./build \) -prune -false \ | |
-o -name "*.h" -o -name "*.hh" -o -name "*.h++" -o -name "*.hxx" -o -name "*.H" -o -name "*.hpp" \ | |
-o -name "*.c" -o -name "*.cc" -o -name "*.c++" -o -name "*.cxx" -o -name "*.C" -o -name "*.cpp" | |
) | |
for file in ${format_files}; do | |
clang-format --dry-run --Werror -i "${file}" | |
done | |
) | |
- name: build | |
run: cd ${GITHUB_WORKSPACE} && mkdir build && cd build && cmake .. && make -j$(grep -c ^processor /proc/cpuinfo) | |
- name: run-tests | |
run: | | |
( | |
cd ${GITHUB_WORKSPACE} | |
if [ -d "bin/test/" ]; then | |
for test in $(find ./bin/test -executable -type f); do | |
${test} -platform offscreen | |
error_code=$? | |
if [ $error_code -ne 0 ]; then | |
exit $error_code | |
fi | |
echo "" | |
done; | |
fi | |
) |