Skip to content

Commit ee92ed1

Browse files
authored
Merge branch 'master' into me/rocky_ssl
2 parents bba280a + c00c27a commit ee92ed1

File tree

6 files changed

+51
-29
lines changed

6 files changed

+51
-29
lines changed

.github/workflows/common_build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
needs: lint
4949
uses: ./.github/workflows/setup_environment.yml
5050
with:
51-
os: macos-13
51+
os: macos-14
5252
build: true
5353
build_installer: false
5454
qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=warn_off"
@@ -58,7 +58,7 @@ jobs:
5858
needs: lint
5959
uses: ./.github/workflows/setup_environment.yml
6060
with:
61-
os: macos-13
61+
os: macos-14
6262
build: true
6363
build_installer: false
6464
config: debug
@@ -69,7 +69,7 @@ jobs:
6969
needs: [build-macos-debug-tests, build-macos-release-tests]
7070
uses: ./.github/workflows/setup_environment.yml
7171
with:
72-
os: macos-13
72+
os: macos-14
7373
build: true
7474
build_installer: true
7575
qmake_extra: " CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off"
@@ -81,7 +81,7 @@ jobs:
8181
needs: build-macos-installer
8282
uses: ./.github/workflows/installer.yml
8383
with:
84-
os: macos-13
84+
os: macos-14
8585
artifact_name: macos-installer
8686

8787
build-ubuntu-release-tests:

.github/workflows/setup_environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ on:
4747
xcode_version:
4848
required: false
4949
type: string
50-
default: 14.3
50+
default: 15.3
5151
config:
5252
required: false
5353
type: string

buildScripts/github/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ case $RUNNER_OS in
1010
[ -d "$QT_DIR" ] && export PATH="$QT_DIR:$PATH"
1111
export PATH="/usr/local/opt/ccache/libexec:$PATH"
1212
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
13+
export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
1314
echo "Now path is $PATH"
1415
;;
1516
Linux)
@@ -41,6 +42,7 @@ PROJECT="$PROJECT" \
4142
BUILD_DIR="$BUILD_DIR" \
4243
ROOT_DIR="$ROOT_DIR" \
4344
RUNNER_OS="$RUNNER_OS" \
45+
PKG_CONFIG_PATH="${PKG_CONFIG_PATH:-}" \
4446
buildScripts/github/build_internal.sh
4547

4648

buildScripts/github/install.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euxo pipefail
33
BUILD_INSTALLER=${BUILD_INSTALLER:-true}
44
TRIK_QT_VERSION=${TRIK_QT_VERSION:-5.15}
5-
XCODE_VERSION=${XCODE_VERSION:-14.3} # 14.3 on GHA worker is compatible with Qt5.15
5+
XCODE_VERSION=${XCODE_VERSION:-15.3}
66
TRIK_PYTHON3_VERSION_MINOR=${TRIK_PYTHON3_VERSION_MINOR:-11}
77

88

@@ -30,14 +30,30 @@ case "$(uname)" in
3030
Darwin)
3131
export HOMEBREW_NO_INSTALL_CLEANUP=1
3232
export HOMEBREW_NO_AUTO_UPDATE=1
33+
TRIK_PYTHON3_VERSION_PATCH=${TRIK_PYTHON3_VERSION_PATCH:-0}
3334
brew tap "hudochenkov/sshpass"
34-
TRIK_BREW_PACKAGES="ccache coreutils libusb pkg-config gnu-sed sshpass p7zip python@3.${TRIK_PYTHON3_VERSION_MINOR}"
35+
TRIK_BREW_PACKAGES="ccache coreutils pkg-config gnu-sed sshpass p7zip"
3536
for pkg in $TRIK_BREW_PACKAGES ; do
3637
p="${pkg##*/}"
3738
p="${p%.*}"
3839
brew install --quiet "$pkg" || brew upgrade "$pkg" || brew link --force "$pkg" || echo "Failed to install/upgrade $pkg"
3940
done
4041
modules=("qtscript")
42+
43+
PYTHON_VERSION="3.${TRIK_PYTHON3_VERSION_MINOR}.$TRIK_PYTHON3_VERSION_PATCH"
44+
PYTHON_INSTALLER_NAME="python-$PYTHON_VERSION-macos11.pkg"
45+
PYTHON_DOWNLOAD_URL="https://www.python.org/ftp/python/$PYTHON_VERSION/${PYTHON_INSTALLER_NAME}"
46+
curl -o "/tmp/${PYTHON_INSTALLER_NAME}" "${PYTHON_DOWNLOAD_URL}"
47+
sudo installer -pkg "/tmp/${PYTHON_INSTALLER_NAME}" -target /
48+
49+
MACPORTS_PKG="MacPorts-2.11.6-14-Sonoma.pkg"
50+
MACPORTS_URL="https://github.com/macports/macports-base/releases/download/v2.11.6/${MACPORTS_PKG}"
51+
curl -L --fail --output "${MACPORTS_PKG}" "${MACPORTS_URL}"
52+
sudo installer -pkg "${MACPORTS_PKG}" -target /
53+
export PATH="/opt/local/bin:$PATH"
54+
sudo port selfupdate
55+
sudo port install libusb +universal
56+
4157
install_qt mac desktop "${TRIK_QT_VERSION}" "$HOME/Qt" $modules
4258
sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer
4359
xcodebuild -showsdks

