Skip to content

Commit

Permalink
update windows ci
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCyjaneK committed Jan 8, 2025
1 parent 0033f70 commit ccd1aa1
Showing 1 changed file with 59 additions and 98 deletions.
157 changes: 59 additions & 98 deletions .github/workflows/pr_test_build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,104 +15,65 @@ jobs:
- uses: actions/checkout@v4
- name: Add secrets
run: |
touch lib/.secrets.g.dart
touch cw_evm/lib/.secrets.g.dart
touch cw_solana/lib/.secrets.g.dart
touch cw_core/lib/.secrets.g.dart
touch cw_nano/lib/.secrets.g.dart
touch cw_tron/lib/.secrets.g.dart
if [[ "x${{ secrets.SALT }}" == "x" ]];
then
echo "const salt = '954f787f12622067f7e548d9450c3832';" > lib/.secrets.g.dart
else
echo "const salt = '${{ secrets.SALT }}';" > lib/.secrets.g.dart
fi
if [[ "x${{ secrets.KEY_CHAIN_SALT }}" == "x" ]];
then
echo "const keychainSalt = '2d2beba777dbf7dff7013b7a';" >> lib/.secrets.g.dart
else
echo "const keychainSalt = '${{ secrets.KEY_CHAIN_SALT }}';" >> lib/.secrets.g.dart
fi
if [[ "x${{ secrets.KEY }}" == "x" ]];
then
echo "const key = '638e98820ec10a2945e968435c9397a3';" >> lib/.secrets.g.dart
else
echo "const key = '${{ secrets.KEY }}';" >> lib/.secrets.g.dart
fi
if [[ "x${{ secrets.WALLET_SALT }}" == "x" ]];
then
echo "const walletSalt = '8f7f1b70';" >> lib/.secrets.g.dart
else
echo "const walletSalt = '${{ secrets.WALLET_SALT }}';" >> lib/.secrets.g.dart
fi
if [[ "x${{ secrets.SHORT_KEY }}" == "x" ]];
then
echo "const shortKey = '653f270c2c152bc7ec864afe';" >> lib/.secrets.g.dart
else
echo "const shortKey = '${{ secrets.SHORT_KEY }}';" >> lib/.secrets.g.dart
fi
if [[ "x${{ secrets.BACKUP_SALT }}" == "x" ]];
then
echo "const backupSalt = 'bf630d24ff0b6f60';" >> lib/.secrets.g.dart
else
echo "const backupSalt = '${{ secrets.BACKUP_SALT }}';" >> lib/.secrets.g.dart
fi
if [[ "x${{ secrets.BACKUP_KEY_CHAIN_SALT }}" == "x" ]];
then
echo "const backupKeychainSalt = 'bf630d24ff0b6f60';" >> lib/.secrets.g.dart
else
echo "const backupKeychainSalt = '${{ secrets.BACKUP_KEY_CHAIN_SALT }}';" >> lib/.secrets.g.dart
fi
echo "const changeNowApiKey = '${{ secrets.CHANGE_NOW_API_KEY }}';" >> lib/.secrets.g.dart
echo "const changeNowApiKeyDesktop = '${{ secrets.CHANGE_NOW_API_KEY_DESKTOP }}';" >> lib/.secrets.g.dart
echo "const wyreSecretKey = '${{ secrets.WYRE_SECRET_KEY }}';" >> lib/.secrets.g.dart
echo "const wyreApiKey = '${{ secrets.WYRE_API_KEY }}';" >> lib/.secrets.g.dart
echo "const wyreAccountId = '${{ secrets.WYRE_ACCOUNT_ID }}';" >> lib/.secrets.g.dart
echo "const moonPayApiKey = '${{ secrets.MOON_PAY_API_KEY }}';" >> lib/.secrets.g.dart
echo "const moonPaySecretKey = '${{ secrets.MOON_PAY_SECRET_KEY }}';" >> lib/.secrets.g.dart
echo "const sideShiftAffiliateId = '${{ secrets.SIDE_SHIFT_AFFILIATE_ID }}';" >> lib/.secrets.g.dart
echo "const simpleSwapApiKey = '${{ secrets.SIMPLE_SWAP_API_KEY }}';" >> lib/.secrets.g.dart
echo "const simpleSwapApiKeyDesktop = '${{ secrets.SIMPLE_SWAP_API_KEY_DESKTOP }}';" >> lib/.secrets.g.dart
echo "const onramperApiKey = '${{ secrets.ONRAMPER_API_KEY }}';" >> lib/.secrets.g.dart
echo "const anypayToken = '${{ secrets.ANY_PAY_TOKEN }}';" >> lib/.secrets.g.dart
echo "const ioniaClientId = '${{ secrets.IONIA_CLIENT_ID }}';" >> lib/.secrets.g.dart
echo "const twitterBearerToken = '${{ secrets.TWITTER_BEARER_TOKEN }}';" >> lib/.secrets.g.dart
echo "const trocadorApiKey = '${{ secrets.TROCADOR_API_KEY }}';" >> lib/.secrets.g.dart
echo "const trocadorExchangeMarkup = '${{ secrets.TROCADOR_EXCHANGE_MARKUP }}';" >> lib/.secrets.g.dart
echo "const anonPayReferralCode = '${{ secrets.ANON_PAY_REFERRAL_CODE }}';" >> lib/.secrets.g.dart
echo "const fiatApiKey = '${{ secrets.FIAT_API_KEY }}';" >> lib/.secrets.g.dart
echo "const ankrApiKey = '${{ secrets.ANKR_API_KEY }}';" >> lib/.secrets.g.dart
echo "const chainStackApiKey = '${{ secrets.CHAIN_STACK_API_KEY }}';" >> lib/.secrets.g.dart
echo "const etherScanApiKey = '${{ secrets.ETHER_SCAN_API_KEY }}';" >> lib/.secrets.g.dart
echo "const polygonScanApiKey = '${{ secrets.POLYGON_SCAN_API_KEY }}';" >> lib/.secrets.g.dart
echo "const etherScanApiKey = '${{ secrets.ETHER_SCAN_API_KEY }}';" >> cw_evm/lib/.secrets.g.dart
echo "const moralisApiKey = '${{ secrets.MORALIS_API_KEY }}';" >> cw_evm/lib/.secrets.g.dart
echo "const nowNodesApiKey = '${{ secrets.EVM_NOWNODES_API_KEY }}';" >> cw_evm/lib/.secrets.g.dart
echo "const chatwootWebsiteToken = '${{ secrets.CHATWOOT_WEBSITE_TOKEN }}';" >> lib/.secrets.g.dart
echo "const exolixApiKey = '${{ secrets.EXOLIX_API_KEY }}';" >> lib/.secrets.g.dart
echo "const robinhoodApplicationId = '${{ secrets.ROBINHOOD_APPLICATION_ID }}';" >> lib/.secrets.g.dart
echo "const exchangeHelperApiKey = '${{ secrets.ROBINHOOD_CID_CLIENT_SECRET }}';" >> lib/.secrets.g.dart
echo "const walletConnectProjectId = '${{ secrets.WALLET_CONNECT_PROJECT_ID }}';" >> lib/.secrets.g.dart
echo "const moralisApiKey = '${{ secrets.MORALIS_API_KEY }}';" >> lib/.secrets.g.dart
echo "const polygonScanApiKey = '${{ secrets.POLYGON_SCAN_API_KEY }}';" >> cw_evm/lib/.secrets.g.dart
echo "const ankrApiKey = '${{ secrets.ANKR_API_KEY }}';" >> cw_solana/lib/.secrets.g.dart
echo "const chainStackApiKey = '${{ secrets.CHAIN_STACK_API_KEY }}';" >> cw_solana/lib/.secrets.g.dart
echo "const testCakePayApiKey = '${{ secrets.TEST_CAKE_PAY_API_KEY }}';" >> lib/.secrets.g.dart
echo "const cakePayApiKey = '${{ secrets.CAKE_PAY_API_KEY }}';" >> lib/.secrets.g.dart
echo "const authorization = '${{ secrets.CAKE_PAY_AUTHORIZATION }}';" >> lib/.secrets.g.dart
echo "const CSRFToken = '${{ secrets.CSRF_TOKEN }}';" >> lib/.secrets.g.dart
echo "const quantexExchangeMarkup = '${{ secrets.QUANTEX_EXCHANGE_MARKUP }}';" >> lib/.secrets.g.dart
echo "const nano2ApiKey = '${{ secrets.NANO2_API_KEY }}';" >> cw_nano/lib/.secrets.g.dart
echo "const nanoNowNodesApiKey = '${{ secrets.NANO_NOW_NODES_API_KEY }}';" >> cw_nano/lib/.secrets.g.dart
echo "const tronGridApiKey = '${{ secrets.TRON_GRID_API_KEY }}';" >> cw_tron/lib/.secrets.g.dart
echo "const tronNowNodesApiKey = '${{ secrets.TRON_NOW_NODES_API_KEY }}';" >> cw_tron/lib/.secrets.g.dart
echo "const meldTestApiKey = '${{ secrets.MELD_TEST_API_KEY }}';" >> lib/.secrets.g.dart
echo "const meldTestPublicKey = '${{ secrets.MELD_TEST_PUBLIC_KEY}}';" >> lib/.secrets.g.dart
echo "const letsExchangeBearerToken = '${{ secrets.LETS_EXCHANGE_TOKEN }}';" >> lib/.secrets.g.dart
echo "const letsExchangeAffiliateId = '${{ secrets.LETS_EXCHANGE_AFFILIATE_ID }}';" >> lib/.secrets.g.dart
echo "const stealthExBearerToken = '${{ secrets.STEALTH_EX_BEARER_TOKEN }}';" >> lib/.secrets.g.dart
echo "const stealthExAdditionalFeePercent = '${{ secrets.STEALTH_EX_ADDITIONAL_FEE_PERCENT }}';" >> lib/.secrets.g.dart
powershell -Command "New-Item -ItemType File -Force lib\\.secrets.g.dart"
powershell -Command "New-Item -ItemType File -Force cw_evm\\lib\\.secrets.g.dart"
powershell -Command "New-Item -ItemType File -Force cw_solana\\lib\\.secrets.g.dart"
powershell -Command "New-Item -ItemType File -Force cw_core\\lib\\.secrets.g.dart"
powershell -Command "New-Item -ItemType File -Force cw_nano\\lib\\.secrets.g.dart"
powershell -Command "New-Item -ItemType File -Force cw_tron\\lib\\.secrets.g.dart"
# Add secrets with fallback values
powershell -Command "if ('${{ secrets.SALT }}' -eq '') { Add-Content lib\\.secrets.g.dart 'const salt = \"954f787f12622067f7e548d9450c3832\";' } else { Add-Content lib\\.secrets.g.dart \"const salt = '${{ secrets.SALT }}';\" }"
powershell -Command "if ('${{ secrets.KEY_CHAIN_SALT }}' -eq '') { Add-Content lib\\.secrets.g.dart 'const keychainSalt = \"2d2beba777dbf7dff7013b7a\";' } else { Add-Content lib\\.secrets.g.dart \"const keychainSalt = '${{ secrets.KEY_CHAIN_SALT }}';\" }"
powershell -Command "if ('${{ secrets.KEY }}' -eq '') { Add-Content lib\\.secrets.g.dart 'const key = \"638e98820ec10a2945e968435c9397a3\";' } else { Add-Content lib\\.secrets.g.dart \"const key = '${{ secrets.KEY }}';\" }"
powershell -Command "if ('${{ secrets.WALLET_SALT }}' -eq '') { Add-Content lib\\.secrets.g.dart 'const walletSalt = \"8f7f1b70\";' } else { Add-Content lib\\.secrets.g.dart \"const walletSalt = '${{ secrets.WALLET_SALT }}';\" }"
powershell -Command "if ('${{ secrets.SHORT_KEY }}' -eq '') { Add-Content lib\\.secrets.g.dart 'const shortKey = \"653f270c2c152bc7ec864afe\";' } else { Add-Content lib\\.secrets.g.dart \"const shortKey = '${{ secrets.SHORT_KEY }}';\" }"
powershell -Command "if ('${{ secrets.BACKUP_SALT }}' -eq '') { Add-Content lib\\.secrets.g.dart 'const backupSalt = \"bf630d24ff0b6f60\";' } else { Add-Content lib\\.secrets.g.dart \"const backupSalt = '${{ secrets.BACKUP_SALT }}';\" }"
powershell -Command "if ('${{ secrets.BACKUP_KEY_CHAIN_SALT }}' -eq '') { Add-Content lib\\.secrets.g.dart 'const backupKeychainSalt = \"bf630d24ff0b6f60\";' } else { Add-Content lib\\.secrets.g.dart \"const backupKeychainSalt = '${{ secrets.BACKUP_KEY_CHAIN_SALT }}';\" }"
# Add remaining secrets
powershell -Command "Add-Content lib\\.secrets.g.dart \"const changeNowApiKey = '${{ secrets.CHANGE_NOW_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const changeNowApiKeyDesktop = '${{ secrets.CHANGE_NOW_API_KEY_DESKTOP }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const wyreSecretKey = '${{ secrets.WYRE_SECRET_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const wyreApiKey = '${{ secrets.WYRE_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const wyreAccountId = '${{ secrets.WYRE_ACCOUNT_ID }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const moonPayApiKey = '${{ secrets.MOON_PAY_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const moonPaySecretKey = '${{ secrets.MOON_PAY_SECRET_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const sideShiftAffiliateId = '${{ secrets.SIDE_SHIFT_AFFILIATE_ID }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const simpleSwapApiKey = '${{ secrets.SIMPLE_SWAP_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const simpleSwapApiKeyDesktop = '${{ secrets.SIMPLE_SWAP_API_KEY_DESKTOP }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const onramperApiKey = '${{ secrets.ONRAMPER_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const anypayToken = '${{ secrets.ANY_PAY_TOKEN }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const ioniaClientId = '${{ secrets.IONIA_CLIENT_ID }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const twitterBearerToken = '${{ secrets.TWITTER_BEARER_TOKEN }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const trocadorApiKey = '${{ secrets.TROCADOR_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const trocadorExchangeMarkup = '${{ secrets.TROCADOR_EXCHANGE_MARKUP }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const anonPayReferralCode = '${{ secrets.ANON_PAY_REFERRAL_CODE }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const fiatApiKey = '${{ secrets.FIAT_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const ankrApiKey = '${{ secrets.ANKR_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const chainStackApiKey = '${{ secrets.CHAIN_STACK_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const etherScanApiKey = '${{ secrets.ETHER_SCAN_API_KEY }}';\""
powershell -Command "Add-Content cw_evm\\lib\\.secrets.g.dart \"const etherScanApiKey = '${{ secrets.ETHER_SCAN_API_KEY }}';\""
powershell -Command "Add-Content cw_evm\\lib\\.secrets.g.dart \"const moralisApiKey = '${{ secrets.MORALIS_API_KEY }}';\""
powershell -Command "Add-Content cw_evm\\lib\\.secrets.g.dart \"const nowNodesApiKey = '${{ secrets.EVM_NOWNODES_API_KEY }}';\""
powershell -Command "Add-Content cw_solana\\lib\\.secrets.g.dart \"const ankrApiKey = '${{ secrets.ANKR_API_KEY }}';\""
powershell -Command "Add-Content cw_solana\\lib\\.secrets.g.dart \"const chainStackApiKey = '${{ secrets.CHAIN_STACK_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const testCakePayApiKey = '${{ secrets.TEST_CAKE_PAY_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const cakePayApiKey = '${{ secrets.CAKE_PAY_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const authorization = '${{ secrets.CAKE_PAY_AUTHORIZATION }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const CSRFToken = '${{ secrets.CSRF_TOKEN }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const quantexExchangeMarkup = '${{ secrets.QUANTEX_EXCHANGE_MARKUP }}';\""
powershell -Command "Add-Content cw_nano\\lib\\.secrets.g.dart \"const nano2ApiKey = '${{ secrets.NANO2_API_KEY }}';\""
powershell -Command "Add-Content cw_nano\\lib\\.secrets.g.dart \"const nanoNowNodesApiKey = '${{ secrets.NANO_NOW_NODES_API_KEY }}';\""
powershell -Command "Add-Content cw_tron\\lib\\.secrets.g.dart \"const tronGridApiKey = '${{ secrets.TRON_GRID_API_KEY }}';\""
powershell -Command "Add-Content cw_tron\\lib\\.secrets.g.dart \"const tronNowNodesApiKey = '${{ secrets.TRON_NOW_NODES_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const meldTestApiKey = '${{ secrets.MELD_TEST_API_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const meldTestPublicKey = '${{ secrets.MELD_TEST_PUBLIC_KEY }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const letsExchangeBearerToken = '${{ secrets.LETS_EXCHANGE_TOKEN }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const letsExchangeAffiliateId = '${{ secrets.LETS_EXCHANGE_AFFILIATE_ID }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const stealthExBearerToken = '${{ secrets.STEALTH_EX_BEARER_TOKEN }}';\""
powershell -Command "Add-Content lib\\.secrets.g.dart \"const stealthExAdditionalFeePercent = '${{ secrets.STEALTH_EX_ADDITIONAL_FEE_PERCENT }}';\""
- name: download monero_c prebuilds (can't build inside of windows container)
run: |
dart run tool/download_moneroc_prebuilds.dart
Expand Down

0 comments on commit ccd1aa1

Please sign in to comment.