Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test building with Qt 6 #4908

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

strategy:
fail-fast: false
Expand All @@ -37,9 +37,7 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Install dependencies
run: ./scripts/github-ci-linux-get-dependencies.sh bionic
- name: Dependency fixup
run: sudo apt-get install gettext
run: ./scripts/github-ci-linux-get-dependencies.sh
- name: Build
run: ./scripts/github-ci.sh experimental build

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/linux-build-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
headless: [ ON, OFF ]
enable_tests: [ ON, OFF ]

Expand All @@ -29,7 +29,8 @@ jobs:
run: >
cmake -S . -B build -GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DUSE_QT6=ON \
-DHEADLESS=${{ matrix.headless }} \
-DENABLE_TESTS=${{ matrix.enable_tests }}
- name: Build OpenSCAD
run: cmake --build build
run: cmake --build build -j4
22 changes: 8 additions & 14 deletions .github/workflows/linux-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
os: [ ubuntu-24.04 ]
include:
- os: ubuntu-20.04
distro: focal
qt5default: true
- os: ubuntu-22.04
distro: kinetic
qt5default: false
- os: ubuntu-24.04

runs-on: ${{ matrix.os }}

Expand All @@ -30,15 +25,14 @@ jobs:
with:
submodules: 'recursive'
- name: Install dependencies
run: ./scripts/github-ci-linux-get-dependencies.sh ${{ matrix.distro }}
- name: Dependency fixup
run: sudo apt-get install gettext gcovr
- name: Make Qt5 the default
if: ${{ matrix.qt5default }}
run: sudo apt-get install qt5-default
run: ./scripts/github-ci-linux-get-dependencies.sh
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Install gcovr
run: |
python -m pip install -U pip
python -m pip install -U gcovr
- name: Build and test
run: ./scripts/github-ci.sh experimental enable_python build test coverage
- name: Upload Test Result Report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [macos-13, macos-latest]
qt: [qt5, qt6]
qt: [qt6]
exclude:
# macos-latest runs on arm64, which has a broken SW renderer
- os: macos-latest
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ on:
default: GLX
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Inputs
run: echo "${{ toJSON(inputs) }}"
Expand Down Expand Up @@ -132,16 +132,14 @@ jobs:
with:
submodules: 'recursive'
- name: Install dependencies
run: ./scripts/github-ci-linux-get-dependencies.sh kinetic
- name: Dependency fixup
run: sudo apt-get install gettext
run: ./scripts/github-ci-linux-get-dependencies.sh
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Build
run: |
cmake ${CMAKE_EXTRA} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DEXPERIMENTAL=${{ inputs.enable_experimental }} -DUSE_MIMALLOC=${{ inputs.use_mimalloc }} -DUSE_BUILTIN_OPENCSG=${{ inputs.use_builtin_opencsg }} -B b .
cmake --build b -j 2
cmake ${CMAKE_EXTRA} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DUSE_QT6=ON -DEXPERIMENTAL=${{ inputs.enable_experimental }} -DUSE_MIMALLOC=${{ inputs.use_mimalloc }} -DUSE_BUILTIN_OPENCSG=${{ inputs.use_builtin_opencsg }} -B b .
cmake --build b -j4
echo "Build exit code: $?"
- name: Test
run: ./scripts/github-ci.sh test
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/non-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Non-experimental

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
run: ./scripts/github-ci-linux-get-dependencies.sh kinetic
- name: Dependency fixup
run: sudo apt-get install gettext gcovr
run: ./scripts/github-ci-linux-get-dependencies.sh
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Install gcovr
run: |
python -m pip install -U pip
python -m pip install -U gcovr
- name: Build and test
run: ./scripts/github-ci.sh enable_python build test coverage
- name: Upload Test Result Report
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
run: |
git submodule update --init --recursive
mkdir build && cd build
cmake .. -G"Ninja" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DEXPERIMENTAL=ON -DSNAPSHOT=ON
cmake --build . -j2
cmake .. -G"Ninja" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DEXPERIMENTAL=OFF -DSNAPSHOT=ON -DUSE_QT6=ON
cmake --build . -j4
cmake --install . --prefix=.
- name: Run Test Suite
run: |
cd build
ctest -j2
ctest -j4
- name: Upload Test Result Report
uses: actions/upload-artifact@v4
if: ${{ always() }}
Expand Down
51 changes: 4 additions & 47 deletions scripts/github-ci-linux-get-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,53 +1,10 @@
#!/bin/bash

DIST="$1"

PACKAGES1="build-essential bison cmake curl flex git-core imagemagick ghostscript"
PACKAGES1="build-essential bison cmake curl flex gettext git-core imagemagick ghostscript"
PACKAGES2="libboost-all-dev libboost-dev libeigen3-dev libzip-dev libcrypto++-dev"
PACKAGES3="libxi-dev libxmu-dev qtbase5-dev qtmultimedia5-dev libqt5opengl5-dev libqt5svg5-dev libqt5scintilla2-dev"
PACKAGES4="libcgal-dev libglew-dev libgmp3-dev libgmp-dev libmpfr-dev libegl-dev libegl1-mesa-dev"
PACKAGES3="libxi-dev libxmu-dev qt6-base-dev qt6-multimedia-dev libqt6core5compat6-dev libqt6svg6-dev libqscintilla2-qt6-dev"
PACKAGES4="libcairo2-dev libcgal-dev libglew-dev libgmp3-dev libgmp-dev libmpfr-dev libegl-dev libegl1-mesa-dev"
PACKAGES5="libdouble-conversion-dev libfontconfig-dev libharfbuzz-dev libopencsg-dev lib3mf-dev libtbb-dev"
PACKAGES6="libthrust-dev libglm-dev"

if [[ "$DIST" == "xenial" ]]; then