installer/packages/trik-studio/ru.qreal.root.trik.core/meta/prebuild-mac.sh

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,33 @@ rsync -a "$BIN_DIR"/{2D-model,checkapp}
2121

2222
copy_qt_lib QtSerialPort
2323

24+
arch -x86_64 zsh
2425

2526
[ -r venv/bin/activate ] || python3."${TRIK_PYTHON3_VERSION_MINOR}" -m venv venv
26-
. venv/bin/activate
27-
python3 -m pip install -U pip
28-
python3 -m pip install -r requirements.txt
29-
30-
#PyInstaller provides all required modules
31-
#So we need to handle this garbage of files later (below) with proper rsync
32-
#Determine python behavior when searching pythonlib
33-
PYTHONHASHSEED=1 pyinstaller --clean --noconfirm --log-level DEBUG --debug noarchive --onedir --name trik \
34-
--hidden-import=math \
35-
--hidden-import=random \
36-
--hidden-import=sys \
37-
--hidden-import=time \
38-
--hidden-import=os \
39-
--hidden-import=types \
40-
--hidden-import=pip \
41-
--hidden-import=venv \
42-
--hidden-import=site \
43-
--hidden-import=numpy \
44-
"$BIN_DIR"/TRIK.py
45-
46-
deactivate # exit python's venv
27+
28+
arch -x86_64 bash -c '
29+
. venv/bin/activate
30+
31+
python3 -m pip install -U pip
32+
python3 -m pip install -r requirements.txt
33+
34+
# PyInstaller provides all required modules
35+
# So we need to handle this garbage of files later (below) with proper rsync
36+
# Determine python behavior when searching pythonlib
37+
PYTHONHASHSEED=1 pyinstaller --clean --noconfirm --log-level DEBUG --debug noarchive --onedir --name trik \
38+
--hidden-import=math \
39+
--hidden-import=random \
40+
--hidden-import=sys \
41+
--hidden-import=time \
42+
--hidden-import=os \
43+
--hidden-import=types \
44+
--hidden-import=pip \
45+
--hidden-import=venv \
46+
--hidden-import=site \
47+
--hidden-import=numpy \
48+
"$BIN_DIR"/TRIK.py
49+
deactivate
50+
'
4751

4852
rsync -avR --remove-source-files dist/trik/_internal/./*.dylib "$BUNDLE_CONTENTS/Lib"
4953
rsync -av dist/trik/_internal/python3.*/* "$BUNDLE_CONTENTS/Lib/python-runtime"

installer/utils/mac_utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function fix_dependencies {
2828
continue;
2929
fi
3030
normalized=$(grealpath -e "$dep")
31-
if [[ "$normalized" == "/usr/local"/* ]] ; then
31+
if [[ "$normalized" == "/usr/local"/* || "$normalized" == "/opt/local"/* ]] ; then
3232
relative=$(basename "$normalized")
3333
fi
3434

0 commit comments

Comments
 (0)