print instance utilization #1
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: Build and test MacOS | ||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
UPLOAD_ARTIFACTS: | ||
required: true | ||
type: boolean | ||
jobs: | ||
macos-build-test: | ||
timeout-minutes: 60 | ||
# runs-on: macos-latest | ||
runs-on: ${{ matrix.runner }} | ||
strategy: | ||
matrix: | ||
os: [ x64, arm ] | ||
config: [Release] | ||
compiler: [Сlang] | ||
include: | ||
- compiler: Сlang | ||
cxx-compiler: /usr/bin/clang++ | ||
c-compiler: /usr/bin/clang | ||
- os: x64 | ||
runner: macos-13 | ||
- os: arm | ||
runner: macos-arm-build | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Install thirdparty libs | ||
run: ./scripts/build_thirdparty.sh | ||
- name: Build | ||
run: ./scripts/build_source.sh | while IFS= read -r line; do echo "Resource usage for: $line"; top -l 1 | grep -E '^(CPU|PhysMem)'; done | ||
env: | ||
MESHLIB_BUILD_RELEASE: ${{ fromJSON('["OFF", "ON"]')[matrix.config == 'Release'] }} | ||
MESHLIB_BUILD_DEBUG: ${{ fromJSON('["OFF", "ON"]')[matrix.config == 'Debug'] }} | ||
CMAKE_CXX_COMPILER: ${{ matrix.cxx-compiler }} | ||
# not realy needed | ||
CMAKE_C_COMPILER: ${{ matrix.c-compiler }} | ||
MR_VERSION: ${{ inputs.version }} | ||
MR_USE_CPP_23: "ON" | ||
- name: Unit Tests | ||
run: ./build/Release/bin/MRTest | ||
- name: Python Tests | ||
working-directory: ./build/Release/bin | ||
run: python3 ./../../../scripts/run_python_test_script.py | ||
- name: Create Pkg | ||
if: ${{ inputs.UPLOAD_ARTIFACTS }} | ||
run: | | ||
./scripts/distribution_apple.sh | ||
mv MeshLib_.pkg meshlib_${{matrix.os}}.pkg | ||
- name: Upload Macos Distribution | ||
if: ${{ inputs.UPLOAD_ARTIFACTS }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Distributives | ||
path: meshlib_${{matrix.os}}.pkg | ||
retention-days: 1 |