Skip to content

Commit 7df36b4

Browse files
committed
Turn on NatronTest verification in Build Installer GitHub action.
- Added support for running NatronTests as part of the installer build. - Made mt.exe detection a little more robust. Signed-off-by: Aaron Colwell <[email protected]>
1 parent 661ad24 commit 7df36b4

File tree

2 files changed

+38
-9
lines changed

2 files changed

+38
-9
lines changed

.github/workflows/build_installer.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
msystem: mingw64
2929
update: true
30-
install: git mingw-w64-x86_64-wget unzip
30+
install: git mingw-w64-x86_64-wget unzip diffutils
3131

3232
- name: Install Natron pacman repository
3333
run: |
@@ -42,12 +42,11 @@ jobs:
4242
4343
cd tools/jenkins
4444
45-
WORKSPACE=${NATRON_BUILD_WORKSPACE_UNIX} BUILD_NAME=natron BUILD_NUMBER=1 BITS=64 NATRON_LICENSE=GPL GIT_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git GIT_URL_IS_NATRON=1 SNAPSHOT_BRANCH=${GITHUB_REF_NAME} QT_VERSION_MAJOR=5 DISABLE_BREAKPAD=1 NOUPDATE=1 MKJOBS=$(nproc) MINIMIZE_DISK_USAGE=1 ./launchBuildMain.sh
45+
WORKSPACE=${NATRON_BUILD_WORKSPACE_UNIX} BUILD_NAME=natron BUILD_NUMBER=1 BITS=64 NATRON_LICENSE=GPL GIT_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git GIT_URL_IS_NATRON=1 SNAPSHOT_BRANCH=${GITHUB_REF_NAME} QT_VERSION_MAJOR=5 DISABLE_BREAKPAD=1 NOUPDATE=1 MKJOBS=$(nproc) MINIMIZE_DISK_USAGE=1 UNIT_TESTS=true ./launchBuildMain.sh
4646
4747
ARCHIVE_DIR=${NATRON_BUILD_WORKSPACE_UNIX}/builds_archive/natron/1
4848
INSTALLER_ZIP_UNIX=$(ls ${ARCHIVE_DIR}/Natron*Windows-x86_64.zip)
4949
50-
set -x
5150
# Unzip installer zip for artifact upload so we don't get a zipped zip file.
5251
cd ${ARCHIVE_DIR}
5352
INSTALLER_DIR="${ARCHIVE_DIR}/i"
@@ -59,6 +58,16 @@ jobs:
5958
echo "INSTALLER_NAME=${INSTALLER_NAME}" >> $GITHUB_OUTPUT
6059
echo "INSTALLER_DIR=$(cygpath -m ${INSTALLER_DIR})" >> $GITHUB_OUTPUT
6160
61+
TEST_RESULTS_FILE="${ARCHIVE_DIR}/${INSTALLER_NAME}-tests.txt"
62+
TEST_RESULTS_NAME="${INSTALLER_NAME}-tests"
63+
echo "TEST_RESULTS_NAME=${TEST_RESULTS_NAME}" >> $GITHUB_OUTPUT
64+
echo "TEST_RESULTS_FILE=$(cygpath -m ${TEST_RESULTS_FILE})" >> $GITHUB_OUTPUT
65+
66+
TEST_FAILURES_DIR="${ARCHIVE_DIR}/${INSTALLER_NAME}-unit_tests_failures"
67+
TEST_FAILURES_NAME="${INSTALLER_NAME}-unit_tests_failures"
68+
echo "TEST_FAILURES_NAME=${TEST_FAILURES_NAME}" >> $GITHUB_OUTPUT
69+
echo "TEST_FAILURES_DIR=$(cygpath -m ${TEST_FAILURES_DIR})" >> $GITHUB_OUTPUT
70+
6271
- name: Build verify_plugin_loads binary
6372
run: |
6473
g++ -DWINDOWS -o verify_plugin_loads .github/workflows/verify_plugin_loads.cpp libs/OpenFX/HostSupport/src/ofxhBinary.cpp libs/OpenFX/HostSupport/src/ofxhUtilities.cpp -I libs/OpenFX/HostSupport/include/ -I libs/OpenFX/include/
@@ -67,12 +76,24 @@ jobs:
6776
run: |
6877
pacman -Rs --noconfirm mingw-w64-x86_64-natron-build-deps-qt5
6978
70-
- name: Upload artifacts
79+
- name: Upload installer
7180
uses: actions/[email protected]
7281
with:
7382
name: ${{ steps.build.outputs.INSTALLER_NAME }}
7483
path: ${{ steps.build.outputs.INSTALLER_DIR }}
7584

