Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update azure-pipelines.yml for Azure Pipelines #3

Merged
merged 2 commits into from Feb 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,6 @@ $armor/build> time make -j8

Armor works on 32-bit systems if SQLite is used instead of LMDB (we've experienced lots of problems building and running with lmdb in 32-bit compatibility mode, especially on iOS).

We build official x86 32-bit version for Windows only, because there is zero demand for 32-bit version for Linux or Mac.

Building source code for iOS, Android, Raspberry PI, etc is possible (we have experimental `armord` and `walletd` running on ARM64 iPhone) but requires major skills on your part. __TBD__

## Building on Big-Endian platforms
Expand Down
112 changes: 50 additions & 62 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
displayName: Install libudev

- script: |
mkdir bytecoin && cd bytecoin
mkdir armor && cd armor
git init
git remote add origin https://user:$(GithubPAT)@github.com/$(daemonsRepo)
git fetch --depth 1 origin $(Build.SourceBranch)
Expand All @@ -59,7 +59,7 @@ jobs:
displayName: Fetch boost

- script: |
git clone --single-branch --depth 1 https://github.com/bcndev/lmdb.git
git clone --single-branch --depth 1 https://github.com/armornetworkdev/lmdb.git
displayName: Clone LMDB

- script: |
Expand All @@ -71,16 +71,16 @@ jobs:
displayName: Build OpenSSL

- script: |
mkdir bytecoin/build && cd bytecoin/build
mkdir armor/build && cd armor/build
cmake .. && make -j$(nproc)
displayName: Build daemons

- script: |
zip -v -j $(Build.ArtifactStagingDirectory)/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-linux64.zip bytecoin/bin/bytecoind bytecoin/bin/minerd bytecoin/bin/walletd
zip -v -j $(Build.ArtifactStagingDirectory)/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-linux64.zip armor/bin/armord armor/bin/minerd armor/bin/walletd
displayName: Zip daemons

- script: |
zip -v -r $(Build.ArtifactStagingDirectory)/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-linux64-crypto.zip bytecoin/libs/libbytecoin-crypto.a bytecoin/src/*
zip -v -r $(Build.ArtifactStagingDirectory)/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-linux64-crypto.zip armor/libs/libarmor-crypto.a armor/src/*
displayName: Zip artifacts for future desktop build

- task: PublishBuildArtifacts@1
Expand All @@ -93,16 +93,11 @@ jobs:
####################### Macos #######################
- job: Mac
pool:
vmImage: macOS-10.13
vmImage: macOS-10.14
variables:
MACOSX_DEPLOYMENT_TARGET: 10.11
condition: |
and(
succeeded(),
or(
startsWith(variables['build.sourceBranch'], 'refs/heads/releases/'),
startsWith(variables['build.sourceBranch'], 'refs/tags/')
))
succeeded()
steps:
- checkout: none

Expand All @@ -111,15 +106,15 @@ jobs:
displayName: Install boost from Homebrew

- script: |
mkdir bytecoin && cd bytecoin
mkdir armor && cd armor
git init
git remote add origin https://user:$(GithubPAT)@github.com/$(daemonsRepo)
git fetch --depth 1 origin $(Build.SourceBranch)
git checkout FETCH_HEAD
displayName: Clone daemons code

- script: |
git clone --single-branch --depth 1 https://github.com/bcndev/lmdb.git
git clone --single-branch --depth 1 https://github.com/armornetworkdev/lmdb.git
displayName: Clone LMDB

- script: |
Expand All @@ -131,16 +126,16 @@ jobs:
displayName: Build OpenSSL

- script: |
mkdir bytecoin/build && cd bytecoin/build
mkdir armor/build && cd armor/build
cmake .. && make -j
displayName: Build daemons

- script: |
zip -v -j $(Build.ArtifactStagingDirectory)/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-macos.zip bytecoin/bin/bytecoind bytecoin/bin/minerd bytecoin/bin/walletd
zip -v -j $(Build.ArtifactStagingDirectory)/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-macos.zip armor/bin/armord armor/bin/minerd armor/bin/walletd
displayName: Zip daemons

- script: |
zip -v -r $(Build.ArtifactStagingDirectory)/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-macos-crypto.zip bytecoin/libs/libbytecoin-crypto.a bytecoin/src/*
zip -v -r $(Build.ArtifactStagingDirectory)/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-macos-crypto.zip armor/libs/libarmor-crypto.a armor/src/*
displayName: Zip artifacts for future desktop build

- task: PublishBuildArtifacts@1
Expand All @@ -155,12 +150,7 @@ jobs:
pool:
vmImage: vs2017-win2016
condition: |
and(
succeeded(),
or(
startsWith(variables['build.sourceBranch'], 'refs/heads/releases/'),
startsWith(variables['build.sourceBranch'], 'refs/tags/')
))
succeeded()
variables:
vsPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
vsCMakeDir: $(vsPath)\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin
Expand All @@ -173,17 +163,12 @@ jobs:
opensslConfig: VC-WIN64A
generatorName: Visual Studio 15 2017 Win64
arch: 64
win32:
opensslDir: openssl32
opensslConfig: VC-WIN32
generatorName: Visual Studio 15 2017
arch: 32
steps:
- checkout: none

- bash: |
curl -O http://strawberryperl.com/download/5.28.1.1/strawberry-perl-5.28.1.1-64bit-portable.zip
7z x strawberry-perl-5.28.1.1-64bit-portable.zip -ostrawberry-perl
curl -O https://strawberryperl.com/download/5.28.2.1/strawberry-perl-5.28.2.1-64bit-portable.zip
7z x strawberry-perl-5.28.2.1-64bit-portable.zip -ostrawberry-perl
displayName: Install ActivePerl (required to build OpenSSL)

- bash: |
Expand All @@ -192,7 +177,7 @@ jobs:
displayName: Install Jom

- bash: |
mkdir bytecoin && cd bytecoin
mkdir armor && cd armor
git init
git remote add origin https://user:$(GithubPAT)@github.com/$(daemonsRepo)
git fetch --depth 1 origin $(Build.SourceBranch)
Expand All @@ -206,7 +191,7 @@ jobs:
displayName: Fetch boost

- bash: |
git clone --single-branch --depth 1 https://github.com/bcndev/lmdb.git
git clone --single-branch --depth 1 https://github.com/armornetworkdev/lmdb.git
displayName: Clone LMDB

- bash: |
Expand All @@ -232,29 +217,29 @@ jobs:
displayName: Build OpenSSL

- bash: |
mkdir bytecoin/build && cd bytecoin/build
mkdir armor/build && cd armor/build
"$(vsCMakeDir)"/cmake.exe -G "$(generatorName)" --config RelWithDebInfo ..
CL=/MP
"$(vsMSBuildDir)"/msbuild.exe ALL_BUILD.vcxproj -maxcpucount -p:Configuration=RelWithDebInfo
displayName: Build daemons

- bash: |
mv -v bytecoin/bin/RelWithDebInfo/* bytecoin/bin
mv -v bytecoin/libs/RelWithDebInfo/* bytecoin/libs
mv -v armor/bin/RelWithDebInfo/* armor/bin
mv -v armor/libs/RelWithDebInfo/* armor/libs
displayName: Move daemons from RelWithDebInfo to bin/ or libs/

- bash: |
7z a "$(Build.ArtifactStagingDirectory)"/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-win$(arch).zip \
./bytecoin/bin/bytecoind.exe \
./bytecoin/bin/bytecoind.pdb \
./bytecoin/bin/minerd.exe \
./bytecoin/bin/minerd.pdb \
./bytecoin/bin/walletd.exe \
./bytecoin/bin/walletd.pdb
7z a "$(Build.ArtifactStagingDirectory)"/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-win$(arch).zip \
./armor/bin/armord.exe \
./armor/bin/armord.pdb \
./armor/bin/minerd.exe \
./armor/bin/minerd.pdb \
./armor/bin/walletd.exe \
./armor/bin/walletd.pdb
displayName: Zip daemons

- bash: |
7z a "$(Build.ArtifactStagingDirectory)"/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-win$(arch)-crypto.zip bytecoin/libs/bytecoin-crypto.lib bytecoin/src
7z a "$(Build.ArtifactStagingDirectory)"/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-win$(arch)-crypto.zip armor/libs/armor-crypto.lib armor/src
displayName: Zip artifacts for future desktop build

- task: PublishBuildArtifacts@1
Expand All @@ -272,10 +257,7 @@ jobs:
- Mac
- Windows
condition: |
and(
succeeded(),
startsWith(variables['build.sourceBranch'], 'refs/heads/releases/')
)
succeeded()
steps:
- checkout: none

Expand All @@ -292,9 +274,9 @@ jobs:
ls -alh $(Build.ArtifactStagingDirectory)
[[ `echo $(Build.SourceBranchName) | grep '-'` ]] && preRelease=true || preRelease=false
curl -H "Authorization: token $(GithubPAT)" \
-d '{ "tag_name": "v$(Build.SourceBranchName)",
"target_commitish": "$(Build.SourceVersion)",
"name": "v$(Build.SourceBranchName)",
-d '{ "tag_name": "v$(TagName)",
"target_commitish": "$(Build.SourceBranchName)",
"name": "v$(TagName)",
"draft": true,
"prerelease": '$preRelease'}' \
https://api.github.com/repos/$(daemonsRepo)/releases > resp
Expand All @@ -304,25 +286,31 @@ jobs:
curl \
-H "Authorization: token $(GithubPAT)" \
-H "Content-Type: application/zip" -X POST \
--data-binary "@$(Build.ArtifactStagingDirectory)/linux64/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-linux64.zip" \
https://uploads.github.com/repos/$(daemonsRepo)/releases/$release_id/assets?name="$(System.TeamProject)-daemons-$(Build.SourceBranchName)-linux64.zip"
--data-binary "@$(Build.ArtifactStagingDirectory)/linux64/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-linux64.zip" \
https://uploads.github.com/repos/$(daemonsRepo)/releases/$release_id/assets?name="$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-linux64.zip"
curl \
-H "Authorization: token $(GithubPAT)" \
-H "Content-Type: application/zip" -X POST \
--data-binary "@$(Build.ArtifactStagingDirectory)/macos/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-macos.zip" \
https://uploads.github.com/repos/$(daemonsRepo)/releases/$release_id/assets?name="$(System.TeamProject)-daemons-$(Build.SourceBranchName)-macos.zip"
--data-binary "@$(Build.ArtifactStagingDirectory)/linux64/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-linux64-crypto.zip" \
https://uploads.github.com/repos/$(daemonsRepo)/releases/$release_id/assets?name="$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-linux64-crypto.zip"
curl \
-H "Authorization: token $(GithubPAT)" \
-H "Content-Type: application/zip" -X POST \
--data-binary "@$(Build.ArtifactStagingDirectory)/win64/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-win64.zip" \
https://uploads.github.com/repos/$(daemonsRepo)/releases/$release_id/assets?name="$(System.TeamProject)-daemons-$(Build.SourceBranchName)-win64.zip"
--data-binary "@$(Build.ArtifactStagingDirectory)/macos/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-macos.zip" \
https://uploads.github.com/repos/$(daemonsRepo)/releases/$release_id/assets?name="$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-macos.zip"
curl \
-H "Authorization: token $(GithubPAT)" \
-H "Content-Type: application/zip" -X POST \
--data-binary "@$(Build.ArtifactStagingDirectory)/win32/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-win32.zip" \
https://uploads.github.com/repos/$(daemonsRepo)/releases/$release_id/assets?name="$(System.TeamProject)-daemons-$(Build.SourceBranchName)-win32.zip"
--data-binary "@$(Build.ArtifactStagingDirectory)/macos/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-macos-crypto.zip" \
https://uploads.github.com/repos/$(daemonsRepo)/releases/$release_id/assets?name="$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-macos-crypto.zip"
curl \
-H "Authorization: token $(GithubPAT)" \
-H "Content-Type: application/zip" -X POST \
--data-binary "@$(Build.ArtifactStagingDirectory)/win64/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-win64.zip" \
https://uploads.github.com/repos/$(daemonsRepo)/releases/$release_id/assets?name="$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-win64.zip"
curl \
-H "Authorization: token $(GithubPAT)" \
-H "Content-Type: application/zip" -X POST \
--data-binary "@$(Build.ArtifactStagingDirectory)/win64/$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-win64-crypto.zip" \
https://uploads.github.com/repos/$(daemonsRepo)/releases/$release_id/assets?name="$(System.TeamProject)-daemons-$(Build.SourceBranchName)-$(TagName)-win64-crypto.zip"
displayName: Create github release in daemons repo

- script: |
curl -H "Authorization: token $(GithubPAT)" -X DELETE https://api.github.com/repos/$(daemonsRepo)/git/$(Build.SourceBranch)
displayName: Remove branch created for the build