Skip to content

Commit

Permalink
Merge branch 'master' into print_text_block
Browse files Browse the repository at this point in the history
  • Loading branch information
iakov authored Jun 2, 2024
2 parents f5950f7 + 3eb0a8d commit a19f38d
Show file tree
Hide file tree
Showing 12 changed files with 152 additions and 158 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ updates:
submodules-junior:
patterns:
- "*" # All submodules updates

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
6 changes: 3 additions & 3 deletions .github/workflows/codacy-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@1.1.0
uses: codacy/codacy-analysis-cli-action@v4.4.1
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
Expand All @@ -43,6 +43,6 @@ jobs:

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
65 changes: 27 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,19 @@ jobs:
matrix:
include:
- qt-version: '5.12'
mingw-version: 7.3
mingw-short-version: 73
python-version: 3.8
mingw-version: '7.3'
mingw-short-version: '73'
python-version: '3.8'
mingw-bitness: '64'
deploy-installer: true

# - qt-version: '5.15.2'
# mingw-version: 8.1
# mingw-short-version: 81
# python-version: 3.8
- qt-version: '5.15'
mingw-version: '8.1'
mingw-bitness: '64'
mingw-short-version: '81'
python-version: '3.8'
# deploy-installer: true


defaults:
run:
Expand All @@ -64,12 +68,12 @@ jobs:
uses: msys2/setup-msys2@v2
with:
path-type: inherit
msystem: MINGW32
msystem: MINGW${{ matrix.mingw-bitness }}

- name: Download packages to msys2
run: |
ARCH=32
PLATFORM=i686
ARCH=${{ matrix.mingw-bitness }}
PLATFORM=${{ matrix.mingw-bitness == '32' && 'i686' || 'x86_64' }}
pacman --verbose --noconfirm -S msys/zlib-devel dos2unix ccache rsync unzip openssh mingw$ARCH/mingw-w64-$PLATFORM-libzip mingw$ARCH/mingw-w64-$PLATFORM-libusb mingw$ARCH/mingw-w64-$PLATFORM-zlib mingw$ARCH/mingw-w64-$PLATFORM-pkg-config
- name: Inject slug/short variables
Expand All @@ -91,45 +95,30 @@ jobs:
git config --global core.autocrlf true
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
dir: C:\
version: '${{matrix.qt-version}}.*'
arch: win32_mingw${{matrix.mingw-short-version}}
version: '${{matrix.qt-version}}'
arch: win${{ matrix.mingw-bitness }}_mingw${{matrix.mingw-short-version}}
modules: 'qtscript'
archives: 'qtbase qtmultimedia qtsvg qtscript qttools qtserialport qtimageformats qtwinextras'
tools: 'tools_mingw,qt.tools.win32_mingw${{matrix.mingw-short-version}}0'
tools: 'tools_mingw,qt.tools.win${{ matrix.mingw-bitness }}_mingw${{matrix.mingw-short-version}}0 tools_ifw'
add-tools-to-path: true
cache: true
extra: '--external 7z'

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install proper version for QtIfw
run: |
cd "$RUNNER_TEMP"
curl -Lo qtifw.exe "https://download.qt.io/official_releases/qt-installer-framework/4.2.0/QtInstallerFramework-windows-x86-4.2.0.exe"
export TRIK_QT_INSTALL_DIR="${IQTA_TOOLS}/QtInstallerFramework/4.2.0"
mkdir -p $TRIK_QT_INSTALL_DIR
"$RUNNER_TEMP"/qtifw.exe --verbose --no-force-installations --show-virtual-components --script "${GITHUB_WORKSPACE}\\plugins\\robots\\thirdparty\\trikRuntime\\trikRuntime\\docker\\qt_scriptinstall.qs"
rm -rf "$TRIK_QT_INSTALL_DIR"/{doc,examples,Uninstaller.app,Uninstaller.dat}
# After Qt install action, that spoils pythonLocation variable
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
architecture: 'x86'

- name: Update PATH
run: |
set -xue
cygpath -w "${IQTA_TOOLS}/mingw${{matrix.mingw-short-version}}0_32/bin" >> $GITHUB_PATH
cygpath -w "${pythonLocation}" >> $GITHUB_PATH
cygpath -w "${Qt5_Dir}/bin" >> $GITHUB_PATH
architecture: ${{ matrix.mingw-bitness == '32' && 'x86' || 'x64' }}

