Welcome to mirror list, hosted at ThFree Co, Russian Federation.

unittests_linux.yml « workflows « .github - github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3cb81b815e5538aff92470a3ad0032ef66f3188c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Unit tests Linux

on:
  push:
    branches:
    - develop
    - master
  pull_request:
  schedule:
  - cron: '0 0 1 * *'

jobs:
  Linux:
    name: Ubuntu 18.04
    runs-on: ubuntu-18.04
    strategy:
      fail-fast: false
      matrix:
        compiler: [clang++, g++, libc++, arm-linux-gnueabihf-g++]
        configuration: [error_code, status_code]
    env:
      NAME: Linux-${{ matrix.configuration }}-${{ matrix.compiler }}
      CXX: ${{ matrix.compiler }}
          
    steps:
    - uses: actions/checkout@v2

    - name: CMake tests Linux
      shell: bash
      run: |
       sudo apt-get remove -y libstdc++-10-dev g++-10 gcc-10
       sudo apt-get autoremove
       if [ "${{ matrix.compiler }}" = "libc++" ]; then
         wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -;
         sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main";
         sudo apt update;
         sudo apt install clang-11 libc++-11-dev libc++abi-11-dev libomp-11-dev;
         export CMAKE_CONFIGURE_OPTIONS="-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-linux-libc++.cmake";
       fi
       if [ "${{ matrix.configuration }}" = "status_code" ]; then
         export CMAKE_CONFIGURE_OPTIONS="$CMAKE_CONFIGURE_OPTIONS;-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON";
       fi
       if [ "${{ matrix.compiler }}" = "arm-linux-gnueabihf-g++" ]; then
         sudo apt install g++-arm-linux-gnueabihf;
         ctest -S .ci.cmake -VV --timeout 900 -DCTEST_DISABLE_TESTING=1 "-DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS;-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-linux-arm.cmake";
       else
         ctest -S .ci.cmake -VV --timeout 900 "-DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS";
       fi
      
    - name: Upload Prebuilt Binaries
      uses: actions/upload-artifact@v2
      with:
        name: Linux ${{ matrix.configuration }} ${{ matrix.compiler }} prebuilt binaries
        path: llfio-v2.0-binaries-linux-*.tgz
      
    - name: Upload Test Results
      if: ${{ matrix.compiler != 'arm-linux-gnueabihf-g++' }}
      uses: actions/upload-artifact@v2
      with:
        name: Linux ${{ matrix.configuration }} ${{ matrix.compiler }} test results
        path: prebuilt/merged_junit_results.xml

  publish-test-results:
    name: "Publish Unit Tests Results"
    needs: [Linux]
    runs-on: ubuntu-latest
    if: success() || failure()

    steps:
      - name: Download Artifacts
        uses: actions/download-artifact@v2
        with:
          path: artifacts

      - name: Publish Unit Test Results
        uses: EnricoMi/publish-unit-test-result-action@v1.6
        with:
          check_name: Unit Test Results
          github_token: ${{ secrets.GITHUB_TOKEN }}
          files: '**/merged_junit_results.xml'