add debug commands on mac pipeline #666
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
name: Build TEST | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
release: | |
types: | |
- created | |
jobs: | |
build_macos: | |
runs-on: macos-latest | |
steps: | |
- name: Cleanup old iOS Simulators | |
run: | | |
echo ">>>>>>>>>>>>> 10 largest files" | |
# sudo find / -type f -name "*.dmg" -exec du -h {} + 2>/dev/null | sort -rh | head -n 10 | |
df -h | |
echo "Listing all installed iOS Simulator runtimes..." | |
xcrun simctl list | |
echo "Delete shutdown & unavailable simulators..." | |
xcrun simctl delete unavailable | |
xcrun simctl list devices | grep -E '(Shutdown|Unavailable)' | grep -oE '[A-F0-9\-]{36}' | xargs -I {} xcrun simctl delete {} | |
echo "Removing large simulator runtime .dmg files..." | |
find /Users/runner/ -type f -name "*.dmg" -mtime +14 -exec rm -f {} \; | |
find /private/tmp/ -type f -name "*.dmg" -mtime +14 -exec rm -f {} \; | |
sudo find /System/Volumes/Data/Library/Developer/CoreSimulator/Cryptex/Images/bundle/ -type f -name "*.dmg" -mtime +14 -exec rm -f {} \; | |
sudo find /System/Volumes/Data/System/Library/AssetsV2/com_apple_MobileAsset_xrOSSimulatorRuntime/ -type f -name "*.dmg" -mtime +14 -exec rm -f {} \; | |
sudo find /System/Volumes/Data/System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/ -type f -name "*.dmg" -mtime +14 -exec rm -f {} \; | |
echo "Remaining simulators:" | |
xcrun simctl list | |
echo "Listing large simulator .dmg files..." | |
# sudo find / -type f -name "*.dmg" -exec du -h {} + 2>/dev/null | sort -rh | head -n 10 | |
df -h | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install | |
run: | | |
npm install | |
- name: Test | |
run: | | |
npm run test | |
- name: Build and Release MacOS (dmg) | |
# if: ${{github.ref == 'refs/heads/main'}} | |
env: | |
GITHUB_TOKEN: ${{secrets.github_token}} | |
CSC_LINK: ${{secrets.MACOS_CSC_LINK}} | |
CSC_KEY_PASSWORD: ${{secrets.MACOS_CSC_KEY_PASSWORD}} | |
EP_PRE_RELEASE: true | |
run: | | |
npm run publish | |
# echo ">>>>>>>>>>>>>tsc -p ." | |
# npx tsc -p . | |
# df -h | |
# echo ">>>>>>>>>>>>>electron-builder --publish never" | |
# npx electron-builder --publish never | |
# df -h | |
# echo ">>>>>>>>>>>>>electron-builder --publish always" | |
# npx electron-builder --publish always | |
df -h | |
# - name: Notarize MacOS (dmg) | |
# if: ${{github.ref == 'refs/heads/main'}} | |
# env: | |
# MACOS_NOTARIZATION_APPLE_ID: ${{secrets.MACOS_NOTARIZATION_APPLE_ID}} | |
# MACOS_NOTARIZATION_TEAM_ID: ${{secrets.MACOS_NOTARIZATION_TEAM_ID}} | |
# MACOS_NOTARIZATION_PWD: ${{secrets.MACOS_NOTARIZATION_PWD}} | |
# run: | | |
# # Store the notarization credentials to prevent the UI password dialog for blocking the CI | |
# echo "Create keychain profile" | |
# xcrun notarytool store-credentials "notary-profile" --apple-id "$MACOS_NOTARIZATION_APPLE_ID" --team-id "$MACOS_NOTARIZATION_TEAM_ID" --password "$MACOS_NOTARIZATION_PWD" | |
# # Send the notarization request to the Apple's Notarization service and wait for the result. | |
# echo "Notarize app" | |
# xcrun notarytool submit "dist/Decentraland.dmg" --keychain-profile "notary-profile" --wait | |
# # Attach the staple to the executable, this allow the app to be validated by macOS | |
# # even when an internet connection is not available. | |
# echo "Attach staple" | |
# xcrun stapler staple "dist/Decentraland.dmg" | |
# # Validate the staple attached to the executable. | |
# echo "Validate staple" | |
# xcrun stapler validate "dist/Decentraland.dmg" | |
# - name: Upload artifacts | |
# env: | |
# AWS_DEFAULT_REGION: us-east-1 | |
# AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} | |
# AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} | |
# AWS_BUCKET: ${{secrets.S3_BUCKET}} | |
# if: ${{env.AWS_BUCKET != ''}} | |
# run: | | |
# node scripts/prepare-artifacts.js dmg | |
# npx @dcl/cdn-uploader@next --bucket ${{secrets.S3_BUCKET}} --local-folder output --bucket-folder "launcher-branch/${{github.ref_name}}" | |