name: Linux Release Tests

on:
  push:
    branches:
      - master
      - "*-non-experimental"
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    name: Non-experimental

    steps:
    - uses: actions/checkout@v4
      with:
        submodules: 'recursive'
    - name: Install dependencies
      run: ./scripts/github-ci-linux-get-dependencies.sh
    - uses: actions/setup-python@v5
      with:
        python-version: '3.x'
    - name: Install gcovr
      run: python -m pip install -U gcovr
    - name: Build and test
      run: ./scripts/github-ci.sh enable_python build test coverage
    - name: Upload Test Result Report
      uses: actions/upload-artifact@v4
      if: ${{ always() }}
      with:
        name: Test Result Report (non-experimental)
        path: |
          b/Testing/Temporary/*_report.html
          b/Testing/Temporary/LastTest.log
    - name: Upload Code Coverage Report
      uses: actions/upload-artifact@v4
      with:
        name: Code Coverage Report (non-experimental)
        path: c/coverage*.html
