diff --git a/.github/workflows/single-header.yml b/.github/workflows/single-header.yml new file mode 100644 index 0000000..cb117fa --- /dev/null +++ b/.github/workflows/single-header.yml @@ -0,0 +1,51 @@ +name: single-header-ci + +on: + workflow_dispatch: + + push: + branches: + - master + - feature/** + - improvement/** + - bugfix/** + + pull_request: + branches: + - master + - feature/** + - improvement/** + - bugfix/** + +jobs: + single_header_tests: + if: >- + ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && + ! contains(toJSON(github.event.commits.*.message), '[skip github]') + + runs-on: ubuntu-latest + + name: "Single Header Test" + + container: + image: gcc:latest + options: -v /usr/local:/host_usr_local + + steps: + - uses: actions/checkout@v1 + + - uses: friendlyanon/fetch-core-count@v1 + id: cores + + - name: Install dependencies + run: | + apt-get update + apt-get install -y git + + - name: Single header update check + run: | + script/single_header_generator.py > tmp.hpp + diff ssp.hpp tmp.hpp + + - name: Single header compile check + run: ./test/test_single_header.sh diff --git a/.github/workflows/ubuntu-latest-clang.yml b/.github/workflows/ubuntu-latest-clang.yml index a01c763..af97cab 100644 --- a/.github/workflows/ubuntu-latest-clang.yml +++ b/.github/workflows/ubuntu-latest-clang.yml @@ -1,6 +1,8 @@ name: ubuntu-latest-clang-ci on: + workflow_dispatch: + push: branches: - master @@ -23,20 +25,22 @@ jobs: strategy: matrix: - version: [11, 10, 9, 8, 7] + # cmake clang12 is not able to compile a simple test program. + # /usr/bin/ld: cannot find -lunwind + version: ['latest', '15', '14', '13', '11', '10', '9', '8', '7'] + type: [Release, Debug] runs-on: ubuntu-latest - name: Clang ${{ matrix.version }} + name: "Clang ${{matrix.version}}: ${{matrix.type}}" container: - image: teeks99/clang-ubuntu:${{ matrix.version }} - + image: silkeh/clang:${{matrix.version}} options: -v /usr/local:/host_usr_local env: - CC: clang-${{ matrix.version }} - CXX: clang++-${{ matrix.version }} + CC: clang + CXX: clang++ CXXFLAGS: -stdlib=libc++ steps: @@ -55,11 +59,11 @@ jobs: script/ci_install_deps.sh - name: Configure - run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug + run: cmake -S test -B build -DCMAKE_BUILD_TYPE=${{matrix.type}} - name: Build - run: cmake --build build -j ${{ steps.cores.outputs.count }} + run: cmake --build build -j ${{steps.cores.outputs.count}} - name: Run working-directory: build - run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} + run: ctest --output-on-failure -j ${{steps.cores.outputs.count}} diff --git a/.github/workflows/ubuntu-latest-gcc.yml b/.github/workflows/ubuntu-latest-gcc.yml index 04959e6..988c4b5 100644 --- a/.github/workflows/ubuntu-latest-gcc.yml +++ b/.github/workflows/ubuntu-latest-gcc.yml @@ -1,6 +1,8 @@ name: ubuntu-latest-gcc-ci on: + workflow_dispatch: + push: branches: - master @@ -23,15 +25,15 @@ jobs: strategy: matrix: - version: [10, 9, 8] + version: ['latest', '12', '11', '10', '9', '8'] + type: [Release, Debug] runs-on: ubuntu-latest - name: GCC ${{ matrix.version }} + name: "GCC ${{matrix.version}}: ${{matrix.type}}" container: - image: gcc:${{ matrix.version }} - + image: gcc:${{matrix.version}} options: -v /usr/local:/host_usr_local steps: @@ -47,11 +49,11 @@ jobs: run: script/ci_install_deps.sh - name: Configure - run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug + run: cmake -S test -B build -D CMAKE_BUILD_TYPE=${{matrix.type}} - name: Build - run: cmake --build build -j ${{ steps.cores.outputs.count }} + run: cmake --build build -j ${{steps.cores.outputs.count}} - name: Run working-directory: build - run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} + run: ctest --output-on-failure -j ${{steps.cores.outputs.count}} diff --git a/.github/workflows/ubuntu-latest-icc.yml b/.github/workflows/ubuntu-latest-icc.yml index 4bd3b0d..7589198 100644 --- a/.github/workflows/ubuntu-latest-icc.yml +++ b/.github/workflows/ubuntu-latest-icc.yml @@ -1,6 +1,8 @@ name: ubuntu-latest-icc-ci on: + workflow_dispatch: + push: branches: - master @@ -17,7 +19,7 @@ on: env: LINUX_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17431/l_BaseKit_p_2021.1.0.2659_offline.sh - LINUX_HPCKIT_URL: + LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17427/l_HPCKit_p_2021.1.0.2684_offline.sh jobs: @@ -27,6 +29,7 @@ jobs: ! contains(toJSON(github.event.commits.*.message), '[skip github]') runs-on: ubuntu-latest + defaults: run: shell: bash @@ -36,38 +39,39 @@ jobs: options: -v /usr/local:/host_usr_local steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: cache install - id: cache-install - uses: actions/cache@v2 - with: - path: | - /opt/intel/oneapi/compiler - key: >- - install-${{ env.LINUX_HPCKIT_URL }}- - ${{ env.LINUX_CPP_COMPONENTS_WEB }}- - compiler-${{ hashFiles('**/scripts/cache_exclude_linux.sh') }} + - name: cache install + id: cache-install + uses: actions/cache@v2 + with: + path: | + /opt/intel/oneapi/compiler + key: >- + install-${{env.LINUX_HPCKIT_URL}}- + ${{env.LINUX_CPP_COMPONENTS_WEB}}- + compiler-${{hashFiles('**/scripts/cache_exclude_linux.sh')}} - - name: Install icc - run: script/ci_install_icc.sh $LINUX_HPCKIT_URL $LINUX_CPP_COMPONENTS_WEB + - name: Install icc + run: >- + script/ci_install_icc.sh $LINUX_HPCKIT_URL $LINUX_CPP_COMPONENTS_WEB - - name: CMake - run: echo "/host_usr_local/bin" >> $GITHUB_PATH + - name: CMake + run: echo "/host_usr_local/bin" >> $GITHUB_PATH - - name: Install dependencies - run: script/ci_install_deps.sh + - name: Install dependencies + run: script/ci_install_deps.sh - - name: Configure - run: >- - source script/ci_setup_icc.sh && - cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug + - name: Configure + run: >- + source script/ci_setup_icc.sh && + cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug - - name: Build - run: >- - source script/ci_setup_icc.sh && - cmake --build build -j ${{ steps.cores.outputs.count }} + - name: Build + run: >- + source script/ci_setup_icc.sh && + cmake --build build -j ${{steps.cores.outputs.count}} - - name: Run - working-directory: build - run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} + - name: Run + working-directory: build + run: ctest --output-on-failure -j ${{steps.cores.outputs.count}} diff --git a/.github/workflows/win-msvc.yml b/.github/workflows/win-msvc.yml index 5311925..692af83 100644 --- a/.github/workflows/win-msvc.yml +++ b/.github/workflows/win-msvc.yml @@ -1,6 +1,8 @@ name: win-msvc-ci on: + workflow_dispatch: + push: branches: - master @@ -25,8 +27,6 @@ jobs: run: shell: bash - runs-on: ${{ matrix.config.os }} - strategy: fail-fast: false matrix: @@ -40,7 +40,9 @@ jobs: build: [Debug, Release] platform: [Win32, x64] - name: "${{matrix.config.vs}}:${{matrix.platform}}:${{matrix.build}}" + runs-on: ${{matrix.config.os}} + + name: "${{matrix.config.vs}}: ${{matrix.platform}}: ${{matrix.build}}" steps: - name: checkout diff --git a/.github/workflows/win-msys2-clang.yml b/.github/workflows/win-msys2-clang.yml index c13b862..1dc25d8 100644 --- a/.github/workflows/win-msys2-clang.yml +++ b/.github/workflows/win-msys2-clang.yml @@ -1,6 +1,8 @@ name: win-msys2-clang-ci on: + workflow_dispatch: + push: branches: - master @@ -21,57 +23,54 @@ jobs: ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && ! contains(toJSON(github.event.commits.*.message), '[skip github]') - name: ${{ matrix.msystem }} - runs-on: windows-latest defaults: run: shell: msys2 {0} + strategy: fail-fast: false + matrix: - include: + os: [windows-2019, windows-latest] + type: [Release, Debug] + config: - msystem: "MINGW64" install: >- - git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja + git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang - type: Release + - msystem: "MINGW32" install: >- - git mingw-w64-i686-cmake mingw-w64-i686-ninja + git mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-clang - type: Release - - msystem: "MINGW64" - install: >- - git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja - mingw-w64-x86_64-clang - type: Debug - - msystem: "MINGW32" - install: >- - git mingw-w64-i686-cmake mingw-w64-i686-ninja - mingw-w64-i686-clang - type: Debug + + runs-on: ${{matrix.os}} + + name: "${{matrix.config.msystem}}: ${{matrix.os}}: ${{matrix.type}}" + env: CMAKE_GENERATOR: Ninja steps: - uses: actions/checkout@v2 + - uses: msys2/setup-msys2@v2 with: update: true - msystem: ${{ matrix.msystem }} - install: ${{ matrix.install }} + msystem: ${{matrix.config.msystem}} + install: ${{matrix.config.install}} - name: Install dependencies run: script/ci_install_deps.sh - name: Configure - run: >- - cmake -DCMAKE_CXX_COMPILER=clang++ -S test -B build - -DCMAKE_BUILD_TYPE=Debug + run: >- + cmake -DCMAKE_CXX_COMPILER=clang++ -S test -B build + -DCMAKE_BUILD_TYPE=${{matrix.type}} - name: Build - run: cmake --build build -j ${{ steps.cores.outputs.count }} + run: cmake --build build -j ${{steps.cores.outputs.count}} - name: Run working-directory: build - run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} + run: ctest --output-on-failure -j ${{steps.cores.outputs.count}} diff --git a/.github/workflows/win-msys2-gcc.yml b/.github/workflows/win-msys2-gcc.yml index e4c6795..01d6906 100644 --- a/.github/workflows/win-msys2-gcc.yml +++ b/.github/workflows/win-msys2-gcc.yml @@ -1,6 +1,8 @@ name: win-msys2-gcc-ci on: + workflow_dispatch: + push: branches: - master @@ -21,55 +23,52 @@ jobs: ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && ! contains(toJSON(github.event.commits.*.message), '[skip github]') - name: ${{ matrix.msystem }} - runs-on: windows-latest defaults: run: shell: msys2 {0} + strategy: fail-fast: false + matrix: - include: + os: [windows-2019, windows-latest] + type: [Release, Debug] + config: - msystem: "MINGW64" install: >- - git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja + git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc - type: Release - - msystem: "MINGW32" - install: >- - git mingw-w64-i686-cmake mingw-w64-i686-ninja - mingw-w64-i686-gcc - type: Release - - msystem: "MINGW64" - install: >- - git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja - mingw-w64-x86_64-gcc - type: Debug + - msystem: "MINGW32" install: >- - git mingw-w64-i686-cmake mingw-w64-i686-ninja + git mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-gcc - type: Debug + + runs-on: ${{matrix.os}} + + name: "${{matrix.config.msystem}}: ${{matrix.os}}: ${{matrix.type}}" + env: CMAKE_GENERATOR: Ninja steps: - uses: actions/checkout@v2 + - uses: msys2/setup-msys2@v2 with: update: true - msystem: ${{ matrix.msystem }} - install: ${{ matrix.install }} + msystem: ${{matrix.config.msystem}} + install: ${{matrix.config.install}} - name: Install dependencies run: script/ci_install_deps.sh - name: Configure - run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug + run: cmake -S test -B build -D CMAKE_BUILD_TYPE=${{matrix.type}} - name: Build - run: cmake --build build -j ${{ steps.cores.outputs.count }} + run: cmake --build build -j ${{steps.cores.outputs.count}} - name: Run working-directory: build - run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} + run: ctest --output-on-failure -j ${{steps.cores.outputs.count}}