<commit_before># PRELIM attempt at running a variety of tests on ubuntu 18.04 LTS

name: ubuntu-matrix

on:
  push:
    branches: [v2.1-Dev, v2.1-Release]
  pull_request:
    branches: []

jobs:
  build-and-test:
    runs-on: ${{ matrix.runs_on }}
    strategy:
      matrix:
        include:
          - runs_on: ubuntu-latest
            container_image: sophistsolutionsinc/stroika-buildvm-ubuntu1804-regression-tests
            compiler: g++-8
            cpp_version: c++17
          - runs_on: ubuntu-latest
            container_image: sophistsolutionsinc/stroika-buildvm-ubuntu2004-regression-tests
            compiler: g++-10
            cpp_version: c++17
    env:
      # vm appears to have 2 virtual CPUs, and QUICK_BUILD avoids some internal testing
      MAKEFLAGS: "--jobs=3 QUICK_BUILD=1"
    container: ${{ matrix.container_image }}
    steps:
      - uses: actions/checkout@v2
      - name: Build System Info
        run: |
          echo "CWD=" `pwd`
          grep "model name" /proc/cpuinfo | head -1
          grep processor /proc/cpuinfo | wc -l
          grep MemTotal /proc/meminfo
          df -h
      - name: Configure Debug
        run: |
          ./configure Debug --compiler-driver ${{ matrix.compiler }} --apply-default-debug-flags --trace2file enable --cppstd-version ${{ matrix.cpp_version }}
          cat ConfigurationFiles/Debug.xml
      # No need to explicitly call make third-party-components, libraries, but breaking out
      # as step allows the summary to show the time for each part.
      # Break out third-party-components to do clean so we dont run out of disk space
      - name: Make third-party-components
        run: |
          make third-party-components
          make clean
      - name: Make libraries
        run: make libraries
      - name: Make all
        run: make all
      - name: Run Tests
        run: make run-tests
      - name: Archive Samples Results
        uses: actions/upload-artifact@v2
        with:
          name: Sample apps
          path: |
            Builds/Debug/Samples-*
      - name: Archive Performance Log Results
        uses: actions/upload-artifact@v2
        with:
          name: Log Data
          path: |
            Builds/Debug/PerformanceDump.txt
            /tmp/Trace*.txt<commit_msg>more use of matrix variables on github actions script<commit_after># PRELIM attempt at running a variety of tests on ubuntu 18.04 LTS

name: ubuntu-matrix

on:
  push:
    branches: [v2.1-Dev, v2.1-Release]
  pull_request:
    branches: []

jobs:
  build-and-test:
    runs-on: ${{ matrix.runs_on }}
    strategy:
      matrix:
        include:
          - displayTargetName: ubuntu-18.04
            compiler: g++-8
            runs_on: ubuntu-latest
            container_image: sophistsolutionsinc/stroika-buildvm-ubuntu1804-regression-tests
            cpp_version: c++17
            config_name: Debug
            extra_config_args: --apply-default-debug-flags --trace2file enable
          - displayTargetName: ubuntu-20.04
            compiler: g++-10
            runs_on: ubuntu-latest
            container_image: sophistsolutionsinc/stroika-buildvm-ubuntu2004-regression-tests
            cpp_version: c++17
            config_name: Debug
            extra_config_args: --apply-default-debug-flags --trace2file enable
    env:
      # vm appears to have 2 virtual CPUs, and QUICK_BUILD avoids some internal testing
      MAKEFLAGS: "--jobs=2 QUICK_BUILD=1"
    container: ${{ matrix.container_image }}
    steps:
      - uses: actions/checkout@v2
      - name: Build System Info
        run: |
          echo "CWD=" `pwd`
          grep "model name" /proc/cpuinfo | head -1
          grep processor /proc/cpuinfo | wc -l
          grep MemTotal /proc/meminfo
          df -h
      - name: Configure ${{ matrix.config_name }}
        run: |
          ./configure ${{ matrix.config_name }} --compiler-driver ${{ matrix.compiler }} ${{ matrix.extra_config_args }} --cppstd-version ${{ matrix.cpp_version }}
          cat ConfigurationFiles/Debug.xml
      # No need to explicitly call make third-party-components, libraries, but breaking out
      # as step allows the summary to show the time for each part.
      # Break out third-party-components to do clean so we dont run out of disk space
      - name: Make third-party-components
        run: |
          make third-party-components
          make clean
      - name: Make libraries
        run: make libraries
      - name: Make all
        run: make all
      - name: Run Tests
        run: make run-tests
      - name: Archive Samples Results
        uses: actions/upload-artifact@v2
        with:
          name: Sample apps
          path: |
            Builds/${{ matrix.config_name }}/Samples-*
      - name: Archive Performance Log Results
        uses: actions/upload-artifact@v2
        with:
          name: Log Data
          path: |
            Builds/${{ matrix.config_name }}/PerformanceDump.txt
            /tmp/Trace*.txt
{'fraction_non_alphanumeric': 0.09114583333333333, 'fraction_numerical': 0.01422275641025641, 'mean_word_length': 1.942251031231585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '922239', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1392, 'n_words': 415}