Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
HuguesDelorme committed Jan 13, 2025
2 parents 60418f2 + 25536dc commit 614755f
Show file tree
Hide file tree
Showing 274 changed files with 20,164 additions and 13,226 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
qt_version: [5.15.2, 6.5.2]

runs-on: ubuntu-latest
name: build-linux-qt${{matrix.qt_version}}

steps:
- name: Checkout
Expand All @@ -28,50 +29,33 @@ jobs:
- name: Install OpenCascade
run: |
sudo apt-get -y install libocct-data-exchange-dev libocct-draw-dev
GH_CASCADE_INC_DIR=`dpkg -L libocct-foundation-dev | grep -i "Standard_Version.hxx" | sed "s/\/Standard_Version.hxx//i"`
GH_CASCADE_LIB_DIR=`dpkg -L libocct-foundation-dev | grep -i "libTKernel.so" | sed "s/\/libTKernel.so//i"`
echo "GH_CASCADE_INC_DIR=$GH_CASCADE_INC_DIR" >> $GITHUB_ENV
echo "GH_CASCADE_LIB_DIR=$GH_CASCADE_LIB_DIR" >> $GITHUB_ENV
sudo apt-get -y install libocct-data-exchange-dev libocct-draw-dev occt-misc
sudo apt-get -y install libtbb-dev
sudo apt-get -y install libxi-dev
- name: Install Assimp
run: |
sudo apt-get -y install libassimp-dev
GH_ASSIMP_INC_DIR=`dpkg -L libassimp-dev | grep -i "version.h" | sed "s/\/version.h//i"`
GH_ASSIMP_LIB_DIR=`dpkg -L libassimp-dev | grep -i "libassimp.so" | sed "s/\/libassimp.so//i"`
echo "GH_ASSIMP_INC_DIR=$GH_ASSIMP_INC_DIR" >> $GITHUB_ENV
echo "GH_ASSIMP_LIB_DIR=$GH_ASSIMP_LIB_DIR" >> $GITHUB_ENV
- name: Get count of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: Build
run: |
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
echo CASCADE_INC_DIR=${{env.GH_CASCADE_INC_DIR}}
echo CASCADE_LIB_DIR=${{env.GH_CASCADE_LIB_DIR}}
echo ASSIMP_INC_DIR=${{env.GH_ASSIMP_INC_DIR}}
echo ASSIMP_LIB_DIR=${{env.GH_ASSIMP_LIB_DIR}}
[ ! -d $CASCADE_INC_DIR ] && echo "ERROR: OpenCascade include dir doesn't exist"
[ ! -d $CASCADE_LIB_DIR ] && echo "ERROR: OpenCascade lib dir doesn't exist"
[ ! -d $ASSIMP_INC_DIR ] && echo "ERROR: assimp include dir doesn't exist"
[ ! -d $ASSIMP_LIB_DIR ] && echo "ERROR: assimp lib dir doesn't exist"
qmake .. CONFIG+=withtests \
CASCADE_INC_DIR=${{env.GH_CASCADE_INC_DIR}} \
CASCADE_LIB_DIR=${{env.GH_CASCADE_LIB_DIR}} \
ASSIMP_INC_DIR=${{env.GH_ASSIMP_INC_DIR}} \
ASSIMP_LIB_DIR=${{env.GH_ASSIMP_LIB_DIR}}
make -j${{steps.cpu-cores.outputs.count}}
cmake --version
cmake .. \
-DMayo_BuildTests=ON \
-DMayo_BuildPluginAssimp=ON
cmake --build . \
--config Release \
--parallel `nproc`
- name: Execute Unit Tests
working-directory: ${{github.workspace}}/build
env:
DISPLAY: :0
run: |
# Install french locale for testing case
echo "fr_FR ISO-8859-1" | sudo tee -a /etc/locale.gen
echo "fr_FR ISO-8859-15" | sudo tee -a /etc/locale.gen
sudo locale-gen
localectl list-locales
# Start X11 display server
Expand Down
118 changes: 118 additions & 0 deletions .github/workflows/ci_linux_arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Linux ARM

on: [push]

