-
Notifications
You must be signed in to change notification settings - Fork 2
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
initial win support #260
Merged
Merged
initial win support #260
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
8967e9b
initial win support
solarw da1579a
Merge branch 'main' of github.com:valory-xyz/olas-operate-app into fe…
solarw 18c234b
Merge branch 'staging' of github.com:valory-xyz/olas-operate-app into…
solarw d1015e7
win: process kill fixes
solarw 0e5dfbf
Merge branch 'staging' of github.com:valory-xyz/olas-operate-app into…
solarw 0930ac2
win: tendermint installation automated
solarw e42ba6e
helthchecker env vars to switch it off. small refactoring
solarw f793a03
Merge branch 'feat/contract-migration-ui' of github.com:valory-xyz/ol…
solarw bccc559
service hash id updated
solarw 8f6cea6
use bundled in tendermint.exe, not download it
solarw d06eb95
Merge branch 'staging' of github.com:valory-xyz/olas-operate-app into…
solarw bc234f8
Merge branch 'staging' of github.com:valory-xyz/olas-operate-app into…
solarw 5d6b007
Merge branch 'staging' of github.com:valory-xyz/olas-operate-app into…
solarw b398318
Merge branch 'main' of github.com:valory-xyz/olas-operate-app into fe…
solarw d80ef14
lint fixes
solarw 9209c3f
win release updates
solarw 88c39ab
Merge branch 'staging' of github.com:valory-xyz/olas-operate-app into…
solarw 19c375d
workflow cleanup
solarw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Release for Windows | ||
|
||
# This workflow is triggered on pushing a tag BE CAREFUL this application AUTO UPDATES !!! | ||
# git tag vX.Y.Z | ||
# git push origin tag vX.Y.Z | ||
|
||
# on: [pull_request] | ||
|
||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
build-windows: | ||
runs-on: windows-latest | ||
#strategy: | ||
# matrix: | ||
# arch: [ x64, arm64 ] | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install and configure Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
# version: '1.4.0' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we pin the version so we don't have conflicts in future? @solarw |
||
virtualenvs-create: true | ||
virtualenvs-in-project: false | ||
virtualenvs-path: ~/my-custom-path | ||
installer-parallel: true | ||
#- name: Setup tmate session | ||
# uses: mxschmitt/action-tmate@v3 | ||
- name: Install dependencies | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same? |
||
run: poetry install | ||
|
||
- name: install node deps | ||
run: yarn install-deps | ||
|
||
- name: set env vars to prod.env | ||
env: | ||
NODE_ENV: production | ||
DEV_RPC: https://rpc-gate.autonolas.tech/gnosis-rpc/ | ||
IS_STAGING: ${{ github.ref != 'refs/heads/main' && 'true' || 'false' }} | ||
FORK_URL: https://rpc-gate.autonolas.tech/gnosis-rpc/ | ||
GH_TOKEN: ${{ secrets.github_token}} | ||
run: | | ||
echo NODE_ENV=$NODE_ENV >> prod.env | ||
echo DEV_RPC=$DEV_RPC >> prod.env | ||
echo IS_STAGING=$IS_STAGING >> prod.env | ||
echo FORK_URL=$FORK_URL >> prod.env | ||
cat prod.env | ||
echo GH_TOKEN=$GH_TOKEN >> prod.env | ||
- run: rm -rf /dist | ||
- name: "Build, notarize, publish" | ||
run: make build |
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,49 @@ | ||
|
||
define setup_env | ||
$(eval ENV_FILE := $(1).env) | ||
@echo " - setup env $(ENV_FILE)" | ||
$(eval include $(1).env) | ||
$(eval export) | ||
endef | ||
|
||
|
||
./trader/: | ||
pwd | ||
git clone https://github.com/valory-xyz/trader.git | ||
|
||
./dist/aea_win.exe: ./trader/ | ||
mkdir -p dist | ||
cd trader && poetry install && poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots --hidden-import grpc --hidden-import openapi_core --collect-all google.protobuf --collect-all openapi_core --collect-all openapi_spec_validator --collect-all asn1crypto --hidden-import py_ecc --hidden-import pytz --onefile pyinstaller/trader_bin.py --name trader_win | ||
cp -f trader/dist/trader_win.exe ./dist/aea_win.exe | ||
pwd | ||
|
||
|
||
./dist/tendermint_win.exe: ./operate/ | ||
pwd | ||
poetry install && poetry run pyinstaller operate/services/utils/tendermint.py --onefile --name tendermint_win | ||
|
||
|
||
./dist/pearl_win.exe: ./operate/ ./dist/aea_win.exe ./dist/tendermint_win.exe | ||
pwd | ||
poetry install && poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all coincurve --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots operate/pearl.py --add-binary dist/aea_win.exe:. --add-binary dist/tendermint_win.exe:. --onefile --name pearl_win | ||
|
||
|
||
.PHONY: build | ||
build: ./dist/pearl_win.exe | ||
$(call setup_env, prod) | ||
echo ${DEV_RPC} | ||
mkdir -p ./electron/bins | ||
cp -f dist/pearl_win.exe ./electron/bins/pearl_win.exe | ||
echo ${NODE_ENV} | ||
NODE_ENV=${NODE_ENV} DEV_RPC=${DEV_RPC} FORK_URL=${FORK_URL} yarn build:frontend | ||
NODE_ENV=${NODE_ENV} DEV_RPC=${DEV_RPC} FORK_URL=${FORK_URL} GH_TOKEN=${GH_TOKEN} node build-win.js | ||
|
||
|
||
.PHONY: build-tenderly | ||
build-tenderly: ./dist/pearl_win.exe | ||
$(call setup_env, dev-tenderly) | ||
echo ${DEV_RPC} | ||
cp -f dist/pearl_win.exe ./electron/bins/pearl_win.exe | ||
echo ${NODE_ENV} | ||
NODE_ENV=${NODE_ENV} DEV_RPC=${DEV_RPC} FORK_URL=${FORK_URL} yarn build:frontend | ||
GH_TOKEN=${GH_TOKEN} node build-win-tenderly.js |
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,38 @@ | ||
/** | ||
* This script is used to build the electron app **with notarization**. It is used for the final build and release process. | ||
*/ | ||
require('dotenv').config(); | ||
const build = require('electron-builder').build; | ||
|
||
const { publishOptions } = require('./electron/constants'); | ||
|
||
const main = async () => { | ||
console.log('Building...'); | ||
|
||
/** @type import {CliOptions} from "electron-builder" */ | ||
await build({ | ||
publish: 'onTag', | ||
config: { | ||
appId: 'xyz.valory.olas-operate-app', | ||
artifactName: '${productName}-${version}-${platform}-${arch}-tenderly.${ext}', | ||
productName: 'Pearl', | ||
files: ['electron/**/*', 'package.json'], | ||
directories: { | ||
output: 'dist', | ||
}, | ||
nsis: { | ||
oneClick: false, | ||
}, | ||
extraResources: [ | ||
{ | ||
from: 'electron/bins', | ||
to: 'bins', | ||
filter: ['**/*'], | ||
}, | ||
], | ||
|
||
}, | ||
}); | ||
}; | ||
|
||
main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e)); |
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,49 @@ | ||
/** | ||
* This script is used to build the electron app **with notarization**. It is used for the final build and release process. | ||
*/ | ||
require('dotenv').config(); | ||
const build = require('electron-builder').build; | ||
|
||
const { publishOptions } = require('./electron/constants'); | ||
|
||
|
||
function artifactName() { | ||
const env = process.env.NODE_ENV; | ||
const prefix = env === 'production' ? '' : 'dev-'; | ||
return prefix + '${productName}-${version}-${platform}-${arch}.${ext}'; | ||
} | ||
|
||
const main = async () => { | ||
console.log('Building...'); | ||
|
||
/** @type import {CliOptions} from "electron-builder" */ | ||
await build({ | ||
publish: 'onTag', | ||
config: { | ||
appId: 'xyz.valory.olas-operate-app', | ||
artifactName: artifactName(), | ||
productName: 'Pearl', | ||
files: ['electron/**/*', 'package.json'], | ||
directories: { | ||
output: 'dist', | ||
}, | ||
nsis: { | ||
oneClick: false, | ||
}, | ||
win: { | ||
publish: publishOptions, | ||
icon: 'electron/assets/icons/splash-robot-head-dock.png', | ||
}, | ||
extraResources: [ | ||
{ | ||
from: 'electron/bins', | ||
to: 'bins', | ||
filter: ['**/*'], | ||
}, | ||
], | ||
|
||
}, | ||
}); | ||
}; | ||
|
||
main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e)); |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover?