Skip to content

Commit

Permalink
Properly mark packages as a daily build.
Browse files Browse the repository at this point in the history
  • Loading branch information
hipersayanX committed Jun 27, 2024
1 parent 34cefc8 commit 9fccc57
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
12 changes: 8 additions & 4 deletions ports/ci/appveyor/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ if "%CMAKE_GENERATOR%" == "MSYS Makefiles" (
-B build-x64 ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^
-DDAILY_BUILD="%DAILY_BUILD%"
cmake --build build-x64 --parallel "%NJOBS%"
cmake --build build-x64 --target install
)
Expand All @@ -48,7 +49,8 @@ if "%CMAKE_GENERATOR:~0,13%" == "Visual Studio" (
-G "%CMAKE_GENERATOR%" ^
-A x64 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^
-DDAILY_BUILD="%DAILY_BUILD%"
cmake --build build-x64 --config Release --parallel "%NJOBS%"
cmake --build build-x64 --config Release --target install
)
Expand All @@ -68,7 +70,8 @@ if "%CMAKE_GENERATOR%" == "MSYS Makefiles" (
-B build-x86 ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^
-DDAILY_BUILD="%DAILY_BUILD%"
cmake --build build-x86 --parallel "%NJOBS%"
cmake --build build-x86 --target install
)
Expand All @@ -83,7 +86,8 @@ if "%CMAKE_GENERATOR:~0,13%" == "Visual Studio" (
-G "%CMAKE_GENERATOR%" ^
-A Win32 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^
-DDAILY_BUILD="%DAILY_BUILD%"
cmake --build build-x86 --config Release --parallel "%NJOBS%"
cmake --build build-x86 --config Release --target install
)
2 changes: 2 additions & 0 deletions ports/ci/linux-mingw/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ x86_64-w64-mingw32-cmake \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_C_COMPILER="x86_64-w64-mingw32-${COMPILER_C}" \
-DCMAKE_CXX_COMPILER="x86_64-w64-mingw32-${COMPILER_CXX}" \
-DDAILY_BUILD="${DAILY_BUILD}" \
${EXTRA_PARAMS}
cmake --build ${buildDir} --parallel ${NJOBS}
cmake --build ${buildDir} --target install
Expand All @@ -61,6 +62,7 @@ i686-w64-mingw32-cmake \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_C_COMPILER="i686-w64-mingw32-${COMPILER_C}" \
-DCMAKE_CXX_COMPILER="i686-w64-mingw32-${COMPILER_CXX}" \
-DDAILY_BUILD="${DAILY_BUILD}" \
${EXTRA_PARAMS}
cmake --build ${buildDir} --parallel ${NJOBS}
cmake --build ${buildDir} --target install
4 changes: 3 additions & 1 deletion ports/ci/mac/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_C_COMPILER="${COMPILER_C}" \
-DCMAKE_CXX_COMPILER="${COMPILER_CXX}"
-DCMAKE_CXX_COMPILER="${COMPILER_CXX}" \
-DDAILY_BUILD="${DAILY_BUILD}" \
${EXTRA_PARAMS}
cmake --build build --parallel ${NJOBS}
cmake --build build --target install
2 changes: 2 additions & 0 deletions ports/ci/windows-msys/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ cmake \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_C_COMPILER="${COMPILER_C}" \
-DCMAKE_CXX_COMPILER="${COMPILER_CXX}" \
-DDAILY_BUILD="${DAILY_BUILD}" \
${EXTRA_PARAMS}
cmake --build ${buildDir} --parallel ${NJOBS}
cmake --build ${buildDir} --target install
Expand All @@ -69,6 +70,7 @@ cmake \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_C_COMPILER="${COMPILER_C}" \
-DCMAKE_CXX_COMPILER="${COMPILER_CXX}" \
-DDAILY_BUILD="${DAILY_BUILD}" \
${EXTRA_PARAMS}
cmake --build ${buildDir} --parallel ${NJOBS}
cmake --build ${buildDir} --target install
6 changes: 4 additions & 2 deletions ports/ci/windows-vs/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ cmake ^
-G "%CMAKE_GENERATOR%" ^
-A x64 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^
-DDAILY_BUILD="%DAILY_BUILD%"
cmake --build build-x64 --config Release --parallel "%NJOBS%"
cmake --build build-x64 --config Release --target install

Expand All @@ -49,6 +50,7 @@ cmake ^
-G "%CMAKE_GENERATOR%" ^
-A Win32 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^
-DDAILY_BUILD="%DAILY_BUILD%"
cmake --build build-x86 --config Release --parallel "%NJOBS%"
cmake --build build-x86 --config Release --target install

3 comments on commit 9fccc57

@TonyInTaiwan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to learn this driver codes, due to I am a junior engineer .
Could you teach me step by step for compile this driver in MSYS2 ? MSYS2 has been installed
e.g.
enter to MSYS2 MINGW64
$
how to next......
Thanks in advance

@hipersayanX
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to build using MSYS, first at all install these packages.
Then build for x64

ORIG_PATH=$PATH

# Point to the 64 bit compiler tools
export PATH=/mingw64/bin:/c/msys64/mingw64/bin:/c/msys64/usr/bin:${ORIG_PATH}

mkdir -p build-x64
cmake \
    -S /path/to/the/source/code \
    -B build-x64 \
    -DCMAKE_INSTALL_PREFIX="${PWD}/vcam-binaries" 
cmake --build build-x64
cmake --build build-x64 --target install

and x86

# Point to the 32 bit compiler tools
# 
# Note that this is the only key difference with the previous command, and this is what make the difference when compiling for one or another architecture.
# There is also another option that is setting the variables CC, CXX, AR, LD, NM, OBJCOPY, OBJDUMP, RANLIB, and STRIP without touching PATH, but this is the simplest way.
export PATH=/mingw32/bin:/c/msys64/mingw32/bin:/c/msys64/usr/bin:${ORIG_PATH}

mkdir -p build-x86
cmake \
    -S /path/to/the/source/code \
    -B build-x86 \
    -DCMAKE_INSTALL_PREFIX="${PWD}/vcam-binaries" 
cmake --build build-x86
cmake --build build-x86 --target install

Then, if you are running the commands manually, restore back the PATH variable, not required if running inside a bash script.

export PATH=$ORIG_PATH

@TonyInTaiwan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good~ Thanks a lot

Please sign in to comment.