jobs:
build-linux-arm:
strategy:
matrix:
include:
- arch: aarch64
distro: ubuntu_latest
#- arch: aarch64
# distro: fedora_latest
- arch: armv7
distro: archarm_latest


runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Get current branch name
uses: nelonoel/[email protected]

- name: Run Build
uses: uraimo/run-on-arch-action@v2
with:
arch: ${{matrix.arch}}

distro: ${{matrix.distro}}

# Not required, but speeds up builds
githubToken: ${{github.token}}

install: |
case "${{ matrix.distro }}" in
ubuntu*)
apt-get -y update
apt-get -y install xvfb # Needed to run unit tests
apt-get -y install cmake
apt-get -y install git
apt-get -y install g++
apt-get -y install qtbase5-dev libqt5svg5-dev
apt-get -y install libxcb-cursor0 # Dependencies for "xcb" Qt plugin(actually needed for Qt6)
apt-get -y install libocct-data-exchange-dev libocct-draw-dev occt-misc
apt-get -y install libtbb-dev libxi-dev # Dependencies for OpenCascade
apt-get -y install libassimp-dev
;;
fedora*)
dnf -y update
dnf -y install xorg-x11-server-Xvfb
dnf -y install make cmake
dnf -y install git
dnf -y install gcc-c++
dnf -y install qt5-qtbase qt5-qtsvg
dnf -y install xcb-util-cursor
dnf -y install opencascade-devel
dnf -y install assimp assimp-devel
;;
archarm*)
# See https://github.com/moby/buildkit/issues/1267#issuecomment-769880570
sed -i -e 's~#IgnorePkg.*~IgnorePkg = filesystem~g' '/etc/pacman.conf'
pacman -Syu --noconfirm
pacman -Sy --noconfirm xorg-server-xvfb
pacman -Sy --noconfirm make cmake
pacman -Sy --noconfirm git
pacman -Sy --noconfirm gcc
pacman -Sy --noconfirm qt5-base qt5-svg
pacman -Sy --noconfirm xcb-util-cursor
pacman -Sy --noconfirm opencascade
pacman -Sy --noconfirm libxi
pacman -Sy --noconfirm assimp
;;
esac
env: |
DISPLAY: :0
GIT_BRANCH_NAME: ${{env.BRANCH_NAME}}
RUN_ARCH_NAME: ${{matrix.arch}}
run: |
git clone --quiet https://github.com/fougue/mayo.git
cd mayo
# Fixes "fatal: detected dubious ownership in repository at '/home/runner/work/mayo/mayo'"
git config --global --add safe.directory `realpath $PWD/..`
echo GIT_BRANCH_NAME=$GIT_BRANCH_NAME
git checkout $GIT_BRANCH_NAME
cd ..
mkdir build
cd build
cmake --version
cmake .. \
-DMayo_BuildTests=ON \
-DMayo_BuildPluginAssimp=ON
cmake --build . \
--config Release \
--parallel `nproc`
#
# Execute Unit Tests
# Note: for some unknown reason unit tests are crashing for armv7(on very first test)
# so just execute them for aarch64
#
if [ $RUN_ARCH_NAME = 'aarch64' ]; then
# Start X11 display server
Xvfb $DISPLAY -screen 0 1280x1024x24 &
sleep 5s
./mayo --runtests
else
echo "NOTE: unit tests skipped, they need to be fixed for this architecture"
fi
48 changes: 20 additions & 28 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,29 @@ on: [push]

jobs:
build-macos:
strategy:
matrix:
include:
- qt_version_name: 5.15
qt_version_major: 5
- qt_version_name: 6.7
qt_version_major: 6

runs-on: macos-latest
name: build-macos-qt${{matrix.qt_version_name}}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: QtCache
run: brew install qt@${{matrix.qt_version_major}}

- name: Install OpenCascade
run: |
brew install opencascade
GH_CASCADE_BASE_DIR=`brew info opencascade | grep -E -i --only-matching --max-count=1 "^(/[a-z\.\-_0-9]+)+"`
echo "GH_CASCADE_INC_DIR=$GH_CASCADE_BASE_DIR/include/opencascade" >> $GITHUB_ENV
echo "GH_CASCADE_LIB_DIR=$GH_CASCADE_BASE_DIR/lib" >> $GITHUB_ENV
run: brew install opencascade

