diff --git a/.github/workflows/ci_linux_arch.yml b/.github/workflows/ci_linux_arch.yml new file mode 100644 index 00000000..2fff2fcd --- /dev/null +++ b/.github/workflows/ci_linux_arch.yml @@ -0,0 +1,37 @@ +name: Linux Arch x64 + +on: [push] + +jobs: + build-archlinux: + runs-on: ubuntu-latest + name: build-archlinux-qt5 + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + path: 'mayo' + + - name: Setup Podman + run: | + sudo apt update + sudo apt-get -y install podman + podman pull docker.io/library/archlinux:latest + + - name: Create container and run build+tests + run: | + { + echo 'FROM archlinux:latest' + echo 'RUN pacman -Syu --noconfirm' + echo 'RUN pacman -Sy --noconfirm make cmake git gcc' + echo 'RUN pacman -Sy --noconfirm qt5-base qt5-svg xcb-util-cursor' + echo 'RUN pacman -Sy --noconfirm opencascade libxi' + echo 'pacman -Sy --noconfirm assimp' + echo 'COPY mayo mayo' + echo 'RUN mkdir /mayo/build' + echo 'WORKDIR /mayo/build' + echo 'RUN cmake .. -DMayo_BuildTests=ON -DMayo_BuildPluginAssimp=ON' + echo 'RUN cmake --build . --parallel --config Release' + } > podmanfile + podman build --tag archlinux-ci -f ./podmanfile diff --git a/.github/workflows/ci_linux_armv7.yml b/.github/workflows/ci_linux_armv7.yml deleted file mode 100644 index cfaa9b64..00000000 --- a/.github/workflows/ci_linux_armv7.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Linux ARMv7 - -on: [push] - -jobs: - build-linux-armv7: - 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/branch-name@v1.0.1 - - - 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 diff --git a/.github/workflows/ci_fedora.yml b/.github/workflows/ci_linux_fedora.yml similarity index 82% rename from .github/workflows/ci_fedora.yml rename to .github/workflows/ci_linux_fedora.yml index 3955d2cb..b3089f5d 100644 --- a/.github/workflows/ci_fedora.yml +++ b/.github/workflows/ci_linux_fedora.yml @@ -1,4 +1,4 @@ -name: Linux Fedora +name: Linux Fedora x64 on: [push] @@ -34,11 +34,10 @@ jobs: echo 'WORKDIR /mayo' echo 'RUN mkdir build' echo 'WORKDIR /mayo/build' - echo 'RUN cmake --version' echo 'RUN cmake .. -DMayo_BuildTests=ON -DMayo_BuildPluginAssimp=ON' - echo 'RUN cmake --build . --config Release' - echo 'RUN Xvfb $DISPLAY -screen 0 1280x1024x24 &' - echo 'RUN sleep 5s' - echo 'RUN ./mayo --runtests' + echo 'RUN cmake --build . --parallel --config Release' + #echo 'RUN Xvfb $DISPLAY -screen 0 1280x1024x24 &' + #echo 'RUN sleep 5s' + #echo 'RUN ./mayo --runtests' } > podmanfile podman build --tag fedora40-ci -f ./podmanfile diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux_ubuntu.yml similarity index 98% rename from .github/workflows/ci_linux.yml rename to .github/workflows/ci_linux_ubuntu.yml index 2ae4c878..323c3ae0 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux_ubuntu.yml @@ -1,4 +1,4 @@ -name: Linux +name: Linux Ubuntu x64/arm64 on: [push] diff --git a/.github/workflows/ci_linux_ubuntu_armv7.yml b/.github/workflows/ci_linux_ubuntu_armv7.yml new file mode 100644 index 00000000..181eda5b --- /dev/null +++ b/.github/workflows/ci_linux_ubuntu_armv7.yml @@ -0,0 +1,79 @@ +name: Linux Ubuntu armv7 + +on: [push] + +jobs: + build-linux-armv7: + strategy: + matrix: + include: + - arch: armv7 + distro: ubuntu + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Get current branch name + uses: nelonoel/branch-name@v1.0.1 + + - 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: | + 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 + + 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 .. -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 diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 1fd2eb19..f494fcd2 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -1,4 +1,4 @@ -name: macOS +name: macOS x64/arm64 on: [push] @@ -7,7 +7,8 @@ jobs: strategy: matrix: qt_version_major: [5, 6] - os: [macos-latest-large, macos-latest-xlarge] + os: [macos-latest-xlarge] + #os: [macos-latest-large, macos-latest-xlarge] runs-on: ${{matrix.os}} name: build-${{matrix.os}}-qt${{matrix.qt_version_major}} diff --git a/.github/workflows/ci_macos_conda.yml b/.github/workflows/ci_macos_conda.yml index f4d3028b..0f91a86c 100644 --- a/.github/workflows/ci_macos_conda.yml +++ b/.github/workflows/ci_macos_conda.yml @@ -1,4 +1,4 @@ -name: macOS-conda +name: macOS-conda x64 on: [push] diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index c3bf2272..89644950 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -1,4 +1,4 @@ -name: Windows +name: Windows x64 on: [push] diff --git a/CMakeLists.txt b/CMakeLists.txt index 12a8c846..3cc0f691 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -679,8 +679,10 @@ endif() # Mayo_BuildConvCli add_custom_target( OtherFiles SOURCES - .github/workflows/ci_linux.yml - .github/workflows/ci_linux_armv7.yml + .github/workflows/ci_linux_arch.yml + .github/workflows/ci_linux_fedora.yml + .github/workflows/ci_linux_ubuntu.yml + .github/workflows/ci_linux_ubuntu_armv7.yml .github/workflows/ci_macos.yml .github/workflows/ci_macos_conda.yml .github/workflows/ci_windows.yml diff --git a/README.md b/README.md index addb651d..f87fe03c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
[![Windows CI](https://github.com/fougue/mayo/actions/workflows/ci_windows.yml/badge.svg?branch=develop)](https://github.com/fougue/mayo/actions/workflows/ci_windows.yml) -[![Linux CI](https://github.com/fougue/mayo/actions/workflows/ci_linux.yml/badge.svg?branch=develop)](https://github.com/fougue/mayo/actions/workflows/ci_linux.yml) +[![Linux CI](https://github.com/fougue/mayo/actions/workflows/ci_linux_ubuntu.yml/badge.svg?branch=develop)](https://github.com/fougue/mayo/actions/workflows/ci_linux_ubuntu.yml) [![macOS CI](https://github.com/fougue/mayo/actions/workflows/ci_macos.yml/badge.svg?branch=develop)](https://github.com/fougue/mayo/actions/workflows/ci_macos.yml) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/d51f8ca6fea34886b8308ff0246172ce)](https://app.codacy.com/gh/fougue/mayo/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![Downloads](https://img.shields.io/github/downloads/fougue/mayo/total.svg)](https://github.com/fougue/mayo/releases)