85+
- name: Upload test results
86+
uses: actions/[email protected]
87+
with:
88+
name: ${{ steps.build.outputs.TEST_RESULTS_NAME }}
89+
path: ${{ steps.build.outputs.TEST_RESULTS_FILE }}
90+
91+
- name: Upload test failures
92+
uses: actions/[email protected]
93+
with:
94+
name: ${{ steps.build.outputs.TEST_FAILURES_NAME }}
95+
path: ${{ steps.build.outputs.TEST_FAILURES_DIR }}
96+
7697
- name: Verify plugin loading
7798
run: |
7899
INSTALLER_DIR=$(cygpath -u '${{ steps.build.outputs.INSTALLER_DIR }}')/${{ steps.build.outputs.INSTALLER_NAME }}
@@ -81,6 +102,14 @@ jobs:
81102
PATH=${INSTALLER_DIR}/bin ./verify_plugin_loads.exe "${x}"
82103
done
83104
105+
- name: Verify passing tests match 2.5.0 release
106+
run: |
107+
wget https://github.com/NatronGitHub/Natron/releases/download/v2.5.0/Natron-2.5.0-Windows-x86_64-tests.txt
108+
if diff Natron-2.5.0-Windows-x86_64-tests.txt ${{ steps.build.outputs.TEST_RESULTS_FILE }}; then
109+
echo "Test results match 2.5.0 release : PASS"
110+
else
111+
echo "Test results match 2.5.0 release : FAILED"
112+
fi
84113
85114
win-installer-breakpad:
86115
name: Windows Installer (with Breakpad crash reporting)

tools/jenkins/build-Windows-installer.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ cp "$INC_PATH/config/"*.png "$INSTALLER_PATH/config/"
132132

133133
# make sure we have mt and qtifw
134134

135-
if ! which mt.exe; then
135+
MT_BIN=mt.exe
136+
if ! which ${MT_BIN}; then
136137
# Add Windows SDK to path so that mt.exe is available.
137138
WIN_SDK_MAJOR_VERSION=10
138139
WIN_SDK_BASE_PATH="/c/Program Files (x86)/Windows Kits/${WIN_SDK_MAJOR_VERSION}/bin"
139-
WIN_SDK_VERSION=$(ls "${WIN_SDK_BASE_PATH}" | grep "${WIN_SDK_MAJOR_VERSION}." | sort -n | tail -1)
140-
PATH="${WIN_SDK_BASE_PATH}/${WIN_SDK_VERSION}/x64/":${PATH}
140+
MT_BIN=$(find "${WIN_SDK_BASE_PATH}" -name mt.exe | grep x64 | sort -n | tail -1)
141141

142-
if ! which mt.exe; then
142+
if [[ -z "${MT_BIN}" ]]; then
143143
echo "Failed to find mt.exe"
144144
exit 1
145145
fi
@@ -222,7 +222,7 @@ function installPlugin() {
222222
done
223223
echo "</assembly>" >> "$PLUGIN_MANIFEST"
224224
for location in "$PKG_PATH/data" "${TMP_PORTABLE_DIR}"; do
225-
(cd "$location/Plugins/OFX/Natron/${OFX_BINARY}.ofx.bundle/Contents/Win${BITS}"; mt -nologo -manifest "$PLUGIN_MANIFEST" -outputresource:"${OFX_BINARY}.ofx;2")
225+
(cd "$location/Plugins/OFX/Natron/${OFX_BINARY}.ofx.bundle/Contents/Win${BITS}"; "${MT_BIN}" -nologo -manifest "$PLUGIN_MANIFEST" -outputresource:"${OFX_BINARY}.ofx;2")
226226
done
227227

228228
fi

0 commit comments

Comments
 (0)