diff --git a/.buildkite/android.yml b/.buildkite/android.yml index b0236ab9c..ac77281bd 100644 --- a/.buildkite/android.yml +++ b/.buildkite/android.yml @@ -1,20 +1,20 @@ steps: - label: ':robot_face: Android Build' command: - 'curl https://sh.rustup.rs -sSf | sh -s -- -y' - 'source /root/.cargo/env' - 'rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android' - 'apt update && apt install -y autoconf libtool build-essential cmake git libgtest-dev libssl-dev zlib1g-dev' - 'scripts/install_protobuf.sh' - - 'yarn cleaninstall --frozen-lockfile --skip-optional' + - 'yarn ci-cleaninstall' - 'cd native/android' - './gradlew clean && ./gradlew bundleRelease --no-daemon "-Dorg.gradle.jvmargs=-Xmx32g -XX:MaxPermSize=32g -XX:+HeapDumpOnOutOfMemoryError"' retry: automatic: true plugins: - docker#v5.3.0: image: 'reactnativecommunity/react-native-android:latest' shell: ['/bin/bash', '-e', '-c'] propagate-environment: true agents: - 'autoscaling=true' diff --git a/.buildkite/eslint_flow_jest.yml b/.buildkite/eslint_flow_jest.yml index 34b6f3ba2..3e8bb3d21 100644 --- a/.buildkite/eslint_flow_jest.yml +++ b/.buildkite/eslint_flow_jest.yml @@ -1,13 +1,13 @@ steps: - label: ':eslint: :jest: ESLint & Flow & Jest' - command: '(pkill flow || true) && curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && . /root/.cargo/env && apt update && apt install -y cmake && yarn cleaninstall --frozen-lockfile --skip-optional --network-timeout 180000 && yarn eslint --max-warnings=0 && yarn flow-all && yarn jest-all' + command: '(pkill flow || true) && curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && . /root/.cargo/env && apt update && apt install -y cmake && yarn ci-cleaninstall && yarn eslint --max-warnings=0 && yarn flow-all && yarn jest-all' retry: automatic: true plugins: - docker#v5.3.0: image: 'node:16.13-bullseye' always-pull: true workdir: /comm propagate-environment: true agents: - 'autoscaling=true' diff --git a/.buildkite/ios.yml b/.buildkite/ios.yml index ff1e94c95..880d67de0 100644 --- a/.buildkite/ios.yml +++ b/.buildkite/ios.yml @@ -1,14 +1,14 @@ steps: - label: ':ios: iOS Build' command: - 'pod repo update && yarn workspace native clean-ios' - 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y' - 'source /Users/comm/.cargo/env' - - 'yarn cleaninstall --frozen-lockfile --skip-optional' + - 'yarn ci-cleaninstall' - 'cd native/ios && xcodebuild -workspace Comm.xcworkspace -scheme Comm -destination generic/platform=iOS -allowProvisioningUpdates' retry: automatic: true env: PROTOC: '/opt/homebrew/bin/protoc' agents: - 'mac=true' diff --git a/.buildkite/jsi_codegen.yml b/.buildkite/jsi_codegen.yml index 539654ca5..464aa087a 100644 --- a/.buildkite/jsi_codegen.yml +++ b/.buildkite/jsi_codegen.yml @@ -1,19 +1,19 @@ steps: - label: 'JSI Codegen' command: - '(pkill flow || true)' - 'apt update && apt install -y cmake' - 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y' - '. /root/.cargo/env' - - 'yarn cleaninstall --frozen-lockfile --skip-optional --network-timeout 180000' + - 'yarn ci-cleaninstall' - 'cd native && yarn codegen-jsi && git diff --exit-code' retry: automatic: true plugins: - docker#v5.3.0: image: 'node:16.13-bullseye' always-pull: true workdir: /comm propagate-environment: true agents: - 'autoscaling=true' diff --git a/.buildkite/macos.yml b/.buildkite/macos.yml index 368078f0a..9fd87d2bf 100644 --- a/.buildkite/macos.yml +++ b/.buildkite/macos.yml @@ -1,7 +1,7 @@ steps: - label: ':macos: macOS Build' command: - - 'yarn cleaninstall --frozen-lockfile --skip-optional' + - 'yarn ci-cleaninstall' - 'cd desktop && yarn make-dev --arch universal' agents: - 'mac=true' diff --git a/.buildkite/nix_yarn.yml b/.buildkite/nix_yarn.yml index 321d213ea..d2e39ca88 100644 --- a/.buildkite/nix_yarn.yml +++ b/.buildkite/nix_yarn.yml @@ -1,7 +1,7 @@ steps: - - label: 'nix develop -c yarn cleaninstall --network-timeout 180000' - command: 'nix develop --accept-flake-config -c yarn cleaninstall --network-timeout 180000' + - label: 'nix develop -c yarn ci-cleaninstall' + command: 'nix develop --accept-flake-config -c yarn ci-cleaninstall' retry: automatic: true agents: - 'nixdarwin=true' diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml index 6dc639bce..aab666ca6 100644 --- a/.github/workflows/android_ci.yml +++ b/.github/workflows/android_ci.yml @@ -1,58 +1,58 @@ name: Android Build CI on: push: branches: [master] paths-ignore: - 'landing/**' - 'web/**' - 'docs/**' - 'keyserver/**' - 'desktop/**' jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' - name: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android run: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android - name: Install Protobuf compiler working-directory: ./scripts run: sudo ./install_protobuf.sh - name: Install Yarn run: npm install -g yarn - - name: yarn --frozen-lockfile --network-timeout 180000 - run: yarn --frozen-lockfile --network-timeout 180000 + - name: yarn ci-cleaninstall + run: yarn ci-cleaninstall - name: Save ANDROID_KEY_STORE_B64 to file env: ANDROID_KEY_STORE_B64: ${{secrets.ANDROID_KEY_STORE_B64}} run: echo "$ANDROID_KEY_STORE_B64" > ANDROID_KEY_STORE_B64.b64 - name: Save ANDROID_KEY_STORE to file run: base64 -d ANDROID_KEY_STORE_B64.b64 > android_key_store.keystore - name: Configure gradle.properties run: | mkdir ~/.gradle touch ~/.gradle/gradle.properties echo "COMM_UPLOAD_STORE_FILE=$(pwd)/android_key_store.keystore" >> ~/.gradle/gradle.properties echo "COMM_UPLOAD_KEY_ALIAS=AndroidSigningKey" >> ~/.gradle/gradle.properties - name: Build with Gradle working-directory: ./native/android env: ANDROID_SIGNING_PASSWORD: ${{secrets.ANDROID_SIGNING_PASSWORD}} run: ./gradlew bundleRelease diff --git a/.github/workflows/android_release.yml b/.github/workflows/android_release.yml index 99661b247..f3a11d9b5 100644 --- a/.github/workflows/android_release.yml +++ b/.github/workflows/android_release.yml @@ -1,67 +1,67 @@ name: Android Build/Upload to Play Store Console on: release: types: [published] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' - name: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android run: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android - name: Install Protobuf compiler working-directory: ./scripts run: sudo ./install_protobuf.sh - name: Install Yarn run: npm install -g yarn - - name: yarn --frozen-lockfile --network-timeout 180000 - run: yarn --frozen-lockfile --network-timeout 180000 + - name: yarn ci-cleaninstall + run: yarn ci-cleaninstall - name: Save ALCHEMY_API_KEY to file working-directory: ./native env: ALCHEMY_API_KEY: ${{secrets.ALCHEMY_API_KEY}} run: mkdir -p facts && echo '{"key":"'"$ALCHEMY_API_KEY"'"}' > facts/alchemy.json - name: Save ANDROID_KEY_STORE_B64 to file env: ANDROID_KEY_STORE_B64: ${{secrets.ANDROID_KEY_STORE_B64}} run: echo "$ANDROID_KEY_STORE_B64" > ANDROID_KEY_STORE_B64.b64 - name: Save ANDROID_KEY_STORE to file run: base64 -d ANDROID_KEY_STORE_B64.b64 > android_key_store.keystore - name: Configure gradle.properties run: | mkdir ~/.gradle touch ~/.gradle/gradle.properties echo "COMM_UPLOAD_STORE_FILE=$(pwd)/android_key_store.keystore" >> ~/.gradle/gradle.properties echo "COMM_UPLOAD_KEY_ALIAS=AndroidSigningKey" >> ~/.gradle/gradle.properties - name: Build with Gradle working-directory: ./native/android env: ANDROID_SIGNING_PASSWORD: ${{secrets.ANDROID_SIGNING_PASSWORD}} run: ./gradlew bundleRelease - name: Save PLAY_STORE_PUBLISHING_KEY to file working-directory: ./native/android env: PLAY_STORE_PUBLISHING_KEY: ${{secrets.PLAY_STORE_PUBLISHING_KEY}} run: echo "$PLAY_STORE_PUBLISHING_KEY" > PLAY_STORE_PUBLISHING_KEY.json - name: Upload to Google Play working-directory: ./native/android run: node upload-aab.js diff --git a/.github/workflows/eslint_flow_jest.yml b/.github/workflows/eslint_flow_jest.yml index ed3743759..d22bb6c47 100644 --- a/.github/workflows/eslint_flow_jest.yml +++ b/.github/workflows/eslint_flow_jest.yml @@ -1,64 +1,64 @@ name: ESLint & Flow & Jest on: push: branches: [master] pull_request: types: [opened, reopened] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: sudo ./install_protobuf.sh working-directory: ./scripts run: sudo ./install_protobuf.sh - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile --network-timeout 180000 - run: yarn --frozen-lockfile --network-timeout 180000 + - name: yarn ci-cleaninstall + run: yarn ci-cleaninstall - name: yarn eslint --max-warnings=0 run: yarn eslint --max-warnings=0 - name: '[lib] flow' working-directory: ./lib run: ./node_modules/.bin/flow - name: '[keyserver] flow' working-directory: ./keyserver run: ./node_modules/.bin/flow - name: '[web] flow' working-directory: ./web run: ./node_modules/.bin/flow - name: '[landing] flow' working-directory: ./landing run: ./node_modules/.bin/flow - name: '[native] flow' working-directory: ./native run: ./node_modules/.bin/flow - name: '[desktop] flow' working-directory: ./desktop run: ./node_modules/.bin/flow - name: '[electron-update-server] flow' working-directory: ./services/electron-update-server run: ./node_modules/.bin/flow - name: '[lib] test' working-directory: ./lib env: ALCHEMY_API_KEY: ${{secrets.ALCHEMY_API_KEY}} run: yarn test - name: '[keyserver] test' working-directory: ./keyserver run: yarn test diff --git a/.github/workflows/ios_ci.yml b/.github/workflows/ios_ci.yml index 339e1e7e7..3a24155f5 100644 --- a/.github/workflows/ios_ci.yml +++ b/.github/workflows/ios_ci.yml @@ -1,68 +1,68 @@ name: iOS Build CI on: push: branches: [master] paths-ignore: - 'landing/**' - 'web/**' - 'docs/**' - 'keyserver/**' - 'desktop/**' jobs: build: name: Build and archive iOS app runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v3 - name: Install Developer certificate env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} P12_PASSWORD: ${{ secrets.P12_PASSWORD }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | # create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db # import certificate from secrets echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH # create temporary keychain security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH security set-keychain-settings -lut 21600 $KEYCHAIN_PATH security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH # import certificate to keychain security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH security list-keychain -d user -s $KEYCHAIN_PATH - name: brew install protobuf run: brew install protobuf - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile --network-timeout 180000 - run: yarn --frozen-lockfile --network-timeout 180000 + - name: yarn ci-cleaninstall + run: yarn ci-cleaninstall - name: Save auth_key to file working-directory: ./native/ios env: AUTH_KEY: ${{secrets.AUTH_KEY}} run: echo "$AUTH_KEY" > AUTH_KEY.p8 - name: Archive working-directory: ./native/ios env: AUTH_KEY_ID: ${{secrets.AUTH_KEY_ID}} AUTH_KEY_ISSUER_ID: ${{secrets.AUTH_KEY_ISSUER_ID}} run: xcodebuild archive -workspace Comm.xcworkspace -scheme Comm -configuration Release -archivePath archives/Comm.xcarchive -destination generic/platform=iOS -allowProvisioningUpdates -authenticationKeyIssuerID "$AUTH_KEY_ISSUER_ID" -authenticationKeyID "$AUTH_KEY_ID" -authenticationKeyPath $PWD/AUTH_KEY.p8 - name: Clean up keychain if: ${{ always() }} run: security delete-keychain $RUNNER_TEMP/app-signing.keychain-db diff --git a/.github/workflows/ios_release.yml b/.github/workflows/ios_release.yml index f99368ae5..485edecce 100644 --- a/.github/workflows/ios_release.yml +++ b/.github/workflows/ios_release.yml @@ -1,82 +1,82 @@ name: iOS Build/Archive/Upload to AppStore Connect on: release: types: [published] jobs: build: name: Build, archive, and upload iOS app runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v3 - name: Install Developer certificate env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} P12_PASSWORD: ${{ secrets.P12_PASSWORD }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | # create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db # import certificate from secrets echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH # create temporary keychain security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH security set-keychain-settings -lut 21600 $KEYCHAIN_PATH security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH # import certificate to keychain security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH security list-keychain -d user -s $KEYCHAIN_PATH - name: brew install protobuf run: brew install protobuf - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile --network-timeout 180000 - run: yarn --frozen-lockfile --network-timeout 180000 + - name: yarn ci-cleaninstall + run: yarn ci-cleaninstall - name: Save ALCHEMY_API_KEY to file working-directory: ./native env: ALCHEMY_API_KEY: ${{secrets.ALCHEMY_API_KEY}} run: mkdir -p facts && echo '{"key":"'"$ALCHEMY_API_KEY"'"}' > facts/alchemy.json - name: Save auth_key to file working-directory: ./native/ios env: AUTH_KEY: ${{secrets.AUTH_KEY}} run: echo "$AUTH_KEY" > AUTH_KEY.p8 - name: Archive working-directory: ./native/ios env: AUTH_KEY_ID: ${{secrets.AUTH_KEY_ID}} AUTH_KEY_ISSUER_ID: ${{secrets.AUTH_KEY_ISSUER_ID}} run: xcodebuild archive -workspace Comm.xcworkspace -scheme Comm -configuration Release -archivePath archives/Comm.xcarchive -destination generic/platform=iOS -allowProvisioningUpdates -authenticationKeyIssuerID "$AUTH_KEY_ISSUER_ID" -authenticationKeyID "$AUTH_KEY_ID" -authenticationKeyPath $PWD/AUTH_KEY.p8 - name: Export IPA working-directory: ./native/ios env: AUTH_KEY_ID: ${{secrets.AUTH_KEY_ID}} AUTH_KEY_ISSUER_ID: ${{secrets.AUTH_KEY_ISSUER_ID}} run: xcodebuild -exportArchive -archivePath archives/Comm.xcarchive -exportOptionsPlist exportOptions.plist -exportPath output -allowProvisioningUpdates -authenticationKeyIssuerID "$AUTH_KEY_ISSUER_ID" -authenticationKeyID "$AUTH_KEY_ID" -authenticationKeyPath $PWD/AUTH_KEY.p8 - name: Upload IPA to TestFlight working-directory: ./native/ios env: APPLE_USER_NAME: ${{secrets.APPLE_USER_NAME}} APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} run: xcrun altool --upload-app --type ios --file output/Comm.ipa --username "$APPLE_USER_NAME" --password "$APPLE_APP_SPECIFIC_PASSWORD" - name: Clean up keychain if: ${{ always() }} run: security delete-keychain $RUNNER_TEMP/app-signing.keychain-db diff --git a/.github/workflows/ios_xctest.yml b/.github/workflows/ios_xctest.yml index ecb9bdd93..0622cbb3f 100644 --- a/.github/workflows/ios_xctest.yml +++ b/.github/workflows/ios_xctest.yml @@ -1,68 +1,68 @@ name: iOS XCTests on: push: branches: [master] paths-ignore: - 'landing/**' - 'web/**' - 'docs/**' - 'keyserver/**' - 'desktop/**' jobs: build: name: Run iOS XCTests runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v3 - name: Install Developer certificate env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} P12_PASSWORD: ${{ secrets.P12_PASSWORD }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | # create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db # import certificate from secrets echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH # create temporary keychain security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH security set-keychain-settings -lut 21600 $KEYCHAIN_PATH security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH # import certificate to keychain security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH security list-keychain -d user -s $KEYCHAIN_PATH - name: brew install protobuf run: brew install protobuf - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile --network-timeout 180000 - run: yarn --frozen-lockfile --network-timeout 180000 + - name: yarn ci-cleaninstall + run: yarn ci-cleaninstall - name: Save auth_key to file working-directory: ./native/ios env: AUTH_KEY: ${{secrets.AUTH_KEY}} run: echo "$AUTH_KEY" > AUTH_KEY.p8 - name: Run XCTests working-directory: ./native/ios env: AUTH_KEY_ID: ${{secrets.AUTH_KEY_ID}} AUTH_KEY_ISSUER_ID: ${{secrets.AUTH_KEY_ISSUER_ID}} run: xcodebuild ENABLE_TESTABILITY=YES test -workspace Comm.xcworkspace -scheme Comm -destination name="iPhone 13 Pro" -configuration Release -authenticationKeyIssuerID "$AUTH_KEY_ISSUER_ID" -authenticationKeyID "$AUTH_KEY_ID" -authenticationKeyPath $PWD/AUTH_KEY.p8 - name: Clean up keychain if: ${{ always() }} run: security delete-keychain $RUNNER_TEMP/app-signing.keychain-db diff --git a/.github/workflows/jsi_codegen.yml b/.github/workflows/jsi_codegen.yml index 63e695bfd..9e65cf8fa 100644 --- a/.github/workflows/jsi_codegen.yml +++ b/.github/workflows/jsi_codegen.yml @@ -1,27 +1,27 @@ name: JSI Codegen on: push: branches: [master] pull_request: types: [opened, reopened] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: sudo ./install_protobuf.sh working-directory: ./scripts run: sudo ./install_protobuf.sh - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile --network-timeout 180000 - run: yarn --frozen-lockfile --network-timeout 180000 + - name: yarn ci-cleaninstall + run: yarn ci-cleaninstall - name: '[native] JSI Codegen' working-directory: ./native run: yarn codegen-jsi && git diff --exit-code diff --git a/.github/workflows/macos_ci.yml b/.github/workflows/macos_ci.yml index c77ab8d40..7e518716b 100644 --- a/.github/workflows/macos_ci.yml +++ b/.github/workflows/macos_ci.yml @@ -1,64 +1,64 @@ name: macOS Build CI on: push: branches: [master] paths-ignore: - 'landing/**' - 'docs/**' - 'keyserver/**' - 'native/**' - 'shared/**' jobs: build: name: Build macOS app runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v3 - name: Install Developer certificate env: MACOS_BUILD_CERTIFICATE_BASE64: ${{ secrets.MACOS_BUILD_CERTIFICATE_BASE64 }} MACOS_BUILD_P12_PASSWORD: ${{ secrets.MACOS_BUILD_P12_PASSWORD }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | # create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db # import certificate from secrets echo -n "$MACOS_BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH # create temporary keychain security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH security set-keychain-settings -lut 21600 $KEYCHAIN_PATH security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH # import certificate to keychain security import $CERTIFICATE_PATH -P "$MACOS_BUILD_P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH security list-keychain -d user -s $KEYCHAIN_PATH - name: sudo ./install_protobuf.sh working-directory: ./scripts run: sudo ./install_protobuf.sh - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile --network-timeout 180000 - run: yarn --frozen-lockfile --network-timeout 180000 + - name: yarn ci-cleaninstall + run: yarn ci-cleaninstall - name: Build App env: APPLE_USER_NAME: ${{secrets.APPLE_USER_NAME}} APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} TEAM_ID: ${{secrets.TEAM_ID}} working-directory: './desktop' run: yarn make --arch universal - name: Clean up keychain if: ${{ always() }} run: security delete-keychain $RUNNER_TEMP/app-signing.keychain-db diff --git a/.github/workflows/remove_harbormaster_tags.yml b/.github/workflows/remove_harbormaster_tags.yml index f7611ce18..4a646bcaf 100644 --- a/.github/workflows/remove_harbormaster_tags.yml +++ b/.github/workflows/remove_harbormaster_tags.yml @@ -1,32 +1,32 @@ name: Remove extraneous Harbormaster git tags on: push: branches: [master] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: sudo ./install_protobuf.sh working-directory: ./scripts run: sudo ./install_protobuf.sh - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile --network-timeout 180000 - run: yarn --frozen-lockfile --network-timeout 180000 + - name: yarn ci-cleaninstall + run: yarn ci-cleaninstall - name: Generate tag removal script working-directory: ./scripts env: PHABRICATOR_API_TOKEN: ${{secrets.PHABRICATOR_API_TOKEN}} run: node generate-phab-tag-removal-script.js - name: Run tag removal script working-directory: ./scripts run: chmod +x tag_removal_script.sh && ./tag_removal_script.sh diff --git a/.github/workflows/windows_ci.yml b/.github/workflows/windows_ci.yml index 73ddcd232..7ba1c346f 100644 --- a/.github/workflows/windows_ci.yml +++ b/.github/workflows/windows_ci.yml @@ -1,40 +1,40 @@ name: Windows build CI on: push: branches: [master] paths-ignore: - 'landing/**' - 'docs/**' - 'keyserver/**' - 'native/**' - 'shared/**' jobs: build: name: Build Windows app runs-on: windows-2022 steps: - uses: actions/checkout@v3 - name: Install Yarn run: npm install -g yarn - - name: yarn --frozen-lockfile --network-timeout 180000 - run: yarn --frozen-lockfile --network-timeout 180000 + - name: yarn ci-cleaninstall + run: yarn ci-cleaninstall - name: Save WINDOWS_CERTIFICATE_B64 to file env: WINDOWS_CERTIFICATE_B64: ${{secrets.WINDOWS_CERTIFICATE_B64}} run: echo "$env:WINDOWS_CERTIFICATE_B64" > WINDOWS_CERTIFICATE_B64.b64 - name: Decode Windows certificate run: certutil -decode WINDOWS_CERTIFICATE_B64.b64 windows_certificate.pfx - name: Build App env: WINDOWS_CERTIFICATE: ${{github.workspace}}\windows_certificate.pfx WINDOWS_PASSWORD: ${{secrets.WINDOWS_PASSWORD}} working-directory: './desktop' run: yarn make diff --git a/package.json b/package.json index 2b544bd81..6bc29e3ac 100644 --- a/package.json +++ b/package.json @@ -1,55 +1,56 @@ { "private": true, "license": "BSD-3-Clause", "workspaces": [ "lib", "web", "native", "keyserver", "landing", "desktop", "keyserver/addons/rust-node-addon", "native/expo-modules/android-lifecycle", "services/electron-update-server" ], "scripts": { "clean": "yarn workspace lib clean && yarn workspace web clean && yarn workspace native clean && yarn workspace keyserver clean && yarn workspace landing clean && yarn workspace desktop clean && yarn workspace rust-node-addon clean && yarn workspace electron-update-server clean && rm -rf node_modules/", "cleaninstall": "(killall flow || pkill flow || true) && yarn clean && yarn", + "ci-cleaninstall": "yarn cleaninstall --frozen-lockfile --skip-optional --network-timeout 180000", "eslint": "eslint .", "eslint:fix": "eslint --fix .", "clang-format-all": "eval `node scripts/get_clang_paths_cli.js` | xargs clang-format -i", "rust-pre-commit": "./scripts/rust_pre_commit.sh", "terraform-pre-commit": "./scripts/terraform_pre_commit.sh", "prepare": "husky install", "arcpatch": "git pull --all --tags && arc patch", "postinstall": "bash ./postinstall.sh", "flow-all": "yarn workspace lib flow && yarn workspace web flow && yarn workspace landing flow && yarn workspace native flow && yarn workspace keyserver flow && yarn workspace desktop flow && yarn workspace electron-update-server flow", "jest-all": "yarn workspace lib test && yarn workspace keyserver test" }, "devDependencies": { "babel-eslint": "^10.1.0", "clang-format": "^1.8.0", "core-js": "^3.6.5", "eslint": "^7.32.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-flowtype": "^5.4.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jest": "^24.2.2", "eslint-plugin-monorepo": "^0.3.2", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-react": "^7.22.0", "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-native": "^3.10.0", "find-up": "^5.0.0", "flow-mono-cli": "^1.5.0", "gaxios": "^4.3.2", "husky": "^7.0.0", "lint-staged": "^12.1.4", "patch-package": "^6.4.7", "postinstall-postinstall": "^2.0.0", "prettier": "^2.1.2" }, "resolutions": { "react-native-flipper": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz" } }