Skip to content

Commit

Permalink
Run tests for punctured decoder and simple decoder in github actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
williamyang98 committed Jan 31, 2024
1 parent 565557c commit 0019107
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/arm-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ jobs:
working-directory: ./examples
run: ninja -C build-arm

- name: Run test
- name: Run simple example
working-directory: ./examples
run: ./toolchains/arm_run.sh ./build-arm/run_simple

- name: Run punctured decoder example
working-directory: ./examples
run: ./toolchains/arm_run.sh ./build-arm/run_punctured_decoder

- name: Run tests
working-directory: ./examples
run: ./toolchains/arm_run.sh ./build-arm/run_tests
10 changes: 9 additions & 1 deletion .github/workflows/x86-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ jobs:
working-directory: ./examples
run: ninja -C ./build

- name: Run test
- name: Run simple example
working-directory: ./examples
run: ./build/run_simple

- name: Run punctured decoder example
working-directory: ./examples
run: ./build/run_punctured_decoder

- name: Run tests
working-directory: ./examples
run: ./build/run_tests
17 changes: 13 additions & 4 deletions .github/workflows/x86-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,20 @@ jobs:

- name: Configure CMake
working-directory: ./examples
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -A"x64" -G"Visual Studio 17 2022"
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
working-directory: ./examples
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: ninja -C build

- name: Run test
run: ${{github.workspace}}/build/Release/run_tests.exe
- name: Run simple example
working-directory: ./examples
run: ./build/run_simple

- name: Run punctured decoder example
working-directory: ./examples
run: ./build/run_punctured_decoder

- name: Run tests
working-directory: ./examples
run: ./build/run_tests
6 changes: 5 additions & 1 deletion examples/run_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ int main(int argc, char** argv) {
const float bit_error_rate = (float)total_errors / (float)total_input_bits * 100.0f;
printf("bit_error_rate=%.2f%%\n", bit_error_rate);
printf("%zu/%zu incorrect bits\n", total_errors, total_input_bits);


if (total_errors > 0) {
printf("ERROR: Simple example had decoding errors\n");
return 1;
}
return 0;
}

0 comments on commit 0019107

Please sign in to comment.