-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows packaging build with Gitlab CI
We use a specific runner on Inria CloudStack. This allows us to have the same build infrastructure setup for signed and unsigned binary packages. The main Coq repository on Gitlab will produce unsigned binaries, using a runner without secret. On my repository, a one-click operation will sign the packages, making this part of the release process smoother.
- Loading branch information
1 parent
5da17b8
commit da489b1
Showing
3 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@ECHO OFF | ||
|
||
REM This script builds and signs the Windows packages on Gitlab | ||
|
||
if %ARCH% == 32 ( | ||
SET ARCHLONG=i686 | ||
SET CYGROOT=C:\cygwin | ||
SET SETUP=setup-x86.exe | ||
) | ||
|
||
if %ARCH% == 64 ( | ||
SET ARCHLONG=x86_64 | ||
SET CYGROOT=C:\cygwin64 | ||
SET SETUP=setup-x86_64.exe | ||
) | ||
|
||
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://www.cygwin.com/%SETUP%', '%SETUP%')" | ||
SET CYGCACHE=%CYGROOT%\var\cache\setup | ||
SET CI_PROJECT_DIR_MFMT=%CI_PROJECT_DIR:\=/% | ||
SET CI_PROJECT_DIR_CFMT=%CI_PROJECT_DIR_MFMT:C:/=/cygdrive/c/% | ||
SET DESTCOQ=C:\coq%ARCH%_inst | ||
SET COQREGTESTING=Y | ||
SET PATH=%PATH%;C:\Program Files\7-Zip\;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin | ||
|
||
if exist %CYGROOT%\build\ rd /s /q %CYGROOT%\build | ||
if exist %DESTCOQ%\ rd /s /q %DESTCOQ% | ||
|
||
call %CI_PROJECT_DIR%\dev\build\windows\MakeCoq_MinGW.bat -threads=1 ^ | ||
-arch=%ARCH% -installer=Y -coqver=%CI_PROJECT_DIR_CFMT% ^ | ||
-destcyg=%CYGROOT% -destcoq=%DESTCOQ% -cygcache=%CYGCACHE% ^ | ||
-addon=bignums -make=N ^ | ||
-setup %CI_PROJECT_DIR%\%SETUP% || GOTO ErrorExit | ||
|
||
copy "%CYGROOT%\build\coq-local\dev\nsis\*.exe" dev\nsis || GOTO ErrorExit | ||
7z a coq-opensource-archive-windows-%ARCHLONG%.zip %CYGROOT%\build\tarballs\* || GOTO ErrorExit | ||
|
||
REM DO NOT echo the signing command below, as this would leak secrets in the logs | ||
IF DEFINED WIN_CERTIFICATE_PATH ( | ||
IF DEFINED WIN_CERTIFICATE_PASSWORD ( | ||
ECHO Signing package | ||
@signtool sign /f %WIN_CERTIFICATE_PATH% /p %WIN_CERTIFICATE_PASSWORD% dev\nsis\*.exe | ||
signtool verify /pa dev\nsis\*.exe | ||
) | ||
) | ||
|
||
GOTO :EOF | ||
|
||
:ErrorExit | ||
ECHO ERROR %0 failed | ||
EXIT /b 1 |