From 9e340cd7c3543f756766d6c31e645f54fa986abc Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Fri, 23 Feb 2024 10:26:13 +0100 Subject: [PATCH] CI: add archarm/armv7 build for Linux ARM --- .github/workflows/ci_linux_arm.yml | 74 ++++++++++++++++++------------ .github/workflows/ci_windows.yml | 1 + 2 files changed, 45 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci_linux_arm.yml b/.github/workflows/ci_linux_arm.yml index 2d5a3d33..43a2652f 100644 --- a/.github/workflows/ci_linux_arm.yml +++ b/.github/workflows/ci_linux_arm.yml @@ -6,8 +6,12 @@ jobs: build-linux-arm: strategy: matrix: - #arch: [armv7, aarch64] - arch: [aarch64] + include: + - arch: aarch64 + distro: ubuntu22.04 + - arch: armv7 + distro: archarm_latest + runs-on: ubuntu-latest @@ -22,19 +26,37 @@ jobs: uses: uraimo/run-on-arch-action@v2 with: arch: ${{matrix.arch}} - distro: ubuntu22.04 + distro: ${{matrix.distro}} githubToken: ${{github.token}} # Not required, but speeds up builds 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 libtbb2-dev libxi-dev # Dependencies for OpenCascade v7.5 - apt-get -y install libassimp-dev + 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 libtbb2-dev libxi-dev # Dependencies for OpenCascade v7.5 + apt-get -y install libassimp-dev + ;; + 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 @@ -42,17 +64,18 @@ jobs: RUN_ARCH_NAME: ${{matrix.arch}} run: | - git clone https://github.com/fougue/mayo.git + git clone --quiet https://github.com/fougue/mayo.git cd mayo - echo GIT_BRANCH_NAME=$GIT_BRANCH_NAME + # Fixes "fatal: detected dubious ownership in repository at '/home/runner/work/mayo/mayo'" - #git config --global --add safe.directory `pwd` - git config --global --add safe.directory /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 \ @@ -61,16 +84,7 @@ jobs: --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 + # Start X11 display server + Xvfb $DISPLAY -screen 0 1280x1024x24 & + sleep 5s + ./mayo --runtests diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 42c97700..78527c47 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -21,6 +21,7 @@ jobs: occ_zip_sha256: 'beb30920efe5e5384d500d43dcb8ba1f476a76bb65b268b1af32d807b697bdee' runs-on: windows-latest + name: build-win-msvc-occt${{matrix.occ_version}} steps: - name: Checkout