update ci
This commit is contained in:
parent
31ac2b3273
commit
8a6813f242
3 changed files with 25 additions and 20 deletions
10
.github/workflows/macos.yml
vendored
10
.github/workflows/macos.yml
vendored
|
@ -2,9 +2,11 @@ name: macos
|
|||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{matrix.config.os}}
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -12,7 +14,7 @@ jobs:
|
|||
- { os: macos-11 } # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode
|
||||
- { os: macos-12 } # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#xcode
|
||||
|
||||
name: "${{matrix.config.os}}"
|
||||
name: "${{ matrix.config.os }}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
@ -22,7 +24,7 @@ jobs:
|
|||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . --config Release
|
||||
cmake --build . -j 4 --config Release
|
||||
ctest --output-on-failure -C Release
|
||||
|
||||
- name: Build Debug
|
||||
|
@ -31,5 +33,5 @@ jobs:
|
|||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||
cmake --build . --config Debug
|
||||
cmake --build . -j 4 --config Debug
|
||||
ctest --output-on-failure -C Debug
|
||||
|
|
20
.github/workflows/ubuntu.yml
vendored
20
.github/workflows/ubuntu.yml
vendored
|
@ -2,6 +2,8 @@ name: ubuntu
|
|||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
ubuntu:
|
||||
runs-on: ubuntu-20.04
|
||||
|
@ -21,13 +23,13 @@ jobs:
|
|||
- { cc: "clang-15", cxx: "clang++-15" }
|
||||
- { cc: "clang-16", cxx: "clang++-16" }
|
||||
|
||||
name: "${{matrix.compiler.cc}}"
|
||||
name: "${{ matrix.compiler.cc }}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Configure clang
|
||||
run: |
|
||||
if [[ "${{matrix.compiler.cc}}" == "clang"* ]]; then
|
||||
if [[ "${{ matrix.compiler.cc }}" == "clang"* ]]; then
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
|
||||
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-9 main"
|
||||
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main"
|
||||
|
@ -39,15 +41,15 @@ jobs:
|
|||
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main"
|
||||
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main"
|
||||
sudo apt update
|
||||
sudo apt install ${{matrix.compiler.cc}} -y
|
||||
sudo apt install ${{ matrix.compiler.cc }} -y
|
||||
fi
|
||||
|
||||
- name: Configure gcc
|
||||
run: |
|
||||
if [[ "${{matrix.compiler.cc}}" == "gcc"* ]]; then
|
||||
if [[ "${{ matrix.compiler.cc }}" == "gcc"* ]]; then
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
sudo apt update
|
||||
sudo apt install ${{matrix.compiler.cxx}} -y
|
||||
sudo apt install ${{ matrix.compiler.cxx }} -y
|
||||
fi
|
||||
|
||||
- name: Build Release
|
||||
|
@ -55,8 +57,8 @@ jobs:
|
|||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
|
||||
cmake --build . --config Release
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }}
|
||||
cmake --build . -j 4 --config Release
|
||||
ctest --output-on-failure -C Release
|
||||
|
||||
- name: Build Debug
|
||||
|
@ -64,6 +66,6 @@ jobs:
|
|||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
|
||||
cmake --build . --config Debug
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }}
|
||||
cmake --build . -j 4 --config Debug
|
||||
ctest --output-on-failure -C Debug
|
||||
|
|
15
.github/workflows/windows.yml
vendored
15
.github/workflows/windows.yml
vendored
|
@ -2,9 +2,11 @@ name: windows
|
|||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{matrix.config.os}}
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -12,7 +14,7 @@ jobs:
|
|||
- { os: windows-2019, vs: "Visual Studio 2019" } # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#visual-studio-enterprise-2019
|
||||
- { os: windows-2022, vs: "Visual Studio 2022" } # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md#visual-studio-enterprise-2022
|
||||
|
||||
name: "${{matrix.config.vs}}"
|
||||
name: "${{ matrix.config.vs }}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
@ -23,9 +25,9 @@ jobs:
|
|||
mkdir build
|
||||
cd build
|
||||
cmake .. -A Win32
|
||||
cmake --build . --config Release
|
||||
cmake --build . -j 4 --config Release
|
||||
ctest --output-on-failure -C Release
|
||||
cmake --build . --config Debug
|
||||
cmake --build . -j 4 --config Debug
|
||||
ctest --output-on-failure -C Debug
|
||||
|
||||
- name: Build x64
|
||||
|
@ -35,8 +37,7 @@ jobs:
|
|||
mkdir build
|
||||
cd build
|
||||
cmake .. -A x64
|
||||
cmake --build . --config Release
|
||||
cmake --build . -j 4 --config Release
|
||||
ctest --output-on-failure -C Release
|
||||
cmake --build . --config Debug
|
||||
cmake --build . -j 4 --config Debug
|
||||
ctest --output-on-failure -C Debug
|
||||
|
||||
|
|
Loading…
Reference in a new issue