Merge pull request #29 from red0124/improvement/ci_update

Improvement/ci update
This commit is contained in:
red0124 2023-08-07 19:56:12 +02:00 committed by GitHub
commit 34833837ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 155 additions and 94 deletions

51
.github/workflows/single-header.yml vendored Normal file
View File

@ -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

View File

@ -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}}

View File

@ -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}}

View File

@ -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}}

View File

@ -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

View File

@ -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}}

View File

@ -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}}