Jbl/1036970 lax check for duplicate subblocks #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CMake Build | |
on: | |
push: | |
branches: ["main"] # run only when merge with main branch | |
pull_request: | |
branches: ["main"] # run only when merge with main branch | |
permissions: | |
contents: read | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
# or setup build type in the matrix | |
BUILD_TYPE: Release | |
jobs: | |
build-tests: | |
name: ${{matrix.config.name}} | |
runs-on: ${{matrix.config.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: # Create matrix with combinations of compiler and options. | |
# Notes: | |
# - the property 'package' is controlling whether the build-time-dependencies (i.e. eigen3, cli11, catch2) are pulled in via the | |
# system's package manager or via CMake at build-time. | |
# - { | |
# name: windows-64-release-msvc-package-off, | |
# os: windows-latest, | |
# platform: x64-windows, | |
# package: OFF | |
# } | |
# - { | |
# name: ubuntu-release-package-off, | |
# os: ubuntu-latest, | |
# platform: x64-linux, | |
# package: OFF | |
# } | |
- { | |
name: windows-64-release-msvc-package-on, | |
os: windows-latest, | |
platform: x64-windows-static, | |
package: ON, | |
path-cache: '${{ github.workspace }}\vcpkg\installed', | |
path-toolchain: 'C:/vcpkg/scripts/buildsystems/vcpkg.cmake', | |
os-id: 'linux' | |
} | |
- { | |
name: ubuntu-release-package-on, | |
os: ubuntu-latest, | |
platform: x64-linux, | |
package: ON, | |
path-cache: '/usr/local/share/vcpkg/installed', | |
path-toolchain: '/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake', | |
os-id: 'windows' | |
} | |
steps: | |
- name: Checkout the source codes. | |
uses: actions/checkout@v3 | |
- uses: ./.github/actions/cmake-build | |
with: | |
path-cache: ${{matrix.config.path-cache}} | |
path-toolchain: ${{matrix.config.path-toolchain}} | |
os-id: ${{matrix.config.os-id}} | |
build-type: ${{env.BUILD_TYPE}} | |
package: ${{matrix.config.package}} | |
platform: ${{matrix.config.platform}} | |
- name: Run unit tests | |
working-directory: ${{github.workspace}}/build | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest -C ${{env.BUILD_TYPE}} | |
- name: Prepare licenses | |
working-directory: ${{github.workspace}} | |
shell: bash | |
run: | | |
mkdir ./czicompress-${{matrix.config.name}} | |
cp -R ./THIRD_PARTY_LICENSES_ARTIFACT_DISTRIBUTION.txt ./czicompress-${{matrix.config.name}}/ | |
cp -R ./build/app/THIRD_PARTY_LICENSES.txt ./czicompress-${{matrix.config.name}}/ | |
# gather the binaries | |
- name: Prepare Linux binaries | |
if: matrix.config.os == 'ubuntu-latest' | |
working-directory: ${{github.workspace}} | |
shell: bash | |
run: | | |
cp ./build/app/czicompress ./build/capi/libczicompressc.so ./czicompress-${{matrix.config.name}}/ | |
- name: Prepare Windows binaries | |
if: matrix.config.os == 'windows-latest' | |
working-directory: ${{github.workspace}} | |
shell: bash | |
run: | | |
cp ./build/app/${{env.BUILD_TYPE}}/*.exe ./build/capi/${{env.BUILD_TYPE}}/libczicompressc.dll ./czicompress-${{matrix.config.name}}/ | |
# upload the build-results to artifacts-store | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: czicompress-${{matrix.config.name}} | |
path: czicompress-${{matrix.config.name}}/ |