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 name: ubuntu-latest-clang-ci
on: on:
workflow_dispatch:
push: push:
branches: branches:
- master - master
@ -23,20 +25,22 @@ jobs:
strategy: strategy:
matrix: 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 runs-on: ubuntu-latest
name: Clang ${{ matrix.version }} name: "Clang ${{matrix.version}}: ${{matrix.type}}"
container: container:
image: teeks99/clang-ubuntu:${{ matrix.version }} image: silkeh/clang:${{matrix.version}}
options: -v /usr/local:/host_usr_local options: -v /usr/local:/host_usr_local
env: env:
CC: clang-${{ matrix.version }} CC: clang
CXX: clang++-${{ matrix.version }} CXX: clang++
CXXFLAGS: -stdlib=libc++ CXXFLAGS: -stdlib=libc++
steps: steps:
@ -55,7 +59,7 @@ jobs:
script/ci_install_deps.sh script/ci_install_deps.sh
- name: Configure - 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 - name: Build
run: cmake --build build -j ${{steps.cores.outputs.count}} run: cmake --build build -j ${{steps.cores.outputs.count}}

View File

@ -1,6 +1,8 @@
name: ubuntu-latest-gcc-ci name: ubuntu-latest-gcc-ci
on: on:
workflow_dispatch:
push: push:
branches: branches:
- master - master
@ -23,15 +25,15 @@ jobs:
strategy: strategy:
matrix: matrix:
version: [10, 9, 8] version: ['latest', '12', '11', '10', '9', '8']
type: [Release, Debug]
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: GCC ${{ matrix.version }} name: "GCC ${{matrix.version}}: ${{matrix.type}}"
container: container:
image: gcc:${{matrix.version}} image: gcc:${{matrix.version}}
options: -v /usr/local:/host_usr_local options: -v /usr/local:/host_usr_local
steps: steps:
@ -47,7 +49,7 @@ jobs:
run: script/ci_install_deps.sh run: script/ci_install_deps.sh
- name: Configure - 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 - name: Build
run: cmake --build build -j ${{steps.cores.outputs.count}} run: cmake --build build -j ${{steps.cores.outputs.count}}

View File

@ -1,6 +1,8 @@
name: ubuntu-latest-icc-ci name: ubuntu-latest-icc-ci
on: on:
workflow_dispatch:
push: push:
branches: branches:
- master - master
@ -27,6 +29,7 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults: defaults:
run: run:
shell: bash shell: bash
@ -50,7 +53,8 @@ jobs:
compiler-${{hashFiles('**/scripts/cache_exclude_linux.sh')}} compiler-${{hashFiles('**/scripts/cache_exclude_linux.sh')}}
- name: Install icc - name: Install icc
run: script/ci_install_icc.sh $LINUX_HPCKIT_URL $LINUX_CPP_COMPONENTS_WEB run: >-
script/ci_install_icc.sh $LINUX_HPCKIT_URL $LINUX_CPP_COMPONENTS_WEB
- name: CMake - name: CMake
run: echo "/host_usr_local/bin" >> $GITHUB_PATH run: echo "/host_usr_local/bin" >> $GITHUB_PATH

View File

@ -1,6 +1,8 @@
name: win-msvc-ci name: win-msvc-ci
on: on:
workflow_dispatch:
push: push:
branches: branches:
- master - master
@ -25,8 +27,6 @@ jobs:
run: run:
shell: bash shell: bash
runs-on: ${{ matrix.config.os }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -40,6 +40,8 @@ jobs:
build: [Debug, Release] build: [Debug, Release]
platform: [Win32, x64] platform: [Win32, x64]
runs-on: ${{matrix.config.os}}
name: "${{matrix.config.vs}}: ${{matrix.platform}}: ${{matrix.build}}" name: "${{matrix.config.vs}}: ${{matrix.platform}}: ${{matrix.build}}"
steps: steps:

View File

@ -1,6 +1,8 @@
name: win-msys2-clang-ci name: win-msys2-clang-ci
on: on:
workflow_dispatch:
push: push:
branches: branches:
- master - master
@ -21,45 +23,42 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip ci]') && ! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
name: ${{ matrix.msystem }}
runs-on: windows-latest
defaults: defaults:
run: run:
shell: msys2 {0} shell: msys2 {0}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
include: os: [windows-2019, windows-latest]
type: [Release, Debug]
config:
- msystem: "MINGW64" - msystem: "MINGW64"
install: >- 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 mingw-w64-x86_64-clang
type: Release
- msystem: "MINGW32" - msystem: "MINGW32"
install: >- install: >-
git mingw-w64-i686-cmake mingw-w64-i686-ninja git mingw-w64-i686-cmake mingw-w64-i686-ninja
mingw-w64-i686-clang mingw-w64-i686-clang
type: Release
- msystem: "MINGW64" runs-on: ${{matrix.os}}
install: >-
git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja name: "${{matrix.config.msystem}}: ${{matrix.os}}: ${{matrix.type}}"
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
env: env:
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
with: with:
update: true update: true
msystem: ${{ matrix.msystem }} msystem: ${{matrix.config.msystem}}
install: ${{ matrix.install }} install: ${{matrix.config.install}}
- name: Install dependencies - name: Install dependencies
run: script/ci_install_deps.sh run: script/ci_install_deps.sh
@ -67,7 +66,7 @@ jobs:
- name: Configure - name: Configure
run: >- run: >-
cmake -DCMAKE_CXX_COMPILER=clang++ -S test -B build cmake -DCMAKE_CXX_COMPILER=clang++ -S test -B build
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=${{matrix.type}}
- name: Build - name: Build
run: cmake --build build -j ${{steps.cores.outputs.count}} run: cmake --build build -j ${{steps.cores.outputs.count}}

View File

@ -1,6 +1,8 @@
name: win-msys2-gcc-ci name: win-msys2-gcc-ci
on: on:
workflow_dispatch:
push: push:
branches: branches:
- master - master
@ -21,51 +23,48 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip ci]') && ! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
name: ${{ matrix.msystem }}
runs-on: windows-latest
defaults: defaults:
run: run:
shell: msys2 {0} shell: msys2 {0}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
include: os: [windows-2019, windows-latest]
type: [Release, Debug]
config:
- msystem: "MINGW64" - msystem: "MINGW64"
install: >- 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 mingw-w64-x86_64-gcc
type: Release
- msystem: "MINGW32" - msystem: "MINGW32"
install: >- install: >-
git mingw-w64-i686-cmake mingw-w64-i686-ninja git mingw-w64-i686-cmake mingw-w64-i686-ninja
mingw-w64-i686-gcc mingw-w64-i686-gcc
type: Release
- msystem: "MINGW64" runs-on: ${{matrix.os}}
install: >-
git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja name: "${{matrix.config.msystem}}: ${{matrix.os}}: ${{matrix.type}}"
mingw-w64-x86_64-gcc
type: Debug
- msystem: "MINGW32"
install: >-
git mingw-w64-i686-cmake mingw-w64-i686-ninja
mingw-w64-i686-gcc
type: Debug
env: env:
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
with: with:
update: true update: true
msystem: ${{ matrix.msystem }} msystem: ${{matrix.config.msystem}}
install: ${{ matrix.install }} install: ${{matrix.config.install}}
- name: Install dependencies - name: Install dependencies
run: script/ci_install_deps.sh run: script/ci_install_deps.sh
- name: Configure - 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 - name: Build
run: cmake --build build -j ${{steps.cores.outputs.count}} run: cmake --build build -j ${{steps.cores.outputs.count}}