Merge cmake.yml into CITest.yml

This commit is contained in:
MACHIZAUD Andréa 2022-04-11 09:30:54 +02:00
parent e16fd004cd
commit 61ed12c4f2
3 changed files with 67 additions and 70 deletions

View File

@ -118,35 +118,37 @@ jobs:
python cstest_report.py -D -t build/cstest -d ../MC;
python cstest_report.py -D -t build/cstest -f issues.cs; cd ..;
# Windows:
# runs-on: ${{ matrix.config.os }}
# name: ${{ matrix.config.name }}
# strategy:
# fail-fast: false
# matrix:
# config:
# - {
# name: 'windows x64 MSVC 64bit',
# os: windows-latest,
# arch: x64,
# python-arch: x64,
# python-version: '3.9',
# }
Windows:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.name }}
strategy:
fail-fast: false
matrix:
config:
- name: 'windows x64 MSVC 64bit'
os: windows-latest
arch: x64
platform: windows
python-arch: x64
python-version: '3.9'
# steps:
# - uses: actions/checkout@v2
steps:
- uses: actions/checkout@v3
# - name: '🛠️ Win MSVC 64 setup'
# if: contains(matrix.config.name, 'MSVC 64')
# uses: microsoft/setup-msbuild@v1
- uses: lukka/get-cmake@latest
name: Get CMake
# - name: '🚧 Win MSVC 64 build'
# if: contains(matrix.config.name, 'MSVC 64')
# shell: bash
# run: |
# # choco install cmake
# cmake --version
# mkdir build
# cd build
# cmake ..
# cmake --build . --config Release --target install
- name: '🛠️ Win MSVC 64 setup'
if: contains(matrix.config.name, 'MSVC 64')
uses: ilammy/msvc-dev-cmd@v1
with:
arch: 'x64'
- name: '🚧 Win MSVC 64 build'
if: contains(matrix.config.name, 'MSVC 64')
shell: bash
run: |
cmake --version
cmake --preset=${{ matrix.config.platform }}-x64
cmake --build --preset build-${{ matrix.config.platform }}-release
cmake --build --preset install-${{ matrix.config.platform }}-release

View File

@ -1,41 +0,0 @@
name: CMake
on: push
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macOS-latest
- ubuntu-20.04
- windows-2022
include:
- os: windows-2022
platform: windows
- os: ubuntu-20.04
platform: linux
- os: macOS-latest
platform: macos
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
name: Get CMake
- uses: ilammy/msvc-dev-cmd@v1
name: Setup Windows dev environment
with:
arch: 'x64'
if: ${{ matrix.platform == 'windows' }}
- name: 'Configure, Build and Install'
run: |
cmake --preset=${{ matrix.platform }}-x64
cmake --build --preset build-${{ matrix.platform }}
cmake --build --preset install-${{ matrix.platform }}

View File

@ -72,6 +72,24 @@
"nativeToolOptions": [ "-v" ],
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
},
{
"name": "build-linux-release",
"inherits": "build-linux",
"configuration": "Release",
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux"}
},
{
"name": "build-macos-release",
"inherits": "build-macos",
"configuration": "Release",
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin"}
},
{
"name": "build-windows-release",
"inherits": "build-windows",
"configuration": "Release",
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
},
{
"name": "install-linux",
"configurePreset": "linux-x64",
@ -92,6 +110,24 @@
"inherits": "build-windows",
"targets": [ "install" ],
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
},
{
"name": "install-linux-release",
"inherits": "install-linux",
"configuration": "Release",
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux"}
},
{
"name": "install-macos-release",
"inherits": "install-macos",
"configuration": "Release",
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin"}
},
{
"name": "install-windows-release",
"inherits": "install-windows",
"configuration": "Release",
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
}
]
}