Skip to content

Custom weights for training examples #1337

Custom weights for training examples

Custom weights for training examples #1337

Workflow file for this run

---
name: Test build
on:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
cpp_boosting: ${{ steps.filter.outputs.cpp_boosting }}
cpp_seco: ${{ steps.filter.outputs.cpp_seco }}
cpp_tests_boosting: ${{ steps.filter.outputs.cpp_tests_boosting }}
cpp_tests_seco: ${{ steps.filter.outputs.cpp_tests_seco }}
python_tests_boosting: ${{ steps.filter.outputs.python_tests_boosting }}
python_tests_seco: ${{ steps.filter.outputs.python_tests_seco }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
build_files: &build_files
- '.github/workflows/test_build.yml'
- '.github/workflows/template_build.yml'
- '.github/workflows/template_build_linux.yml'
- '.github/workflows/template_build_macos.yml'
- '.github/workflows/template_build_windows.yml'
- 'build'
- 'build.bat'
- 'build_system/main.py'
- 'build_system/core/**'
- 'build_system/util/**'
- 'build_system/targets/*.py'
- 'build_system/targets/compilation/*'
- 'build_system/targets/packaging/*'
- 'build_system/targets/testing/*'
cpp_common: &cpp_common
- *build_files
- 'build_system/targets/compilation/cpp/*'
- 'cpp/meson.*'
- 'cpp/subprojects/common/meson.*'
- 'cpp/subprojects/common/include/**'
- 'cpp/subprojects/common/src/**'
cpp_boosting: &cpp_boosting
- *cpp_common
- 'cpp/subprojects/boosting/meson.*'
- 'cpp/subprojects/boosting/include/**'
- 'cpp/subprojects/boosting/src/**'
cpp_seco: &cpp_seco
- *cpp_common
- 'cpp/subprojects/seco/meson.*'
- 'cpp/subprojects/seco/include/**'
- 'cpp/subprojects/seco/src/**'
cpp_tests_common: &cpp_tests_common
- *cpp_common
- 'build_system/targets/testing/cpp/*'
- 'cpp/subprojects/common/test/**'
cpp_tests_boosting: &cpp_tests_boosting
- *cpp_tests_common
- *cpp_boosting
- 'cpp/subprojects/boosting/test/**'
cpp_tests_seco: &cpp_tests_seco
- *cpp_tests_common
- *cpp_seco
- 'cpp/subprojects/seco/test/**'
python_tests_common: &python_tests_common
- *cpp_tests_common
- 'build_system/targets/compilation/cython/*'
- 'build_system/targets/testing/python/*'
- 'python/meson.*'
- 'python/subprojects/common/meson.*'
- 'python/subprojects/common/pyproject.toml'
- 'python/subprojects/common/requirements.txt'
- 'python/subprojects/common/setup.py'
- 'python/subprojects/common/mlrl/**'
- 'python/subprojects/testbed/meson.*'
- 'python/subprojects/testbed/pyproject.toml'
- 'python/subprojects/testbed/requirements.txt'
- 'python/subprojects/testbed/setup.py'
- 'python/subprojects/testbed/mlrl/**'
- 'python/tests/mlrl/common/**'
- 'python/tests/res/data/**'
- 'python/tests/res/in/**'
python_tests_boosting: &python_tests_boosting
- *python_tests_common
- *cpp_tests_boosting
- 'python/subprojects/boosting/pyproject.toml'
- 'python/subprojects/boosting/requirements.txt'
- 'python/subprojects/boosting/setup.py'
- 'python/subprojects/boosting/mlrl/**'
- 'python/tests/mlrl/boosting/**'
- 'python/tests/res/out/boosting/**'
python_tests_seco: &python_tests_seco
- *python_tests_common
- *cpp_tests_seco
- 'python/subprojects/seco/pyproject.toml'
- 'python/subprojects/seco/requirements.txt'
- 'python/subprojects/seco/setup.py'
- 'python/subprojects/seco/mlrl/**'
- 'python/tests/mlrl/seco/**'
- 'python/tests/res/out/seco/**'
test_build:
needs: changes
name: Test build
strategy:
fail-fast: false
matrix:
subproject:
- boosting
- seco
uses: ./.github/workflows/template_build.yml
with:
subproject: ${{ matrix.subproject }}
compile: ${{ needs.changes.outputs[format('cpp_{0}', matrix.subproject)] == 'true' }}
run_cpp_tests: ${{ needs.changes.outputs[format('cpp_tests_{0}', matrix.subproject)] == 'true' }}
run_python_tests: ${{ needs.changes.outputs[format('python_tests_{0}', matrix.subproject)] == 'true' }}
publish_test_results:
needs: test_build
if: always()
name: Publish test results
runs-on: ubuntu-latest
steps:
- name: Download C++ test results
uses: actions/download-artifact@v4
with:
pattern: cpp-test-results-*
path: cpp_test_results
- name: Publish C++ test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: C++ Test Results
files: cpp_test_results/**/*.xml
- name: Download Python test results
uses: actions/download-artifact@v4
with:
pattern: python-test-results-*
path: python_test_results
- name: Publish Python test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Python Test Results
files: python_test_results/**/*.xml
check_success:
needs: test_build
if: always()
name: Test build succeeded
runs-on: ubuntu-latest
steps:
- name: Check for success
run: |-
if [[ "${{ needs.test_build.result }}" != "success" ]]; then
exit 1
fi