Skip to content

Commit

Permalink
Merge branch 'ci/more-os-arch' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
HuguesDelorme committed Feb 4, 2025
2 parents 81759e1 + 5b5553c commit e70032e
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 149 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci_linux_arch.yml
Original file line number Diff line number Diff line change
@@ -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 'RUN 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
118 changes: 0 additions & 118 deletions .github/workflows/ci_linux_arm.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/ci_linux_fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Linux Fedora x64

on: [push]

jobs:
build-fedora:
runs-on: ubuntu-latest
name: build-fedora40-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 fedora:40
- name: Create container and run build+tests
run: |
{
echo 'FROM fedora:40'
echo 'RUN dnf -y update'
echo 'RUN dnf -y install xorg-x11-server-Xvfb'
echo 'RUN dnf -y install make cmake git gcc-c++'
echo 'RUN dnf -y install qt5-qtbase qt5-qtsvg xcb-util-cursor'
echo 'RUN dnf -y install opencascade-devel'
echo 'RUN dnf -y install assimp assimp-devel'
echo 'RUN dnf clean all'
echo 'COPY mayo mayo'
echo 'WORKDIR /mayo'
echo 'RUN mkdir build'
echo 'WORKDIR /mayo/build'
echo 'RUN cmake .. -DMayo_BuildTests=ON -DMayo_BuildPluginAssimp=ON'
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
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
name: Linux
name: Linux Ubuntu x64/arm64

on: [push]

jobs:
build-linux:
build-ubuntu:
strategy:
matrix:
qt_version: [5.15.2, 6.5.2]
qt_version_major: [5, 6]
os: [ubuntu-latest, ubuntu-24.04-arm]

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

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

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{matrix.qt_version}}
cache: true
cache-key-prefix: QtCache
- name: Update all package informations
run: |
sudo apt-get -y update
# Actually needed for Qt6
- name: Install dependencies for "xcb" Qt plugin
- name: Install Qt${{matrix.qt_version_major}}
run: |
sudo apt-get -y install libxcb-cursor0
if [[ ${{matrix.qt_version_major}} == "5" ]]; then
sudo apt-get -y install qtbase5-dev libqt5svg5-dev
elif [[ ${{matrix.qt_version_major}} == "6" ]]; then
sudo apt-get -y install qt6-base-dev qt6-svg-dev libxcb-cursor0
fi
- name: Install OpenCascade
run: |
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/ci_linux_ubuntu_armv7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Linux Ubuntu armv7

on: [push]

jobs:
build-ubuntu:
strategy:
matrix:
include:
- arch: armv7
distro: ubuntu_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: |
apt-get -y update
apt-get -y install cmake git g++
# Needed to run unit tests
apt-get -y install xvfb
# Install Qt5
apt-get -y install qtbase5-dev libqt5svg5-dev
# Dependencies for "xcb" Qt plugin(actually needed for Qt6)
apt-get -y install libxcb-cursor0
# Install OpenCascade
apt-get -y install libocct-data-exchange-dev libocct-draw-dev occt-misc
# Dependencies for OpenCascade
apt-get -y install libtbb-dev libxi-dev
# Install Assimp
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)
## Xvfb $DISPLAY -screen 0 1280x1024x24 &
## sleep 5s
## ./mayo --runtests
22 changes: 13 additions & 9 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
name: macOS
#name: macOS x64/arm64
name: macOS arm64

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
qt_version_major: [5, 6]
os: [macos-latest]
#os: [macos-latest-large, macos-latest-xlarge]

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

steps:
- name: Set globals
id: globals
run: |
echo qt_path=$(brew --prefix qt@${{matrix.qt_version_major}}) >> ${GITHUB_OUTPUT}
- name: Checkout
uses: actions/checkout@v2

Expand All @@ -40,7 +44,7 @@ jobs:
cmake .. \
-DMayo_BuildTests=ON \
-DMayo_BuildPluginAssimp=ON \
-DQT_DIR=$(brew --prefix qt@${{matrix.qt_version_major}})/lib/cmake/Qt${{matrix.qt_version_major}}
-DQT_DIR=${{steps.globals.outputs.qt_path}}/lib/cmake/Qt${{matrix.qt_version_major}}
cmake --build . \
--config Release \
--parallel ${{steps.cpu-cores.outputs.count}}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_macos_conda.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: macOS-conda
name: macOS-conda arm64

on: [push]

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

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Windows
name: Windows x64

on: [push]

jobs:
build-windows-msvc:
build-windows:
strategy:
matrix:
include:
Expand Down
Loading

0 comments on commit e70032e

Please sign in to comment.