- name: Check PATH
run: echo PATH="$PATH"
Expand All @@ -139,7 +128,7 @@ jobs:
set -xueo pipefail
uname -a
rsync --version
ls "$IQTA_TOOLS/" "$Qt5_Dir/"
ls "$IQTA_TOOLS/" "$QT_ROOT_DIR/"
qmake --version && qmake -query
python3 --version
which g++
Expand Down Expand Up @@ -193,18 +182,18 @@ jobs:
- name: Push binaries
if: false
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.qt-version}}
path: ${{ env.BUILD_DIR }}/bin/release

- name: Build installer
run: |
cd $GITHUB_WORKSPACE/installer
./build-trik-studio.sh "${Qt5_Dir}/bin" "${IQTA_TOOLS}/QtInstallerFramework/4.2.0/bin" "${{ env.BUILD_DIR }}"
./build-trik-studio.sh "${QT_ROOT_DIR}/bin" "${IQTA_TOOLS}/QtInstallerFramework/*/bin" "${{ env.BUILD_DIR }}"
- name: Push installer
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: trik-studio-auto-installer-qt${{ matrix.qt-version}}
path: |
Expand Down
71 changes: 32 additions & 39 deletions .github/workflows/centos.yml → .github/workflows/rockylinux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check with CentOS 7
name: Check with RockyLinux
on:
push:
branches-ignore:
Expand Down Expand Up @@ -26,14 +26,12 @@ on:
- 'plugins/robots/checker/scripts/build-checker-installer.sh'
- '.github/workflows/main.yml'
pull_request:
branches-ignore:
- 'dependabot**'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container: centos:7
container: rockylinux:9
defaults:
run:
shell: bash -l {0} # to force import of ~/.bash_profile
Expand All @@ -42,8 +40,8 @@ jobs:
matrix:
include:
- qt-version: '5.12'
python-minor: 8
gcc-version: 11
python-minor: 9
gcc-version: 13
deploy-installer: true

steps:
Expand All @@ -53,22 +51,25 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install CentOS packages
- name: Install packages
run: |
yum install -y epel-release centos-release-scl
yum install -y libusbx-devel curl wget devtoolset-${{ matrix.gcc-version }}-{gcc-c++,make,libasan-devel,libubsan-devel} \
rh-git227-git-core ccache zlib-devel rsync rh-python3${{ matrix.python-minor }}-python-{devel,pip,urllib3} mesa-libGL-devel systemd-devel fontconfig p7zip which
yum install -y epel-release # for ccache and p7zip
yum update -y # useless?
yum install --allowerasing -y \
sudo which \
libusbx-devel curl wget make gcc-toolset-${{ matrix.gcc-version }}-{gcc-c++,libasan-devel,libubsan-devel,gdb} \
git-core ccache zlib-devel rsync python3-{devel,pip,urllib3} mesa-libGL-devel systemd-devel fontconfig p7zip
yum install -y libxkbcommon-x11 qt5-qtbase-gui #no desire to enumerate all required libraries for QtIFw
yum install -y pulseaudio-libs-glib2 # to run TS and 2D-model even with `minimal` platform
echo "source scl_source enable devtoolset-${{ matrix.gcc-version }} rh-python3${{ matrix.python-minor }} rh-git227" >> ~/.bash_profile
echo "source scl_source enable gcc-toolset-${{ matrix.gcc-version }}" >> ~/.bash_profile
- name: Prepare environment variables
run: |
DIR=$(realpath "$GITHUB_WORKSPACE"/../build)
echo "BUILD_DIR=$DIR" >> $GITHUB_ENV
echo "LC_ALL=en_US.utf8" >> $GITHUB_ENV
echo "LC_ALL=C.UTF-8" >> $GITHUB_ENV
- name: Configure git
run: |
Expand All @@ -77,12 +78,12 @@ jobs:
git config --global core.autocrlf false
#prepare for actions/checkout, otherwise it fails
echo "$(dirname $(realpath $(which git)))" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PERL5LIB=$PERL5LIB" >> $GITHUB_ENV
#echo "$(dirname $(realpath $(which git)))" >> $GITHUB_PATH
#echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
#echo "PERL5LIB=$PERL5LIB" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
Expand All @@ -92,40 +93,33 @@ jobs:

- name: Create build directory
run: mkdir -vp ${{ env.BUILD_DIR }}

