Skip to content

Commit

Permalink
ci/windows: ensure that the Docker Image contains the packaging tools
Browse files Browse the repository at this point in the history
Signed-off-by: Bindea Cristian <[email protected]>
  • Loading branch information
bindea-cristian committed Sep 6, 2024
1 parent 6842744 commit dd730fe
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mingwbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
-e GITHUB_RUN_NUMBER=%GITHUB_RUN_NUMBER% ^
-e RUNNER_ARCH=%RUNNER_ARCH% ^
-e CI_SCRIPT=ON ^
cristianbindea/scopy2-mingw64:testing C:\msys64\usr\bin\bash.exe -c '/home/docker/scopy/ci/windows/build_and_create_installer.sh'
cristianbindea/scopy2-mingw64:testing C:\msys64\usr\bin\bash.exe -c '/home/docker/scopy/ci/windows/build_and_create_installer.sh run_workflow'
- name: Set short git commit SHA
shell: bash
Expand Down
1 change: 1 addition & 0 deletions ci/windows/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*
!build_and_create_installer.sh
!mingw_toolchain.sh
!windows_build_process.sh
!sigrokdecode-windows-fix.patch
16 changes: 12 additions & 4 deletions ci/windows/build_and_create_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ DEBUG_FOLDER=$ARTIFACT_FOLDER/debug-$ARCH
PYTHON_FILES=$STAGING_DIR/lib/python3.*
DLL_DEPS=$(cat $SRC_FOLDER/ci/windows/mingw_dll_deps)
EMU_BUILD_FOLDER=$WORKDIR/iio-emu/build
STAGING_AREA=$SRC_FOLDER/ci/windows/staging
REGMAP_XMLS=$BUILD_FOLDER/plugins/plugins/regmap/xmls

# Generate build status info for the about page
Expand Down Expand Up @@ -170,18 +169,27 @@ create_installer() {
popd
}

# move the staging folder that contains the tools needed for the build to the known location
move_tools(){
[ -d /home/docker/staging ] && mv /home/docker/staging $STAGING_AREA || echo "Staging folder not found or already moved"
if [ ! -d $STAGING_AREA ]; then
echo "Missing tools folder, downloading now"
download_tools
fi
}


run_workflow(){
download_tools
[ "$CI_SCRIPT" == "ON" ] && move_tools || download_tools
build_scopy
build_iio-emu
download_tools
deploy_app
bundle_drivers
extract_debug_symbols
create_installer
}

run_workflow
# run_workflow

for arg in $@; do
$arg
Expand Down
3 changes: 3 additions & 0 deletions ci/windows/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ WORKDIR C:\\msys64\\home\\docker

COPY mingw_toolchain.sh C:/msys64/home/docker/scripts/mingw_toolchain.sh
COPY windows_build_process.sh C:/msys64/home/docker/scripts/windows_build_process.sh
COPY build_and_create_installer.sh C:/msys64/home/docker/scripts/build_and_create_installer.sh
COPY sigrokdecode-windows-fix.patch C:/msys64/home/docker/scripts/sigrokdecode-windows-fix.patch

RUN C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syyu" & \
Expand All @@ -39,5 +40,7 @@ RUN C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syyu" & \
C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syuu" & \
C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syuu" & \
C:\msys64\usr\bin\bash.exe -lc "C:/msys64/home/docker/scripts/windows_build_process.sh" & \
C:\msys64\usr\bin\bash.exe -lc "C:/msys64/home/docker/scripts/build_and_create_installer.sh download_tools" & \
C:\msys64\usr\bin\bash.exe -lc "mv C:/msys64/home/docker/scripts/staging C:/msys64/home/docker/staging" & \
C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Scc " & \
rmdir /s /q C:\msys64\home\docker\scripts
2 changes: 1 addition & 1 deletion ci/windows/mingw_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ QWT_BRANCH=qwt-multiaxes-updated
LIBTINYIIOD_BRANCH=master
IIOEMU_BRANCH=master

STAGING_AREA=$WORKFOLDER/staging
MINGW_VERSION=mingw64
ARCH=x86_64
STAGING_AREA=$WORKFOLDER/staging

USE_STAGING=$1
if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ]
Expand Down

0 comments on commit dd730fe

Please sign in to comment.