- name: Install Assimp
run: |
brew install assimp
GH_ASSIMP_BASE_DIR=`brew info assimp | grep -E -i --only-matching --max-count=1 "^(/[a-z\.\-_0-9]+)+"`
echo "GH_ASSIMP_INC_DIR=$GH_ASSIMP_BASE_DIR/include/assimp" >> $GITHUB_ENV
echo "GH_ASSIMP_LIB_DIR=$GH_ASSIMP_BASE_DIR/lib" >> $GITHUB_ENV
run: brew install assimp

- name: Get count of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
Expand All @@ -38,20 +36,14 @@ jobs:
run: |
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
echo CASCADE_INC_DIR=${{env.GH_CASCADE_INC_DIR}}
echo CASCADE_LIB_DIR=${{env.GH_CASCADE_LIB_DIR}}
echo ASSIMP_INC_DIR=${{env.GH_ASSIMP_INC_DIR}}
echo ASSIMP_LIB_DIR=${{env.GH_ASSIMP_LIB_DIR}}
[ ! -d $CASCADE_INC_DIR ] && echo "ERROR: OpenCascade include dir doesn't exist"
[ ! -d $CASCADE_LIB_DIR ] && echo "ERROR: OpenCascade lib dir doesn't exist"
[ ! -d $ASSIMP_INC_DIR ] && echo "ERROR: assimp include dir doesn't exist"
[ ! -d $ASSIMP_LIB_DIR ] && echo "ERROR: assimp lib dir doesn't exist"
qmake .. CONFIG+=withtests \
CASCADE_INC_DIR=${{env.GH_CASCADE_INC_DIR}} \
CASCADE_LIB_DIR=${{env.GH_CASCADE_LIB_DIR}} \
ASSIMP_INC_DIR=${{env.GH_ASSIMP_INC_DIR}} \
ASSIMP_LIB_DIR=${{env.GH_ASSIMP_LIB_DIR}}
make -j${{steps.cpu-cores.outputs.count}}
cmake --version
cmake .. \
-DMayo_BuildTests=ON \
-DMayo_BuildPluginAssimp=ON \
-DQT_DIR=$(brew --prefix qt@${{matrix.qt_version_major}})/lib/cmake/Qt${{matrix.qt_version_major}}
cmake --build . \
--config Release \
--parallel ${{steps.cpu-cores.outputs.count}}
- name: Execute Unit Tests
working-directory: ${{github.workspace}}/build
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/ci_macos_conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: macOS-conda

on: [push]

jobs:
build-macos:
runs-on: macos-latest
name: build-macos-qt${{matrix.qt_version_name}}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set Conda Environment
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: ci_macos_conda

- name: Set conda classic solver
shell: bash -el {0}
run: conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive

- name: Install Qt5
shell: bash -el {0}
run: conda install conda-forge::qt

- name: Install OpenCascade
shell: bash -el {0}
run: conda install conda-forge::occt

- name: Install Assimp
shell: bash -el {0}
run: conda install conda-forge::assimp

- name: Get count of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores

- name: Build
run: |
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake --version
export CMAKE_PREFIX_PATH="$CONDA/envs/ci_macos_conda/lib/cmake/Qt5;$CMAKE_PREFIX_PATH"
export CMAKE_PREFIX_PATH="$CONDA/envs/ci_macos_conda/lib/cmake/opencascade;$CMAKE_PREFIX_PATH"
export CMAKE_PREFIX_PATH="$CONDA/envs/ci_macos_conda/lib/cmake/assimp-5.4;$CMAKE_PREFIX_PATH"
cmake .. \
-DMayo_BuildTests=ON \
-DMayo_BuildPluginAssimp=ON \
-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH
cmake --build . \
--config Release \
--parallel ${{steps.cpu-cores.outputs.count}}
- name: Execute Unit Tests
working-directory: ${{github.workspace}}/build
run: |
./mayo.app/Contents/MacOS/mayo --runtests
Loading

0 comments on commit 614755f

Please sign in to comment.