diff --git a/.buildkite/android.yml b/.buildkite/android.yml index c8ff9f8e0..94161fd14 100644 --- a/.buildkite/android.yml +++ b/.buildkite/android.yml @@ -1,13 +1,13 @@ steps: - - label: ":robot_face: Android Build" + - label: ':robot_face: Android Build' command: - - 'yarn cleaninstall --frozen-lockfile --skip-optional' + - 'yarn cleaninstall --frozen-lockfile --skip-optional --network-timeout 180000' - 'cd native/android' - './gradlew bundleRelease --no-daemon "-Dorg.gradle.jvmargs=-Xmx32g -XX:MaxPermSize=32g -XX:+HeapDumpOnOutOfMemoryError"' plugins: - docker#v3.13.0: image: 'reactnativecommunity/react-native-android:latest' environment: - 'BUILDKITE=true' agents: - 'autoscaling=true' diff --git a/.buildkite/eslint_flow_jest.yml b/.buildkite/eslint_flow_jest.yml index 3ab9cfbd4..405588444 100644 --- a/.buildkite/eslint_flow_jest.yml +++ b/.buildkite/eslint_flow_jest.yml @@ -1,14 +1,14 @@ steps: - - label: ":eslint: :jest: ESLint & Flow & Jest" + - label: ':eslint: :jest: ESLint & Flow & Jest' command: - '(pkill flow || true)' - - 'yarn cleaninstall --frozen-lockfile --skip-optional' + - 'yarn cleaninstall --frozen-lockfile --skip-optional --network-timeout 180000' - 'yarn eslint --max-warnings=0 & yarn workspace lib flow & yarn workspace web flow & yarn workspace landing flow & yarn workspace native flow & yarn workspace keyserver flow' - 'yarn workspace lib test && yarn workspace keyserver test' plugins: - docker#v3.13.0: image: 'node:16.13-bullseye' always-pull: true workdir: /comm agents: - 'autoscaling=true' diff --git a/.buildkite/ios.yml b/.buildkite/ios.yml index 18209a915..7dad90885 100644 --- a/.buildkite/ios.yml +++ b/.buildkite/ios.yml @@ -1,8 +1,8 @@ steps: - - label: ":ios: iOS Build" + - label: ':ios: iOS Build' command: - 'pod repo update && yarn workspace native clean-ios' - - 'yarn cleaninstall --frozen-lockfile --skip-optional' + - 'yarn cleaninstall --frozen-lockfile --skip-optional --network-timeout 180000' - 'cd native/ios && xcodebuild -workspace Comm.xcworkspace -scheme Comm -destination generic/platform=iOS -allowProvisioningUpdates' agents: - 'mac=true' diff --git a/.buildkite/nix_yarn.yml b/.buildkite/nix_yarn.yml index b50a77762..89aee1c2e 100644 --- a/.buildkite/nix_yarn.yml +++ b/.buildkite/nix_yarn.yml @@ -1,5 +1,5 @@ steps: - - label: 'nix develop -c yarn cleaninstall' - command: 'nix develop --accept-flake-config -c yarn cleaninstall' + - label: 'nix develop -c yarn cleaninstall --network-timeout 180000' + command: 'nix develop --accept-flake-config -c yarn cleaninstall --network-timeout 180000' agents: - 'nixdarwin=true' diff --git a/.buildkite/tunnelbroker_unittests.yml b/.buildkite/tunnelbroker_unittests.yml index a556f0957..74a156967 100644 --- a/.buildkite/tunnelbroker_unittests.yml +++ b/.buildkite/tunnelbroker_unittests.yml @@ -1,9 +1,9 @@ steps: - - label: ":nix: Tunnelbroker Unittests" + - label: ':nix: Tunnelbroker Unittests' command: - 'cd services/tunnelbroker' - 'rm -rf build && mkdir build && cd build' - 'nix develop --accept-flake-config --command bash -c "cmake .. && make -j"' - './bin/runTests --gtest_filter=-AmqpManager*:DatabaseManager*' agents: - 'mac=true' diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml index cac7f2618..6077ec9da 100644 --- a/.github/workflows/android_ci.yml +++ b/.github/workflows/android_ci.yml @@ -1,52 +1,52 @@ name: Android Build CI on: push: branches: [master] paths-ignore: - 'landing/**' - 'web/**' - 'docs/**' - 'keyserver/**' pull_request: types: [opened, reopened] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - name: set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' - name: Install Yarn run: npm install -g yarn - - name: yarn --frozen-lockfile - run: yarn --frozen-lockfile + - name: yarn --frozen-lockfile --network-timeout 180000 + run: yarn --frozen-lockfile --network-timeout 180000 - 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 7bfcddd55..674358d25 100644 --- a/.github/workflows/android_release.yml +++ b/.github/workflows/android_release.yml @@ -1,54 +1,54 @@ name: Android Build/Upload to Play Store Console on: release: types: [published] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - name: set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' - name: Install Yarn run: npm install -g yarn - - name: yarn --frozen-lockfile - run: yarn --frozen-lockfile + - name: yarn --frozen-lockfile --network-timeout 180000 + run: yarn --frozen-lockfile --network-timeout 180000 - 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 88ab6b0e6..ce4e92e32 100644 --- a/.github/workflows/eslint_flow_jest.yml +++ b/.github/workflows/eslint_flow_jest.yml @@ -1,50 +1,50 @@ name: ESLint & Flow & Jest on: push: branches: [master] pull_request: types: [opened, reopened] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile - run: yarn --frozen-lockfile + - name: yarn --frozen-lockfile --network-timeout 180000 + run: yarn --frozen-lockfile --network-timeout 180000 - 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: '[lib] test' working-directory: ./lib 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 11b74327b..44dea7721 100644 --- a/.github/workflows/ios_ci.yml +++ b/.github/workflows/ios_ci.yml @@ -1,78 +1,78 @@ name: iOS Build CI on: push: branches: [master] paths-ignore: - 'landing/**' - 'web/**' - 'docs/**' - 'keyserver/**' pull_request: types: [opened, reopened] jobs: build: name: Build and archive iOS app runs-on: macos-11 steps: - name: Checkout uses: actions/checkout@v2 - name: Install the Apple certificate and provisioning profile env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} P12_PASSWORD: ${{ secrets.P12_PASSWORD }} BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | # create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db # import certificate and provisioning profile from secrets echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_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 # apply provisioning profile mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles - name: brew install protobuf run: brew install protobuf - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile - run: yarn --frozen-lockfile + - name: yarn --frozen-lockfile --network-timeout 180000 + run: yarn --frozen-lockfile --network-timeout 180000 - 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 and provisioning profile if: ${{ always() }} run: | rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision security delete-keychain $RUNNER_TEMP/app-signing.keychain-db diff --git a/.github/workflows/ios_release.yml b/.github/workflows/ios_release.yml index 24e357126..9d6cc5a2e 100644 --- a/.github/workflows/ios_release.yml +++ b/.github/workflows/ios_release.yml @@ -1,85 +1,85 @@ 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@v2 - name: Install the Apple certificate and provisioning profile env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} P12_PASSWORD: ${{ secrets.P12_PASSWORD }} BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | # create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db # import certificate and provisioning profile from secrets echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_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 # apply provisioning profile mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles - name: brew install protobuf run: brew install protobuf - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile - run: yarn --frozen-lockfile + - name: yarn --frozen-lockfile --network-timeout 180000 + run: yarn --frozen-lockfile --network-timeout 180000 - 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 and provisioning profile if: ${{ always() }} run: | rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision security delete-keychain $RUNNER_TEMP/app-signing.keychain-db diff --git a/.github/workflows/ios_xctest.yml b/.github/workflows/ios_xctest.yml index 4dc5986a6..4fd2a7864 100644 --- a/.github/workflows/ios_xctest.yml +++ b/.github/workflows/ios_xctest.yml @@ -1,78 +1,78 @@ name: iOS XCTests on: push: branches: [master] paths-ignore: - 'landing/**' - 'web/**' - 'docs/**' - 'keyserver/**' pull_request: types: [opened, reopened] jobs: build: name: Run iOS XCTests runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v2 - name: Install the Apple certificate and provisioning profile env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} P12_PASSWORD: ${{ secrets.P12_PASSWORD }} BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | # create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db # import certificate and provisioning profile from secrets echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_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 # apply provisioning profile mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles - name: brew install protobuf run: brew install protobuf - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile - run: yarn --frozen-lockfile + - name: yarn --frozen-lockfile --network-timeout 180000 + run: yarn --frozen-lockfile --network-timeout 180000 - 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 and provisioning profile if: ${{ always() }} run: | rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision 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 fa132cae1..22fc37c1a 100644 --- a/.github/workflows/remove_harbormaster_tags.yml +++ b/.github/workflows/remove_harbormaster_tags.yml @@ -1,28 +1,28 @@ name: Remove extraneous Harbormaster git tags on: push: branches: [master] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - name: npm install -g yarn run: npm install -g yarn - - name: yarn --frozen-lockfile - run: yarn --frozen-lockfile + - name: yarn --frozen-lockfile --network-timeout 180000 + run: yarn --frozen-lockfile --network-timeout 180000 - 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