Adding rebuild to scripts
This commit is contained in:
parent
07e556da56
commit
1fc19f6ba3
7 changed files with 87 additions and 18 deletions
|
@ -28,7 +28,7 @@ steps:
|
||||||
- apt update
|
- apt update
|
||||||
- apt install -y npm
|
- apt install -y npm
|
||||||
- cd common && npm install -D && cd ..
|
- cd common && npm install -D && cd ..
|
||||||
- xvfb-run bash scripts/run-tests.sh
|
- xvfb-run bash scripts/run-tests.sh --no-rebuild
|
||||||
when:
|
when:
|
||||||
event: [ push, tag ]
|
event: [ push, tag ]
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ steps:
|
||||||
- name: Windows build
|
- name: Windows build
|
||||||
image: ad5001/ubuntu-pyside-xvfb:wine-6-latest
|
image: ad5001/ubuntu-pyside-xvfb:wine-6-latest
|
||||||
commands:
|
commands:
|
||||||
- bash scripts/build-wine.sh
|
- bash scripts/build-wine.sh --no-rebuild
|
||||||
- bash scripts/package-wine.sh
|
- bash scripts/package-wine.sh
|
||||||
when:
|
when:
|
||||||
event: [ push, tag ]
|
event: [ push, tag ]
|
||||||
|
|
2
run.py
2
run.py
|
@ -32,7 +32,7 @@ if __name__ == "__main__":
|
||||||
if '--test-build' not in argv:
|
if '--test-build' not in argv:
|
||||||
build()
|
build()
|
||||||
logplotter_path = path.realpath(path.join(getcwd(), "build", "runtime-pyside6"))
|
logplotter_path = path.realpath(path.join(getcwd(), "build", "runtime-pyside6"))
|
||||||
print("Appending " + logplotter_path + " to path...")
|
print(f"Appending {logplotter_path} to path...")
|
||||||
sys_path.append(logplotter_path)
|
sys_path.append(logplotter_path)
|
||||||
run()
|
run()
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,25 @@
|
||||||
DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
cd "$DIR/.." || exit 1
|
cd "$DIR/.." || exit 1
|
||||||
|
|
||||||
|
rebuild=true
|
||||||
|
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--no-rebuild)
|
||||||
|
rebuild=false
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
box "Error: Invalid argument."
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$rebuild" == "true" ]; then
|
||||||
rm -rf build
|
rm -rf build
|
||||||
bash scripts/build.sh
|
bash scripts/build.sh
|
||||||
|
fi
|
||||||
|
|
||||||
cd build/runtime-pyside6 || exit 1
|
cd build/runtime-pyside6 || exit 1
|
||||||
|
|
||||||
rm $(find . -name "*.pyc")
|
rm $(find . -name "*.pyc")
|
||||||
|
@ -30,7 +47,7 @@ cp ../../assets/native/mac/Info.plist dist/LogarithmPlotter.app/Contents/Info.pl
|
||||||
|
|
||||||
# Remove QtWebEngine, 3D and all other unused libs libs
|
# Remove QtWebEngine, 3D and all other unused libs libs
|
||||||
rm -rf dist/LogarithmPlotter.app/Contents/MacOS/{QtWeb*,*3D*,QtRemote*,QtPdf,QtCharts,QtLocation,QtTest,QtMultimedia,QtSpatialAudio,QtDataVisualization,QtQuickParticles,QtChartsQml,QtScxml,QtDataVisualizationQml,QtTest,QtPositioningQuick,QtQuickTest,QtSql,QtSensorsQuick}
|
rm -rf dist/LogarithmPlotter.app/Contents/MacOS/{QtWeb*,*3D*,QtRemote*,QtPdf,QtCharts,QtLocation,QtTest,QtMultimedia,QtSpatialAudio,QtDataVisualization,QtQuickParticles,QtChartsQml,QtScxml,QtDataVisualizationQml,QtTest,QtPositioningQuick,QtQuickTest,QtSql,QtSensorsQuick}
|
||||||
rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/{QtNetwork.abi3.so}
|
rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/QtNetwork.abi3.so
|
||||||
|
|
||||||
# Removing QtQuick3D
|
# Removing QtQuick3D
|
||||||
rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/Qt/qml/{QtQuick3D,Qt3D,QtWebEngine}
|
rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/Qt/qml/{QtQuick3D,Qt3D,QtWebEngine}
|
||||||
|
|
|
@ -1,8 +1,25 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." || exit
|
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." || exit
|
||||||
|
|
||||||
|
rebuild=true
|
||||||
|
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--no-rebuild)
|
||||||
|
rebuild=false
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
box "Error: Invalid argument."
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$rebuild" == "true" ]; then
|
||||||
rm -rf build
|
rm -rf build
|
||||||
bash scripts/build.sh
|
bash scripts/build.sh
|
||||||
|
fi
|
||||||
|
|
||||||
cd build/runtime-pyside6 || exit 1
|
cd build/runtime-pyside6 || exit 1
|
||||||
|
|
||||||
rm -rf $(find . -name "*.pyc")
|
rm -rf $(find . -name "*.pyc")
|
||||||
|
|
|
@ -1,8 +1,25 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." || exit 1
|
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." || exit 1
|
||||||
|
|
||||||
|
rebuild=true
|
||||||
|
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--no-rebuild)
|
||||||
|
rebuild=false
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
box "Error: Invalid argument."
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$rebuild" == "true" ]; then
|
||||||
rm -rf build
|
rm -rf build
|
||||||
bash scripts/build.sh
|
bash scripts/build.sh
|
||||||
|
fi
|
||||||
|
|
||||||
cd build/runtime-pyside6 || exit 1
|
cd build/runtime-pyside6 || exit 1
|
||||||
|
|
||||||
mkdir assets
|
mkdir assets
|
||||||
|
|
|
@ -18,7 +18,7 @@ cp ../../../README.md Installer/README.md
|
||||||
|
|
||||||
# Calculating folder size
|
# Calculating folder size
|
||||||
duoutput=$(du -h Installer | tail -n1)
|
duoutput=$(du -h Installer | tail -n1)
|
||||||
size=$(expr ${duoutput%M*} + 2) # +2 for allowing small space to edit.
|
size=$(( ${duoutput%M*} + 2)) # +2 for allowing small space to edit.
|
||||||
echo "Creating DMG file with size ${size}M."
|
echo "Creating DMG file with size ${size}M."
|
||||||
|
|
||||||
# Adapted from https://stackoverflow.com/a/1513578
|
# Adapted from https://stackoverflow.com/a/1513578
|
||||||
|
@ -26,7 +26,7 @@ hdiutil create -srcfolder "${source}" -volname "${title}" -fs HFS+ \
|
||||||
-fsargs "-c c=64,a=16,e=16" -format UDRW -size ${size}M pack.temp.dmg
|
-fsargs "-c c=64,a=16,e=16" -format UDRW -size ${size}M pack.temp.dmg
|
||||||
|
|
||||||
device=$(hdiutil attach -readwrite -noverify -noautoopen "pack.temp.dmg" | \
|
device=$(hdiutil attach -readwrite -noverify -noautoopen "pack.temp.dmg" | \
|
||||||
egrep '^/dev/' | sed 1q | awk '{print $1}')
|
grep -E '^/dev/' | sed 1q | awk '{print $1}')
|
||||||
|
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
|
@ -53,10 +53,10 @@ echo '
|
||||||
end tell
|
end tell
|
||||||
end tell
|
end tell
|
||||||
' | osascript
|
' | osascript
|
||||||
chmod -Rf go-w /Volumes/"${title}"
|
chmod -Rf go-w "/Volumes/${title}"
|
||||||
sync
|
sync
|
||||||
sync
|
sync
|
||||||
hdiutil detach ${device}
|
hdiutil detach "${device}"
|
||||||
hdiutil convert "pack.temp.dmg" -format UDZO -imagekey zlib-level=9 -o "${finalDMGName}"
|
hdiutil convert "pack.temp.dmg" -format UDZO -imagekey zlib-level=9 -o "${finalDMGName}"
|
||||||
rm -f pack.temp.dmg
|
rm -f pack.temp.dmg
|
||||||
rm -rf Installer
|
rm -rf Installer
|
||||||
|
|
|
@ -1,8 +1,26 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.."
|
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." || exit 1
|
||||||
|
|
||||||
|
rebuild=true
|
||||||
|
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--no-rebuild)
|
||||||
|
rebuild=false
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
box "Error: Invalid argument."
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$rebuild" == "true" ]; then
|
||||||
rm -rf build
|
rm -rf build
|
||||||
bash scripts/build.sh
|
bash scripts/build.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Run python tests
|
# Run python tests
|
||||||
cp -r runtime-pyside6/tests build/runtime-pyside6
|
cp -r runtime-pyside6/tests build/runtime-pyside6
|
||||||
|
@ -12,6 +30,6 @@ PYTHONPATH="$PYTHONPATH:." pytest --cov=LogarithmPlotter --cov-report term-missi
|
||||||
cd ../../
|
cd ../../
|
||||||
|
|
||||||
# Run js tests
|
# Run js tests
|
||||||
cd common
|
cd common || exit 1
|
||||||
npm test
|
npm test
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue