forked from python/cpython
-
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.
- Loading branch information
Showing
3,934 changed files
with
634,311 additions
and
271,808 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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,26 @@ | ||
# Locate a set of the tools used for builds | ||
|
||
steps: | ||
- template: windows-release/find-sdk.yml | ||
parameters: | ||
toolname: 'signtool.exe' | ||
|
||
- powershell: | | ||
$vcvarsall = (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" ` | ||
-prerelease ` | ||
-latest ` | ||
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ` | ||
-find VC\Auxiliary\Build\vcvarsall.bat) | ||
Write-Host "Found vcvarsall at $vcvarsall" | ||
Write-Host "##vso[task.setVariable variable=vcvarsall]$vcvarsall" | ||
displayName: 'Find vcvarsall.bat' | ||
- powershell: | | ||
$msbuild = (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" ` | ||
-prerelease ` | ||
-latest ` | ||
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ` | ||
-find MSBuild\Current\Bin\msbuild.exe) | ||
Write-Host "Found MSBuild at $msbuild" | ||
Write-Host "##vso[task.setVariable variable=msbuild]$msbuild" | ||
displayName: 'Find MSBuild' |
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,86 @@ | ||
name: $(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr) | ||
|
||
variables: | ||
IntDir: '$(Build.BinariesDirectory)' | ||
OutDir: '$(Build.ArtifactStagingDirectory)' | ||
|
||
# MUST BE SET AT QUEUE TIME | ||
# SigningCertificate: 'Python Software Foundation' | ||
# SourcesRepo: 'https://github.com/python/cpython-source-deps' | ||
# SourceTag: 'libffi-3.4.2' | ||
|
||
jobs: | ||
- job: Build_LibFFI | ||
displayName: LibFFI | ||
pool: | ||
vmImage: windows-latest | ||
|
||
workspace: | ||
clean: all | ||
|
||
steps: | ||
- checkout: none | ||
|
||
- template: ./find-tools.yml | ||
|
||
- powershell: | | ||
mkdir -Force "$(IntDir)\script" | ||
iwr "https://github.com/python/cpython/raw/main/PCbuild/prepare_libffi.bat" ` | ||
-outfile "$(IntDir)\script\prepare_libffi.bat" | ||
displayName: 'Download build script' | ||
- powershell: | | ||
git clone $(SourcesRepo) -b $(SourceTag) --depth 1 -c core.autocrlf=false -c core.eol=lf . | ||
displayName: 'Check out LibFFI sources' | ||
- script: 'prepare_libffi.bat --install-cygwin' | ||
workingDirectory: '$(IntDir)\script' | ||
displayName: 'Install Cygwin and build' | ||
env: | ||
VCVARSALL: '$(vcvarsall)' | ||
LIBFFI_SOURCE: '$(Build.SourcesDirectory)' | ||
LIBFFI_OUT: '$(OutDir)' | ||
|
||
- powershell: | | ||
if ((gci *\*.dll).Count -lt 4) { | ||
Write-Error "Did not generate enough DLL files" | ||
} | ||
if ((gci *\Include\ffi.h).Count -lt 4) { | ||
Write-Error "Did not generate enough include files" | ||
} | ||
failOnStderr: true | ||
workingDirectory: '$(OutDir)' | ||
displayName: 'Verify files were created' | ||
- publish: '$(OutDir)' | ||
artifact: 'unsigned' | ||
displayName: 'Publish unsigned build' | ||
|
||
- job: Sign_LibFFI | ||
displayName: Sign LibFFI | ||
dependsOn: Build_LibFFI | ||
pool: | ||
name: 'Windows Release' | ||
|
||
workspace: | ||
clean: all | ||
|
||
steps: | ||
- checkout: none | ||
- download: current | ||
artifact: unsigned | ||
|
||
- template: ./find-tools.yml | ||
|
||
- powershell: | | ||
signtool sign /q /a ` | ||
/n "Python Software Foundation" ` | ||
/fd sha256 ` | ||
/tr http://timestamp.digicert.com/ /td sha256 ` | ||
/d "LibFFI for Python" ` | ||
(gci "$(Pipeline.Workspace)\unsigned\*.dll" -r) | ||
displayName: 'Sign files' | ||
- publish: '$(Pipeline.Workspace)\unsigned' | ||
artifact: 'libffi' | ||
displayName: 'Publish libffi' |
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
Oops, something went wrong.