Skip to content

ci(action): add release job #180

ci(action): add release job

ci(action): add release job #180

name: Build-and-Test
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
linux-job:
name: Ubuntu
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
include:
- os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch Clang
uses: ./.github/actions/apt-fetch-clang
with:
llvm-ver: 18
- name: Get cmake option
id: cmake-option
run: echo "cmake-option=-DVCPKG_TARGET_TRIPLET=x64-linux-clang-dynamic -DVCPKG_HOST_TRIPLET=x64-linux-clang -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=\"${{ github.workspace }}/.vcpkg/scripts/toolchains/linux-clang.cmake\"" >> $GITHUB_OUTPUT
- name: CMake build and test (Debug)
uses: ./.github/actions/cmake-build-and-test
with:
config-option: ${{ steps.cmake-option.outputs.cmake-option }} -DCODE_COVERAGE_EXT="lcov" -DENABLE_CLANG_TIDY=true
before-build: \cp -rf ./cmake/vcpkg/* ./.vcpkg/
build-dir: .build/Debug
- name: CMake build and test (Release)
uses: ./.github/actions/cmake-build-and-test
with:
build-type: Release
config-option: ${{ steps.cmake-option.outputs.cmake-option }}
build-dir: .build/Release
- name: Codacy Coverage Reporter
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: .build/Debug/tests/stdsharpTestsCoverage.lcov
- name: Codacy Analysis
uses: codacy/codacy-analysis-cli-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
upload: true
run-docker-tools: false
clang-tidy-output: ".build/Debug/cmake-build.log"
windows-job:
name: Windows
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: true
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v4
- name: Update MSVC
uses: ./.github/actions/update-msvc
- uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.40
- name: CMake build and test (Debug)
uses: ./.github/actions/cmake-build-and-test
with:
build-dir: .build/Debug
- name: CMake build and test (Release)
uses: ./.github/actions/cmake-build-and-test
with:
build-type: Release
build-dir: .build/Release