LIB3MF_REPO="http://download.opensuse.org/repositories/home:/t-paul:/lib3mf/xUbuntu_16.04/"
LIBCGAL_REPO="http://download.opensuse.org/repositories/home:/t-paul:/cgal/xUbuntu_16.04/"

elif [[ "$DIST" == "bionic" ]]; then

LIB3MF_REPO="https://download.opensuse.org/repositories/home:/t-paul:/lib3mf/xUbuntu_18.04/"
LIBCGAL_REPO="https://download.opensuse.org/repositories/home:/t-paul:/cgal/xUbuntu_18.04/"

elif [[ "$DIST" == "focal" ]]; then

LIB3MF_REPO="https://download.opensuse.org/repositories/home:/t-paul:/lib3mf/xUbuntu_20.04/"
LIBCGAL_REPO="https://download.opensuse.org/repositories/home:/t-paul:/cgal/xUbuntu_20.04/"

elif [[ "$DIST" == "kinetic" ]]; then

LIB3MF_REPO="https://download.opensuse.org/repositories/home:/t-paul:/lib3mf/xUbuntu_22.04/"
LIBCGAL_REPO="https://download.opensuse.org/repositories/home:/t-paul:/cgal/xUbuntu_22.04/"

else

echo "ERROR: unhandled DIST: $DIST"
exit 1

fi

echo "Selected distribution: $DIST"

wget -qO - https://files.openscad.org/OBS-Repository-Key.pub | sudo apt-key add -
echo yes | sudo add-apt-repository "deb $LIB3MF_REPO ./"
echo yes | sudo add-apt-repository "deb $LIBCGAL_REPO ./"
sudo apt-get update -qq
sudo apt-get purge -qq fglrx || true

# Workaround for issue installing libzip-dev on github
# E: Unable to correct problems, you have held broken packages.
# libzip-dev : Depends: libzip4 (= 1.1.2-1.1) but 1.7.3-1+ubuntu18.04.1+deb.sury.org+2 is to be installed
sudo apt-cache rdepends libzip4 || true
sudo apt-get purge -qq libzip4 $(apt-cache rdepends --installed libzip4 | tail -n+3)
PACKAGES6="libthrust-dev libglm-dev libxml2-dev"

sudo apt-get install -qq $PACKAGES1 $PACKAGES2 $PACKAGES3 $PACKAGES4 $PACKAGES5 $PACKAGES6
4 changes: 2 additions & 2 deletions scripts/github-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

PARALLEL=2
PARALLEL=4
PARALLEL_MAKE=-j"$PARALLEL"
PARALLEL_CTEST=-j"$PARALLEL"

Expand All @@ -26,7 +26,7 @@ do_build() {
mkdir "$BUILDDIR"
(
cd "$BUILDDIR"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_UNITY_BUILD=ON -DPROFILE=ON -DUSE_BUILTIN_OPENCSG=1 ${EXPERIMENTAL} ${PYTHON_DEFINE} .. && make $PARALLEL_MAKE
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_UNITY_BUILD=ON -DPROFILE=ON -DUSE_BUILTIN_OPENCSG=1 -DUSE_QT6=ON ${EXPERIMENTAL} ${PYTHON_DEFINE} .. && make $PARALLEL_MAKE
)
if [[ $? != 0 ]]; then
echo "Build failure"
Expand Down
7 changes: 4 additions & 3 deletions scripts/msys2-install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pacboy --noconfirm --sync --needed \
cgal:p \
eigen3:p \
glew:p \
qscintilla:p \
qscintilla-qt6:p \
opencsg:p \
lib3mf:p \
libzip:p \
Expand All @@ -42,8 +42,9 @@ pacboy --noconfirm --sync --needed \
cairo:p \
ghostscript:p \
imagemagick:p \
qt5-svg:p \
qt5-multimedia:p \
qt6-5compat:p \
qt6-svg:p \
qt6-multimedia:p \
tbb:p \
python:p \
python-pip:p \
Expand Down
22 changes: 21 additions & 1 deletion scripts/uni-get-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,25 @@ get_qt5_deps_debian()
fi
}

get_qt6_deps_debian()
{
apt-get -y install qt6-base-dev qt6-multimedia-dev libqt6core5compat6-dev libqt6svg6-dev libqscintilla2-qt6-dev
}

get_debian_8_deps()
{
apt-get -y install libharfbuzz-dev libxml2-dev
get_debian_deps
get_qt5_deps_debian
}

get_debian_12_deps()
{
apt-get -y install libharfbuzz-dev libxml2-dev
get_debian_deps
get_qt6_deps_debian
}

get_ubuntu_14_deps()
{
get_debian_8_deps
Expand All @@ -151,6 +163,12 @@ get_ubuntu_16_deps()
get_debian_8_deps
}

get_ubuntu_24_deps()
{
apt-get -y install libxi-dev libxml2-dev libfontconfig1-dev
get_debian_12_deps
}

get_neon_deps()
{
get_debian_8_deps
Expand Down Expand Up @@ -178,8 +196,10 @@ if [ -e /etc/issue ]; then
get_ubuntu_14_deps
elif [ "`grep -i ubuntu.1[6-9] /etc/issue`" ]; then
get_ubuntu_16_deps
elif [ "`grep -i ubuntu.2[0-4] /etc/issue`" ]; then
elif [ "`grep -i ubuntu.2[0-3] /etc/issue`" ]; then
get_ubuntu_16_deps
elif [ "`grep -i ubuntu.2[4-9] /etc/issue`" ]; then
get_ubuntu_24_deps
elif [ "`grep -i ubuntu /etc/issue`" ]; then
get_debian_deps
elif [ "`grep -i KDE.neon /etc/issue`" ]; then
Expand Down