Skip to content

Try to run the generated binding. #1

Try to run the generated binding.

Try to run the generated binding. #1

name: Build and test Ubuntu x64
on:
workflow_call:
inputs:
docker_image_tag:
required: true
type: string
app_version:
required: true
type: string
full_config_build:
default: false
required: false
type: boolean
autotest_data_s3_url:
default: "s3://data-autotest/test_data_2023-jun-14"
required: false
type: string
UPLOAD_ARTIFACTS:
required: true
type: boolean
jobs:
ubuntu-x64-build-test:
timeout-minutes: 40
runs-on: [self-hosted, x64, docker-ready, build]
container:
image: meshlib/meshlib-${{matrix.os}}:${{inputs.docker_image_tag}}
options: --user root
strategy:
fail-fast: false
matrix:
os: [ ubuntu20, ubuntu22, ubuntu24 ]
config: [ Debug, Release ]
compiler: [ Clang, GCC ]
full_config_build:
- ${{fromJSON(inputs.full_config_build)}}
exclude:
# Do not run Debug Clang build on every commit (but only once a day)
- full_config_build: false
config: Debug
compiler: Clang
# Do not run Release GCC build on every commit (but only once a day)
- full_config_build: false
config: Release
compiler: GCC
- os: ubuntu24
compiler: GCC
- os: ubuntu24
config: Debug
include:
- os: ubuntu20
compiler: Clang
cxx-compiler: /usr/bin/clang++-11
c-compiler: /usr/bin/clang-11
use-cpp-23: "OFF"
build_mrcuda: "ON"
- os: ubuntu20
compiler: GCC
cxx-compiler: /usr/bin/g++-10
c-compiler: /usr/bin/gcc-10
use-cpp-23: "OFF"
build_mrcuda: "ON"
- os: ubuntu22
compiler: Clang
cxx-compiler: /usr/bin/clang++-14
c-compiler: /usr/bin/clang-14
use-cpp-23: "OFF"
build_mrcuda: "ON"
- os: ubuntu22
compiler: GCC
cxx-compiler: /usr/bin/g++-12
c-compiler: /usr/bin/gcc-12
use-cpp-23: "ON"
build_mrcuda: "ON"
- os: ubuntu24
compiler: Clang
cxx-compiler: /usr/bin/clang++-18
c-compiler: /usr/bin/clang-18
use-cpp-23: "ON"
build_mrcuda: "OFF"
# - os: ubuntu24
# compiler: GCC
# cxx-compiler: /usr/bin/g++-13
# c-compiler: /usr/bin/gcc-13
# use-cpp-23: "ON"
# build_mrcuda: "OFF"
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
env:
UPLOAD_TEST_ARTIFACTS: ${{ contains(github.event.pull_request.labels.*.name, 'upload-test-artifacts') }}
INTERNAL_BUILD: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install thirdparty libs
run: |
ln -s /usr/local/lib/meshlib-thirdparty-lib/lib ./lib
ln -s /usr/local/lib/meshlib-thirdparty-lib/include ./include
- name: Create virtualenv
run: |
python3 -m venv .venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Setup python requirements
run: python3 -m pip install -r ./requirements/python.txt
- name: Checkout MRBind
uses: actions/checkout@v4
if: ${{ matrix.os == 'ubuntu24' }}
with:
repository: MeshInspector/mrbind
path: _mrbind
token: ${{ secrets.BUILD_MACHINE_TOKEN }}
- name: Compile MRBind
if: ${{ matrix.os == 'ubuntu24' }}
run: |
CC=${{matrix.c-compiler}} CXX=${{matrix.cxx-compiler}} cmake -S _mrbind -B _mrbind/build -DCMAKE_BUILD_TYPE=Release
cmake --build _mrbind/build
- name: Generate MRBind bindings
if: ${{ matrix.os == 'ubuntu24' }}
env:
CXX: ${{matrix.cxx-compiler}}
run: make -f scripts/mrbind/generate.mk only-generate
- name: Build
run: ./scripts/build_source.sh
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 }}
MR_VERSION: ${{ inputs.app_version }}
MR_USE_CPP_23: ${{ matrix.use-cpp-23 }}
MESHLIB_BUILD_MRCUDA: ${{ matrix.build_mrcuda }}
# options to be passed to cmake
MR_CMAKE_OPTIONS: >
-DMR_USE_CPP_23=${{ matrix.use-cpp-23 }}
-DMESHLIB_BUILD_MRCUDA=${{ matrix.build_mrcuda }}
# not realy needed
CMAKE_C_COMPILER: ${{ matrix.c-compiler }}
- name: Compile and link MRBind bindings
if: ${{ matrix.os == 'ubuntu24' }}
env:
CXX: ${{matrix.cxx-compiler}}
run: make -f scripts/mrbind/generate.mk
- name: Test MRBind bindings
if: ${{ matrix.os == 'ubuntu24' }}
env: LD_LIBRARY_PATH: .

