Skip to content

Commit

Permalink
ci: test build packages (tari-project#3282)
Browse files Browse the repository at this point in the history
Fix windows build and auto create releases on tags
  • Loading branch information
stringhandler authored and Cifko committed Sep 10, 2021
1 parent 856a4b6 commit 26467d3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 37 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ jobs:
echo "Branch: ${VBRANCH}"
echo "Sha: ${VSHA_SHORT}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "VSHA_SHORT=${VSHA_SHORT}" >> $GITHUB_ENV
#BINFILE="${TBN_FILENAME}-${VERSION}-${VSHA_SHORT}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}${TBN_EXT}"
BINFILE="${TBN_FILENAME}-${VERSION}-${VSHA_SHORT}-${{ matrix.os }}-${{ matrix.target_cpu }}${TBN_EXT}"
echo "BINFILE=${BINFILE}" >> $GITHUB_ENV
Expand All @@ -169,12 +170,20 @@ jobs:
cp -v "$GITHUB_WORKSPACE/target/release/tari_mining_node${TBN_EXT}" .
- name: Build the windows installer
shell: cmd
if: startsWith(runner.os,'Windows')
run: |
VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/[\"]/, "", $2); printf("%s",$2) }' "$GITHUB_WORKSPACE/applications/tari_base_node/Cargo.toml")
cd buildtools
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "/DMyAppVersion=${VERSION}-${VSHA_SHORT}-release" "windows_inno_installer.iss"
shell: cmd
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "/DMyAppVersion=${{ env.VERSION }}-${{ env.VSHA_SHORT }}-release" "windows_inno_installer.iss"
- name: Upload artifact for Windows installer
uses: actions/upload-artifact@v2
if: startsWith(runner.os,'Windows')
with:
name: "tari_windows_installer"
path: '${{ github.workspace }}/buildtools/Output/*'


- name: Archive and Sign Binaries
shell: bash
Expand All @@ -190,11 +199,11 @@ jobs:
${SHARUN} --check "${{ env.BINFILE }}.zip.sha256"
#rm -f "${BINFILE}"
- name: Artifact archvie
- name: Artifact archive
uses: actions/upload-artifact@v2
with:
#name: ${{ env.TBN_FILENAME }}-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}
name: ${{ env.TBN_FILENAME }}-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.os }}-${{ matrix.target_cpu }}
name: tari_binary_archive-${{ matrix.os }}-${{ matrix.target_cpu }}
path: '${{ github.workspace }}${{ env.TBN_DIST }}/${{ env.BINFILE }}.zip*'

- name: Sync dist to S3 - Bash
Expand Down Expand Up @@ -259,3 +268,18 @@ jobs:
S3OPTIONS: '--recursive --exclude "*" --include "*.zip*"'
# S3OPTIONS: '--recursive --exclude "*" --include "*.zip*"'
# S3OPTIONS: '--acl public-read'

create-release:
runs-on: ubuntu-latest
needs: builds
if: ${{ env.AWS_SECRET_ACCESS_KEY != '' && matrix.os != 'self-hosted' && startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: Download binaries
uses: actions/download-artifact@v2
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "tari_*/**/*"
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
draft: true
41 changes: 10 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ sudo apt-get install -y powershell

First you'll need to make sure you have a full development environment set up:

- git

- https://git-scm.com/downloads

- LLVM

- https://releases.llvm.org/
Expand All @@ -132,33 +128,16 @@ First you'll need to make sure you have a full development environment set up:
- Build Tools
- Microsoft Visual Studio Version 2019 or later
- C++ CMake tools for Windows
- MSVC build tools (latest version for your platform ARM, ARM64 or x64.x86)
- Spectre-mitigated libs (latest version for your platform ARM, ARM64 or x64.x86)
or
- [CMake](https://cmake.org/download/)
- [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16)
- SQLite:
- Download 32bit/64bit Precompiled Binaries for Windows for [SQL Lite](https://www.sqlite.org/index.html) and unzip
to local path, e.g. `%USERPROFILE%\.sqlite`
- Open the appropriate x64\x86 `Native Tools Command Prompt for VS 2019` in `%USERPROFILE%\.sqlite`
- Run either of these, depending on your environment (32bit/64bit):
```
lib /DEF:sqlite3.def /OUT:sqlite3.lib /MACHINE:x64
```
```
lib /DEF:sqlite3.def /OUT:sqlite3.lib /MACHINE:x86
```
- Ensure the directory containing `sqlite3.dll`, e.g. `%USERPROFILE%\.sqlite`, is in the path
- Create a `SQLITE3_LIB_DIR` environment variable pointing to the SQLite lib path, e.g.
```
setx SQLITE3_LIB_DIR "%USERPROFILE%\.sqlite"
```
- [CMake](https://cmake.org/download/) (Used for RandomX)
- Either:
- Microsoft Visual Studio Version 2019 or later
- C++ CMake tools for Windows
- MSVC build tools (latest version for your platform ARM, ARM64 or x64.x86)
- Spectre-mitigated libs (latest version for your platform ARM, ARM64 or x64.x86)
or
- [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16)
- Perl for OpenSSL:
Expand Down
2 changes: 1 addition & 1 deletion buildtools/windows_inno_installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ MinVersion=0,6.1
VersionInfoCompany=The Tari Developer Community
VersionInfoProductName=tari_base_node
InfoAfterFile="..\applications\tari_base_node\windows\README.md"
SignTool=SignTool
;SignTool=SignTool

PrivilegesRequired=none

Expand Down

0 comments on commit 26467d3

Please sign in to comment.