-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #966 from doitian/backport-windows-support-to-0.14.0
[ᚬrc/v0.14.0] Backport windows support and sentry cleanup to v0.14.0
- Loading branch information
Showing
31 changed files
with
582 additions
and
211 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,86 @@ | ||
trigger: | ||
branches: | ||
include: | ||
- '*' | ||
tags: | ||
include: | ||
- '*' | ||
|
||
jobs: | ||
- job: UnitTest | ||
condition: | | ||
and( | ||
not(startsWith(variables['Build.SourceBranch'], 'refs/tags/')), | ||
or( | ||
eq(variables['Build.Reason'], 'PullRequest'), | ||
eq(variables['Build.SourceBranch'], 'refs/heads/master'), | ||
startsWith(variables['Build.SourceBranch'], 'refs/heads/test') | ||
) | ||
) | ||
pool: | ||
vmImage: 'VS2017-Win2016' | ||
steps: | ||
- template: devtools/azure/windows-dependencies.yml | ||
parameters: | ||
rustup_toolchain: '1.34.2-x86_64-pc-windows-msvc' | ||
- script: make test | ||
displayName: Run unit tests | ||
|
||
- job: IntegrationTest | ||
condition: | | ||
and( | ||
not(startsWith(variables['Build.SourceBranch'], 'refs/tags/')), | ||
ne(variables['Build.Reason'], 'PullRequest') | ||
) | ||
pool: | ||
vmImage: 'VS2017-Win2016' | ||
steps: | ||
- template: devtools/azure/windows-dependencies.yml | ||
parameters: | ||
rustup_toolchain: '1.34.2-x86_64-pc-windows-msvc' | ||
- script: make integration-windows | ||
displayName: Run integration tests | ||
|
||
- job: Package | ||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') | ||
pool: | ||
vmImage: 'VS2017-Win2016' | ||
steps: | ||
- template: devtools/azure/windows-dependencies.yml | ||
parameters: | ||
rustup_toolchain: '1.34.2-x86_64-pc-windows-msvc' | ||
- script: make prod | ||
displayName: Build | ||
- powershell: | | ||
mkdir ckb_$(Build.SourceBranchName)_x86_64-pc-windows-msvc | ||
cp -r target/release/ckb.exe,README.md,CHANGELOG.md,COPYING,devtools/init,docs ckb_$(Build.SourceBranchName)_x86_64-pc-windows-msvc | ||
cp rpc/README.md ckb_$(Build.SourceBranchName)_x86_64-pc-windows-msvc/docs/rpc.md | ||
displayName: Prepare archive | ||
- task: ArchiveFiles@2 | ||
inputs: | ||
rootFolderOrFile: 'ckb_$(Build.SourceBranchName)_x86_64-pc-windows-msvc' | ||
archiveFile: '$(Build.ArtifactStagingDirectory)/ckb_$(Build.SourceBranchName)_x86_64-pc-windows-msvc.zip' | ||
- script: choco install -y gpg4win | ||
displayName: Install GPG4Win | ||
- task: DownloadSecureFile@1 | ||
inputs: | ||
secureFile: azure-secret.asc | ||
- script: | | ||
set PATH=%PATH%;%ProgramFiles(x86)%/GnuPG/bin | ||
gpg --import %DOWNLOADSECUREFILE_SECUREFILEPATH% | ||
echo "##vso[task.setvariable variable=PATH;]%PATH%;%ProgramFiles(x86)%/GnuPG/bin" | ||
displayName: Setup GPG | ||
- script: | | ||
gpg -u "Nervos Azure Builder <[email protected]>" -ab "$(Build.ArtifactStagingDirectory)/ckb_$(Build.SourceBranchName)_x86_64-pc-windows-msvc.zip" | ||
displayName: Sign Archive | ||
- task: GitHubRelease@0 | ||
inputs: | ||
gitHubConnection: nervos-bot | ||
repositoryName: nervosnetwork/ckb | ||
action: edit | ||
tag: $(Build.SourceBranchName) | ||
assets: | | ||
$(Build.ArtifactStagingDirectory)/*.zip | ||
$(Build.ArtifactStagingDirectory)/*.asc | ||
assetUploadMode: replace | ||
isPreRelease: true |
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,17 @@ | ||
parameters: | ||
rustup_toolchain: '' | ||
steps: | ||
- script: choco install -y llvm | ||
displayName: Install LLVM | ||
- script: choco install -y msys2 | ||
displayName: Install msys2 | ||
- script: | | ||
curl -sSf -o rustup-init.exe https://win.rustup.rs | ||
rustup-init.exe -y --default-toolchain ${{ parameters.rustup_toolchain }} | ||
set PATH=%PATH%;%USERPROFILE%\.cargo\bin | ||
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" | ||
displayName: Install rust | ||
- script: | | ||
rustc --version | ||
cargo --version | ||
displayName: Test/query rust and cargo versions |
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
Binary file not shown.
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,54 @@ | ||
# CKB Release Integrity Check | ||
|
||
All the binaries available from GitHub releases are signed via following PGP keys. | ||
|
||
| Version | Package | Unique ID | OpenPGP Key | Fingerprint | | ||
| --------- | -------------------- | -------------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------- | | ||
| >= 0.13.0 | macOS, Linux, CentOS | Nervos Travis Builder <[email protected]> | [F4631C0A](https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x4F37F694F4631C0A) | 64B7 05B5 6078 1FC5 4047 7B82 4F37 F694 F463 1C0A | | ||
| >= 0.14.0 | Windows | Nervos Azure Builder <[email protected]> | [AD748F26](https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x5EBA64ECAD748F26) | 0849 A2D2 4CA7 CFFC FA80 BCD4 5EBA 64EC AD74 8F26 | | ||
|
||
You can import the public keys from the keyserver network: | ||
|
||
``` | ||
gpg --recv-keys 4F37F694F4631C0A 5EBA64ECAD748F26 | ||
``` | ||
|
||
Once you have already imported the public keys, please download both the archive and | ||
the corresponding `.asc` file to verify the signature. For example, to check | ||
the signature of the file `ckb_v0.13.0_x86_64-apple-darwin.zip` | ||
|
||
``` | ||
gpg --verify ckb_v0.13.0_x86_64-apple-darwin.zip.asc ckb_v0.13.0_x86_64-apple-darwin.zip | ||
``` | ||
|
||
Note: you should never use a GnuPG version you just downloaded to check the integrity of the source — use an existing, trusted GnuPG installation, e.g., the one provided by your distribution. | ||
|
||
If the output of the above command is similar to the following, then either you don't have our public keys or the signature was generated by someone else and the file should be treated suspiciously. | ||
|
||
``` | ||
gpg: Signature made Wed 05 Jun 2019 10:12:22 PM UTC using RSA key ID F4631C0A | ||
gpg: Can't check signature: No public key | ||
``` | ||
|
||
If you instead see: | ||
|
||
``` | ||
gpg: Signature made Wed 05 Jun 2019 10:12:22 PM UTC using RSA key ID F4631C0A | ||
gpg: Good signature from "Nervos Travis Builder <[email protected]>" | ||
gpg: WARNING: This key is not certified with a trusted signature! | ||
gpg: There is no indication that the signature belongs to the owner. | ||
Primary key fingerprint: 64B7 05B5 6078 1FC5 4047 7B82 4F37 F694 F463 1C0A | ||
``` | ||
|
||
then you have a copy of our keys and the signatures are valid, but either you have not marked the keys as trusted or the keys are a forgery. In this case, at the very least, you should compare the fingerprints that are shown above. | ||
|
||
Ideally, you'll see something like: | ||
|
||
``` | ||
gpg: Signature made Wed 05 Jun 2019 10:12:22 PM UTC using RSA key ID F4631C0A | ||
gpg: checking the trustdb | ||
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model | ||
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u | ||
gpg: next trustdb check due at 2023-06-05 | ||
gpg: Good signature from "Nervos Travis Builder <[email protected]>" | ||
``` |
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.