Check failure on line 161 in .github/workflows/build-test-ubuntu-x64.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-test-ubuntu-x64.yml

Invalid workflow file

You have an error in your yaml syntax on line 161
working-directory: build/Release/bin
run: python3 -c 'from meshlib2 import mrmeshpy; from meshlib2 import mrmeshnumpy'
- name: Collect Timings
run: ./scripts/devops/collect_timing_logs.sh ${{matrix.os}} ${{matrix.config}} "${{matrix.compiler}}"
#Save timing in artifact
- name: Upload Timings
uses: actions/upload-artifact@v4
with:
name: Timing_Logs_${{matrix.os}}-x86_${{matrix.config}}_${{matrix.compiler}}
path: time_log/
- name: Run Start-and-Exit Tests
run: MR_LOCAL_RESOURCES=1 xvfb-run -a ./build/${{ matrix.config }}/bin/MeshViewer -hidden -noEventLoop -unloadPluginsAtEnd
- name: Unit Tests
run: ./build/${{ matrix.config }}/bin/MRTest
- name: C Unit Tests
run: ./build/${{ matrix.config }}/bin/MRTestC
- name: Python Sanity Tests
working-directory: ./build/${{ matrix.config }}/bin
run: python3 ./../../../scripts/run_python_test_script.py -d '../test_python'
- name: Configure AWS Credentials
if: ${{ env.UPLOAD_TEST_ARTIFACTS == 'true' || env.INTERNAL_BUILD == 'true' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::259351611210:role/GitHubMeshLibAwsCredsRole
aws-region: us-east-1
# cache managment: https://github.com/MeshInspector/MeshLib/actions/caches
- name: Cache autotest data from S3 Tests
if: ${{ env.UPLOAD_TEST_ARTIFACTS == 'true' || env.INTERNAL_BUILD == 'true' }}
id: cache-autotest
uses: actions/cache@v4
with:
path: ./test_data
key: ${{inputs.autotest_data_s3_url}}
- name: Copy autotest data from S3 Tests
if: ${{ env.UPLOAD_TEST_ARTIFACTS == 'true' || env.INTERNAL_BUILD == 'true' }}
run: aws s3 sync ${{inputs.autotest_data_s3_url}} ./test_data --delete --no-sign-request --size-only
- name: Python Regression Tests
env:
SMOKE: ${{ env.INTERNAL_BUILD == 'true' && inputs.full_config_build == false && matrix.config == 'Debug' }}
if: ${{ env.UPLOAD_TEST_ARTIFACTS == 'true' || env.INTERNAL_BUILD == 'true' }}
working-directory: ./build/${{ matrix.config }}/bin
run: python3 ./../../../scripts/run_python_test_script.py -d '../test_regression' -s ${{env.SMOKE}}
- name: Copy test artifacts to S3
if: ${{ env.UPLOAD_TEST_ARTIFACTS == 'true' && env.INTERNAL_BUILD == 'true' && !cancelled() }}
run: aws s3 cp ./pytest_temp 's3://test-artifacts-git/tests/${{github.run_id}}/${{matrix.os}}/${{matrix.config}}/${{matrix.compiler}}' --recursive
- name: Create Deb
if: ${{ inputs.UPLOAD_ARTIFACTS && matrix.compiler == 'Clang' && matrix.config == 'Release'}}
env:
MESHLIB_BUILD_RELEASE: ON
MESHLIB_BUILD_DEBUG: OFF
run: |
./scripts/distribution.sh ${{inputs.app_version}}
mv ./distr/meshlib-dev.deb meshlib-${{matrix.os}}-dev.deb
- name: Upload Ubuntu Developer Distribution
if: ${{ inputs.UPLOAD_ARTIFACTS && matrix.compiler == 'Clang' && matrix.config == 'Release'}}
uses: actions/upload-artifact@v4
with:
name: Distributives_${{matrix.os}}-x86
path: meshlib-${{matrix.os}}-dev.deb
retention-days: 1