- name: Install Qt
run: |
set -ueo pipefail
python3 -m pip install -U pip
python3 -m pip install aqtinstall
aqt install-qt linux desktop "${{ matrix.qt-version }}.*" -O /Qt -m qtscript --archives qtbase qtmultimedia qtsvg qtscript qttools qtserialport qtimageformats icu qtwayland
# aqt install-tool linux desktop tools_ifw -O /Qt
echo "Qt5_Dir=$(ls -1d /Qt/5*/* | head -n 1)" >> $GITHUB_ENV
aqt install-qt linux desktop "${{ matrix.qt-version }}" -O /Qt -m qtscript --archives qtbase qtmultimedia qtsvg qtscript qttools qtserialport qtimageformats icu qtwayland
aqt install-tool linux desktop tools_ifw -O /Qt
QT_ROOT_DIR=$(ls -1d /Qt/${{ matrix.qt-version }}*/gcc_64 | head -n 1)
echo "IQTA_TOOLS=/Qt/Tools" >> $GITHUB_ENV
- name: Install proper version for QtIfw
if: false
run: |
- name: Update PATH
run: |
set -xue
echo "${Qt5_Dir}/bin" >> $GITHUB_PATH
echo "QT_ROOT_DIR=$QT_ROOT_DIR" >> $GITHUB_ENV
echo "$QT_ROOT_DIR/bin" >> $GITHUB_PATH
- name: Check PATH
run: echo PATH="$PATH"

- name: ccache
uses: hendrikmuhs/[email protected]
uses: hendrikmuhs/[email protected].13

- name: Check available tools
run: |
set -xueo pipefail
uname -a
rsync --version
# ls "$IQTA_TOOLS/"
ls "$Qt5_Dir/"
qmake --version && qmake -query
python3 --version
which g++
Expand Down Expand Up @@ -154,7 +148,7 @@ jobs:
timeout-minutes: 5
run: |
cd ${{ env.BUILD_DIR }}
export TRIK_PYTHONPATH=$(python3 -c "import sys; import os; print(os.pathsep.join(sys.path))")
export TRIK_PYTHONPATH=$(python3.${{ matrix.python-minor }} -c "import sys; import os; print(os.pathsep.join(sys.path))")
make -k check TESTARGS="-platform offscreen"
- name: Download tests
Expand All @@ -178,13 +172,12 @@ jobs:
set -vx
cd "$GITHUB_WORKSPACE"/installer
export TRIK_PYTHON3_VERSION_MINOR=${{ matrix.python-minor }}
# bash -xv ./build-trik-studio.sh "${Qt5_Dir}/bin" $(ls -1d "${IQTA_TOOLS}"/QtInstallerFramework/*/bin | head -n 1) "${{ env.BUILD_DIR }}"
bash -xv ./build-trik-studio.sh "${QT_ROOT_DIR}/bin" $(ls -1d "${IQTA_TOOLS}"/QtInstallerFramework/*/bin | head -n 1) "${{ env.BUILD_DIR }}"
- name: Push installer
if: false
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: trik-studio-auto-installer-linux-qt${{ matrix.qt-version }}
name: trik-studio-auto-installer-rockylinux-qt${{ matrix.qt-version }}
path: |
installer/trik-studio*installer*.run
installer/trik_studio*.qs
Expand Down
4 changes: 2 additions & 2 deletions buildScripts/azure/install_qtifw_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ TRIK_QT_INSTALL_DIR=${TRIK_QT_INSTALL_DIR:-$HOME/TRIK_QtIfw}
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})
set -ueo pipefail
#The latest with Qt 5.12 as minimal required, 4.3.0 requires Qt 5.15
QTIFW_VERSION=4.2.0
QTIFW_VERSION=4.6.1
D=/tmp/qtifw-installer.dmg
test -r "$D" || curl -L -o "$D" "http://download.qt-project.org/official_releases/qt-installer-framework/$QTIFW_VERSION/QtInstallerFramework-macOS-x64-4.2.0.dmg"
test -r "$D" || curl -L -o "$D" "http://download.qt-project.org/official_releases/qt-installer-framework/$QTIFW_VERSION/QtInstallerFramework-macOS-x64-${QTIFW_VERSION}.dmg"
P=$(hdiutil attach "$D" -noverify -noautofsck | grep -o '/Volumes/.*$')
I=$(find "$P" -type f -perm +1 -path '*Contents/MacOS/*' -print | head -n 1 )
env TRIK_QT_INSTALL_DIR="$TRIK_QT_INSTALL_DIR" "$I" --verbose --no-force-installations --show-virtual-components --script "$SCRIPT_DIR/../../plugins/robots/thirdparty/trikRuntime/trikRuntime/docker/qt_scriptinstall.qs"
Expand Down
Loading

0 comments on commit a19f38d

Please sign in to comment.