From c8f4ae8b03bfe68544bbaeced75a11cef552e55b Mon Sep 17 00:00:00 2001 From: "Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)" Date: Wed, 11 Nov 2020 15:05:51 +0000 Subject: Breakout github action workflow into individual flows. Try again to figure out why clang with libstdc++ is not working on CI. --- .github/workflows/ci.yml | 226 -------------------------------- .github/workflows/documentation.yml | 37 ++++++ .github/workflows/installability.yml | 45 +++++++ .github/workflows/programs.yml | 32 +++++ .github/workflows/unittests_linux.yml | 79 +++++++++++ .github/workflows/unittests_macos.yml | 71 ++++++++++ .github/workflows/unittests_windows.yml | 65 +++++++++ 7 files changed, 329 insertions(+), 226 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/documentation.yml create mode 100644 .github/workflows/installability.yml create mode 100644 .github/workflows/programs.yml create mode 100644 .github/workflows/unittests_linux.yml create mode 100644 .github/workflows/unittests_macos.yml create mode 100644 .github/workflows/unittests_windows.yml (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 7ae2fcad..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,226 +0,0 @@ -name: CI - -on: - push: - branches: - - develop - 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++, clang++-11, 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 }}" = "clang++-11" ]; 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 600 -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 600 "-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-x64.tgz - - - name: Upload Test Results - if: always() - uses: actions/upload-artifact@v2 - with: - name: Linux ${{ matrix.configuration }} ${{ matrix.compiler }} test results - path: prebuilt/merged_junit_results.xml - - MacOS: - name: Mac OS 10.15 - runs-on: macos-10.15 - strategy: - fail-fast: false - matrix: - configuration: [error_code, status_code] - env: - NAME: MacOS-${{ matrix.configuration }} - - steps: - - uses: actions/checkout@v2 - - - name: CMake tests Mac OS - shell: bash - run: | - if [ "${{ matrix.configuration }}" = "status_code" ]; then - export CMAKE_CONFIGURE_OPTIONS="-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON" - fi - ctest -S .ci.cmake -VV -E noexcept --timeout 600 "-DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS" - - - name: Upload Prebuilt Binaries - uses: actions/upload-artifact@v2 - with: - name: Mac OS ${{ matrix.configuration }} prebuilt binaries - path: llfio-v2.0-binaries-darwin-x64.tgz - - - name: Upload Test Results - if: always() - uses: actions/upload-artifact@v2 - with: - name: Mac OS ${{ matrix.configuration }} test results - path: prebuilt/merged_junit_results.xml - - WinVS2019: - name: Windows VS2019 - runs-on: windows-2019 - strategy: - fail-fast: false - matrix: - configuration: [error_code, status_code] - env: - NAME: WinVS2019-${{ matrix.configuration }} - - steps: - - uses: actions/checkout@v2 - - - name: CMake tests Windows - shell: bash - run: | - if [ "${{ matrix.configuration }}" = "status_code" ]; then - export CMAKE_CONFIGURE_OPTIONS="-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON" - fi - ctest -S .ci.cmake -VV --timeout 600 "-DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS" - - - name: Upload Prebuilt Binaries - uses: actions/upload-artifact@v2 - with: - name: Windows VS2019 ${{ matrix.configuration }} prebuilt binaries - path: llfio-v2.0-binaries-win64.zip - - - name: Upload Test Results - if: always() - uses: actions/upload-artifact@v2 - with: - name: Windows VS2019 ${{ matrix.configuration }} test results - path: prebuilt/merged_junit_results.xml - - publish-test-results: - name: "Publish Documentation and Unit Tests Results" - needs: [Linux, MacOS, WinVS2019] - runs-on: ubuntu-latest - if: success() || failure() - env: - NAME: Documentation - - 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.3 - with: - check_name: Unit Test Results - github_token: ${{ secrets.GITHUB_TOKEN }} - files: '**/merged_junit_results.xml' - - - name: Checkout Documentation - uses: actions/checkout@v2 - with: - fetch-depth: 0 - submodules: recursive - - - name: Regenerate Documentation - shell: bash - run: | - sudo apt-get install -y doxygen graphviz - ctest -S .docs.cmake -V - - - name: Publish Documentation - uses: JamesIves/github-pages-deploy-action@3.7.1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: doc/html - CLEAN: true - - installability: - name: "Installability" - strategy: - fail-fast: false - matrix: - os: [ubuntu-18.04, macos-10.15, windows-2019] - configuration: [error_code, status_code] - env: - NAME: Install-${{ matrix.os }}-${{ matrix.configuration }} - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - - name: Install - shell: bash - run: | - git config --global core.longpaths true - if [ "${{ matrix.configuration }}" = "status_code" ]; then - export CMAKE_CONFIGURE_OPTIONS="-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON" - fi - git clone --depth 1 https://github.com/ned14/quickcpplib.git - pip install --user gitpython - python quickcpplib/scripts/test_cpp-pm_install.py test-packaging/example.cpp quickcpplib quickcpplib::hl https://github.com/ned14/quickcpplib master outcome outcome::hl https://github.com/ned14/outcome better_optimisation llfio llfio::sl https://github.com/ned14/llfio develop - cd test_cpp-pm_install - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release $CMAKE_CONFIGURE_OPTIONS - cmake --build . - - programs: - name: "Programs" - strategy: - fail-fast: false - matrix: - os: [ubuntu-18.04, macos-10.15, windows-2019] - env: - NAME: Programs-${{ matrix.os }} - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v2 - - - name: Build - shell: bash - run: | - cd programs - mkdir build - cd build - cmake .. $CMAKE_CONFIGURE_OPTIONS -DCMAKE_BUILD_TYPE=Release - cmake --build . diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..2dfccb1e --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,37 @@ +name: Documentation + +on: + push: + branches: + - develop + pull_request: + schedule: + - cron: '0 0 1 * *' + +jobs: + documentation: + name: "Regenerate and publish Documentation" + runs-on: ubuntu-latest + env: + NAME: Documentation + + steps: + - name: Checkout Documentation + uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: recursive + + - name: Regenerate Documentation + shell: bash + run: | + sudo apt-get install -y doxygen graphviz + ctest -S .docs.cmake -V + + - name: Publish Documentation + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: doc/html + CLEAN: true diff --git a/.github/workflows/installability.yml b/.github/workflows/installability.yml new file mode 100644 index 00000000..f501ab8c --- /dev/null +++ b/.github/workflows/installability.yml @@ -0,0 +1,45 @@ +name: Installability + +on: + push: + branches: + - develop + pull_request: + schedule: + - cron: '0 0 1 * *' + +jobs: + installability: + name: "Installability" + strategy: + fail-fast: false + matrix: + os: [ubuntu-18.04, macos-10.15, windows-2019] + configuration: [error_code, status_code] + env: + NAME: Install-${{ matrix.os }}-${{ matrix.configuration }} + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install + shell: bash + run: | + git config --global core.longpaths true + if [ "${{ matrix.configuration }}" = "status_code" ]; then + export CMAKE_CONFIGURE_OPTIONS="-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON" + fi + git clone --depth 1 https://github.com/ned14/quickcpplib.git + pip install --user gitpython + python quickcpplib/scripts/test_cpp-pm_install.py test-packaging/example.cpp quickcpplib quickcpplib::hl https://github.com/ned14/quickcpplib master outcome outcome::hl https://github.com/ned14/outcome better_optimisation llfio llfio::sl https://github.com/ned14/llfio develop + cd test_cpp-pm_install + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release $CMAKE_CONFIGURE_OPTIONS + cmake --build . diff --git a/.github/workflows/programs.yml b/.github/workflows/programs.yml new file mode 100644 index 00000000..eaf5b1c2 --- /dev/null +++ b/.github/workflows/programs.yml @@ -0,0 +1,32 @@ +name: Programs + +on: + push: + branches: + - develop + pull_request: + schedule: + - cron: '0 0 1 * *' + +jobs: + programs: + name: "Programs" + strategy: + fail-fast: false + matrix: + os: [ubuntu-18.04, macos-10.15, windows-2019] + env: + NAME: Programs-${{ matrix.os }} + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Build + shell: bash + run: | + cd programs + mkdir build + cd build + cmake .. $CMAKE_CONFIGURE_OPTIONS -DCMAKE_BUILD_TYPE=Release + cmake --build . diff --git a/.github/workflows/unittests_linux.yml b/.github/workflows/unittests_linux.yml new file mode 100644 index 00000000..4149f40d --- /dev/null +++ b/.github/workflows/unittests_linux.yml @@ -0,0 +1,79 @@ +name: Unit tests Linux + +on: + push: + branches: + - develop + 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++, clang++-11, 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 }}" = "clang++-11" ]; 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.3 + with: + check_name: Unit Test Results + github_token: ${{ secrets.GITHUB_TOKEN }} + files: '**/merged_junit_results.xml' diff --git a/.github/workflows/unittests_macos.yml b/.github/workflows/unittests_macos.yml new file mode 100644 index 00000000..7864bb9f --- /dev/null +++ b/.github/workflows/unittests_macos.yml @@ -0,0 +1,71 @@ +name: Unit tests Mac OS + +on: + push: + branches: + - develop + pull_request: + schedule: + - cron: '0 0 1 * *' + +jobs: + MacOS: + name: Mac OS 10.15 + runs-on: macos-10.15 + strategy: + fail-fast: false + matrix: + configuration: [error_code, status_code] + env: + NAME: MacOS-${{ matrix.configuration }} + + steps: + - uses: actions/checkout@v2 + + - name: CMake tests Mac OS + shell: bash + run: | + if [ "${{ matrix.configuration }}" = "status_code" ]; then + export CMAKE_CONFIGURE_OPTIONS="-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON" + fi + ctest -S .ci.cmake -VV -E noexcept --timeout 900 "-DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS" + + - name: Upload Prebuilt Binaries + uses: actions/upload-artifact@v2 + with: + name: Mac OS ${{ matrix.configuration }} prebuilt binaries + path: llfio-v2.0-binaries-darwin-x64.tgz + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v2 + with: + name: Mac OS ${{ matrix.configuration }} test results + path: prebuilt/merged_junit_results.xml + + publish-test-results: + name: "Publish Unit Tests Results" + needs: [MacOS] + runs-on: ubuntu-latest + if: success() || failure() + env: + NAME: Documentation + + 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.3 + with: + check_name: Unit Test Results + github_token: ${{ secrets.GITHUB_TOKEN }} + files: '**/merged_junit_results.xml' + + - name: Checkout Documentation + uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: recursive diff --git a/.github/workflows/unittests_windows.yml b/.github/workflows/unittests_windows.yml new file mode 100644 index 00000000..ba4ec7dd --- /dev/null +++ b/.github/workflows/unittests_windows.yml @@ -0,0 +1,65 @@ +name: Unit tests Windows + +on: + push: + branches: + - develop + pull_request: + schedule: + - cron: '0 0 1 * *' + +jobs: + WinVS2019: + name: Windows VS2019 + runs-on: windows-2019 + strategy: + fail-fast: false + matrix: + configuration: [error_code, status_code] + env: + NAME: WinVS2019-${{ matrix.configuration }} + + steps: + - uses: actions/checkout@v2 + + - name: CMake tests Windows + shell: bash + run: | + if [ "${{ matrix.configuration }}" = "status_code" ]; then + export CMAKE_CONFIGURE_OPTIONS="-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON" + fi + ctest -S .ci.cmake -VV --timeout 900 "-DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS" + + - name: Upload Prebuilt Binaries + uses: actions/upload-artifact@v2 + with: + name: Windows VS2019 ${{ matrix.configuration }} prebuilt binaries + path: llfio-v2.0-binaries-win64.zip + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v2 + with: + name: Windows VS2019 ${{ matrix.configuration }} test results + path: prebuilt/merged_junit_results.xml + + publish-test-results: + name: "Publish Unit Tests Results" + needs: [WinVS2019] + runs-on: ubuntu-latest + if: success() || failure() + env: + NAME: Documentation + + 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.3 + with: + check_name: Unit Test Results + github_token: ${{ secrets.GITHUB_TOKEN }} + files: '**/merged_junit_results.xml' -- cgit v1.2.3