From fe39e36277058cafa11edcadb9335c684e73eff6 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Mon, 6 Jun 2022 00:06:08 +0400 Subject: [PATCH] Potentially fix github actions build (if this doesn't work, we'll fix it later after the release) [skip ci] --- .github/workflows/build.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b2e028c718..4e9ce7601b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,9 @@ jobs: fetch-depth: '0' - name: Set active Xcode path - run: sudo xcode-select -s /Applications/Xcode_13.2.1.app/Contents/Developer + run: | + XCODE_VERSION=$(cat versions.json | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["xcode"]);') + sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app/Contents/Developer - name: Create canonical source directory run: | @@ -37,15 +39,6 @@ jobs: # use canonical bazel root BAZEL_USER_ROOT="/private/var/tmp/_bazel_telegram" - # download bazel - mkdir -p $HOME/bazel-dist - pushd $HOME/bazel-dist - curl -O -L https://github.com/bazelbuild/bazel/releases/download/4.0.0/bazel-4.0.0-darwin-x86_64 - mv bazel-4.0.0* bazel - chmod +x bazel - ./bazel --version - popd - cd $SOURCE_DIR BUILD_NUMBER_OFFSET="$(cat build_number_offset)" @@ -70,9 +63,8 @@ jobs: for f in "$CERTS_PATH"/*.p12; do security import "$f" -k "$MY_KEYCHAIN" -P "" -T /usr/bin/codesign -T /usr/bin/security done - # fake certificates are self-signed, so we need to manually mark them as trusted (otherwise bazel will not pick them up) for f in "$CERTS_PATH"/*.cer; do - sudo security add-trusted-cert -d -r trustRoot -p codeSign -k "$MY_KEYCHAIN" "$f" + security import "$f" -k "$MY_KEYCHAIN" -P "" -T /usr/bin/codesign -T /usr/bin/security done security set-key-partition-list -S apple-tool:,apple: -k "$MY_KEYCHAIN_PASSWORD" "$MY_KEYCHAIN" @@ -83,7 +75,6 @@ jobs: # build the app python3 build-system/Make/Make.py \ - --bazel="$HOME/bazel-dist/bazel" \ --bazelUserRoot="$BAZEL_USER_ROOT" \ build \ --disableParallelSwiftmoduleGeneration \