Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7bd4a32

Browse files
committedSep 9, 2024·
ci/windows: ensure that the Docker Image contains the packaging tools
Signed-off-by: Bindea Cristian <cristian.bindea@analog.com>
1 parent 6bcbce8 commit 7bd4a32

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed
 

‎.github/workflows/mingwbuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
-e GITHUB_RUN_NUMBER=%GITHUB_RUN_NUMBER% ^
4545
-e RUNNER_ARCH=%RUNNER_ARCH% ^
4646
-e CI_SCRIPT=ON ^
47-
cristianbindea/scopy2-mingw64:latest C:\msys64\usr\bin\bash.exe -c '/home/docker/scopy/ci/windows/build_and_create_installer.sh'
47+
cristianbindea/scopy2-mingw64:latest C:\msys64\usr\bin\bash.exe -c '/home/docker/scopy/ci/windows/build_and_create_installer.sh run_workflow'
4848
4949
- name: Set short git commit SHA
5050
shell: bash

‎ci/windows/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*
2+
!build_and_create_installer.sh
23
!mingw_toolchain.sh
34
!windows_build_process.sh
45
!sigrokdecode-windows-fix.patch

‎ci/windows/build_and_create_installer.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ DEBUG_FOLDER=$ARTIFACT_FOLDER/debug-$ARCH
2626
PYTHON_FILES=$STAGING_DIR/lib/python3.*
2727
DLL_DEPS=$(cat $SRC_FOLDER/ci/windows/mingw_dll_deps)
2828
EMU_BUILD_FOLDER=$WORKDIR/iio-emu/build
29-
STAGING_AREA=$SRC_FOLDER/ci/windows/staging
3029
REGMAP_XMLS=$BUILD_FOLDER/plugins/plugins/regmap/xmls
3130

3231
# Generate build status info for the about page
@@ -170,18 +169,27 @@ create_installer() {
170169
popd
171170
}
172171

172+
# move the staging folder that contains the tools needed for the build to the known location
173+
move_tools(){
174+
[ -d /home/docker/staging ] && mv /home/docker/staging $STAGING_AREA || echo "Staging folder not found or already moved"
175+
if [ ! -d $STAGING_AREA ]; then
176+
echo "Missing tools folder, downloading now"
177+
download_tools
178+
fi
179+
}
180+
181+
173182
run_workflow(){
174-
download_tools
183+
[ "$CI_SCRIPT" == "ON" ] && move_tools || download_tools
175184
build_scopy
176185
build_iio-emu
177-
download_tools
178186
deploy_app
179187
bundle_drivers
180188
extract_debug_symbols
181189
create_installer
182190
}
183191

184-
run_workflow
192+
# run_workflow
185193

186194
for arg in $@; do
187195
$arg

‎ci/windows/docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ WORKDIR C:\\msys64\\home\\docker
3131

3232
COPY mingw_toolchain.sh C:/msys64/home/docker/scripts/mingw_toolchain.sh
3333
COPY windows_build_process.sh C:/msys64/home/docker/scripts/windows_build_process.sh
34+
COPY build_and_create_installer.sh C:/msys64/home/docker/scripts/build_and_create_installer.sh
3435
COPY sigrokdecode-windows-fix.patch C:/msys64/home/docker/scripts/sigrokdecode-windows-fix.patch
3536

3637
RUN C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syyu" & \
@@ -39,5 +40,7 @@ RUN C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syyu" & \
3940
C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syuu" & \
4041
C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syuu" & \
4142
C:\msys64\usr\bin\bash.exe -lc "C:/msys64/home/docker/scripts/windows_build_process.sh" & \
43+
C:\msys64\usr\bin\bash.exe -lc "C:/msys64/home/docker/scripts/build_and_create_installer.sh download_tools" & \
44+
C:\msys64\usr\bin\bash.exe -lc "mv C:/msys64/home/docker/scripts/staging C:/msys64/home/docker/staging" & \
4245
C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Scc " & \
4346
rmdir /s /q C:\msys64\home\docker\scripts

‎ci/windows/mingw_toolchain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ QWT_BRANCH=qwt-multiaxes-updated
2121
LIBTINYIIOD_BRANCH=master
2222
IIOEMU_BRANCH=master
2323

24+
STAGING_AREA=$WORKFOLDER/staging
2425
MINGW_VERSION=mingw64
2526
ARCH=x86_64
26-
STAGING_AREA=$WORKFOLDER/staging
2727

2828
USE_STAGING=$1
2929
if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ]

0 commit comments

Comments
 (0)
Please sign in to comment.