From 95fcac588b269248a1af4c90727d89cf31de18c9 Mon Sep 17 00:00:00 2001 From: Morteza Pourkazemi Date: Wed, 7 Aug 2024 13:52:55 +0200 Subject: [PATCH 1/4] [PCCS-11868] Support arm --- .github/workflows/release.yml | 44 +++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80cc126..1fa057a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,11 @@ name: Build Artifacts -on: - release: - types: - - created +on: push + +# on: +# release: +# types: +# - created jobs: build: @@ -11,21 +13,29 @@ jobs: fail-fast: true matrix: config: - - name: linux@amd64 + # Checkout https://github.com/actions/runner-images?tab=readme-ov-file#available-images + - name: linux os: ubuntu-latest platform: linux - - name: macos@amd64 + arch: amd64 + - name: macos + os: macos-13 + platform: darwin + arch: amd64 + - name: macos os: macos-latest platform: darwin + arch: arm64 runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.name }} + name: ${{ matrix.config.name }}@${{ matrix.config.arch }} steps: - uses: actions/github-script@v7 id: get_release with: script: | - const tag = context.ref.replace('refs/tags/', ''); + // const tag = context.ref.replace('refs/tags/', ''); + const tag = 'v1.46.7'; const { owner, repo } = context.repo; const { data: { upload_url } } = await github.rest.repos.getReleaseByTag({ owner, repo, tag }); @@ -40,9 +50,9 @@ jobs: - name: Install Basilisk run: | - wget https://github.com/bazelbuild/bazelisk/releases/download/v1.7.5/bazelisk-${{ matrix.config.platform }}-amd64 - chmod a+x bazelisk-${{ matrix.config.platform }}-amd64 - sudo mv bazelisk-${{ matrix.config.platform }}-amd64 /usr/local/bin/bazel + wget https://github.com/bazelbuild/bazelisk/releases/download/v1.7.5/bazelisk-${{ matrix.config.platform }}-${{ matrix.config.arch }} + chmod a+x bazelisk-${{ matrix.config.platform }}-${{ matrix.config.arch }} + sudo mv bazelisk-${{ matrix.config.platform }}-${{ matrix.config.arch }} /usr/local/bin/bazel - name: Build grpc_php_plugin and grpc_pyhon_plugin run: | @@ -54,9 +64,9 @@ jobs: run: | cd bazel-bin/src/compiler/ cp grpc_php_plugin grpc-php-plugin - tar czf grpc-php-plugin.${VERSION}.${{ matrix.config.platform }}.amd64.tar.gz grpc-php-plugin + tar czf grpc-php-plugin.${VERSION}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz grpc-php-plugin cp grpc_python_plugin grpc-python-plugin - tar czf grpc-python-plugin.${VERSION}.${{ matrix.config.platform }}.amd64.tar.gz grpc-python-plugin + tar czf grpc-python-plugin.${VERSION}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz grpc-python-plugin - name: Upload Release Asset for grpc_php_plugin uses: actions/upload-release-asset@v1 @@ -64,8 +74,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: bazel-bin/src/compiler/grpc-php-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.amd64.tar.gz - asset_name: grpc-php-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.amd64.tar.gz + asset_path: bazel-bin/src/compiler/grpc-php-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz + asset_name: grpc-php-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz asset_content_type: application/gzip - name: Upload Release Asset for grpc_python_plugin @@ -74,6 +84,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: bazel-bin/src/compiler/grpc-python-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.amd64.tar.gz - asset_name: grpc-python-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.amd64.tar.gz + asset_path: bazel-bin/src/compiler/grpc-python-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz + asset_name: grpc-python-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz asset_content_type: application/gzip From 88c09d13e6e786c2d7c7ec38b46d4a61490afab1 Mon Sep 17 00:00:00 2001 From: Morteza Pourkazemi Date: Wed, 7 Aug 2024 13:56:50 +0200 Subject: [PATCH 2/4] [PCCS-11868] Support arm --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fa057a..3df0cca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,7 @@ jobs: - name: Install Basilisk run: | - wget https://github.com/bazelbuild/bazelisk/releases/download/v1.7.5/bazelisk-${{ matrix.config.platform }}-${{ matrix.config.arch }} + wget https://github.com/bazelbuild/bazelisk/releases/download/v1.9.0/bazelisk-${{ matrix.config.platform }}-${{ matrix.config.arch }} chmod a+x bazelisk-${{ matrix.config.platform }}-${{ matrix.config.arch }} sudo mv bazelisk-${{ matrix.config.platform }}-${{ matrix.config.arch }} /usr/local/bin/bazel From b793de7cbe4b98f3ec11a7219ba2e7795e56cf50 Mon Sep 17 00:00:00 2001 From: Morteza Pourkazemi Date: Wed, 7 Aug 2024 13:59:24 +0200 Subject: [PATCH 3/4] [PCCS-11868] Support arm --- .github/workflows/release.yml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3df0cca..201a8d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,22 +13,15 @@ jobs: fail-fast: true matrix: config: - # Checkout https://github.com/actions/runner-images?tab=readme-ov-file#available-images - - name: linux + - name: linux@amd64 os: ubuntu-latest platform: linux - arch: amd64 - - name: macos + - name: macos@amd64 os: macos-13 platform: darwin - arch: amd64 - - name: macos - os: macos-latest - platform: darwin - arch: arm64 runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.name }}@${{ matrix.config.arch }} + name: ${{ matrix.config.name }} steps: - uses: actions/github-script@v7 id: get_release @@ -50,9 +43,9 @@ jobs: - name: Install Basilisk run: | - wget https://github.com/bazelbuild/bazelisk/releases/download/v1.9.0/bazelisk-${{ matrix.config.platform }}-${{ matrix.config.arch }} - chmod a+x bazelisk-${{ matrix.config.platform }}-${{ matrix.config.arch }} - sudo mv bazelisk-${{ matrix.config.platform }}-${{ matrix.config.arch }} /usr/local/bin/bazel + wget https://github.com/bazelbuild/bazelisk/releases/download/v1.7.5/bazelisk-${{ matrix.config.platform }}-amd64 + chmod a+x bazelisk-${{ matrix.config.platform }}-amd64 + sudo mv bazelisk-${{ matrix.config.platform }}-amd64 /usr/local/bin/bazel - name: Build grpc_php_plugin and grpc_pyhon_plugin run: | @@ -64,9 +57,9 @@ jobs: run: | cd bazel-bin/src/compiler/ cp grpc_php_plugin grpc-php-plugin - tar czf grpc-php-plugin.${VERSION}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz grpc-php-plugin + tar czf grpc-php-plugin.${VERSION}.${{ matrix.config.platform }}.amd64.tar.gz grpc-php-plugin cp grpc_python_plugin grpc-python-plugin - tar czf grpc-python-plugin.${VERSION}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz grpc-python-plugin + tar czf grpc-python-plugin.${VERSION}.${{ matrix.config.platform }}.amd64.tar.gz grpc-python-plugin - name: Upload Release Asset for grpc_php_plugin uses: actions/upload-release-asset@v1 @@ -74,8 +67,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: bazel-bin/src/compiler/grpc-php-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz - asset_name: grpc-php-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz + asset_path: bazel-bin/src/compiler/grpc-php-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.amd64.tar.gz + asset_name: grpc-php-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.amd64.tar.gz asset_content_type: application/gzip - name: Upload Release Asset for grpc_python_plugin @@ -84,6 +77,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: bazel-bin/src/compiler/grpc-python-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz - asset_name: grpc-python-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz + asset_path: bazel-bin/src/compiler/grpc-python-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.amd64.tar.gz + asset_name: grpc-python-plugin.${{ steps.get_release.outputs.tag }}.${{ matrix.config.platform }}.amd64.tar.gz asset_content_type: application/gzip From 56056db96ce030656acbd07df0819450f3589025 Mon Sep 17 00:00:00 2001 From: Morteza Pourkazemi Date: Wed, 7 Aug 2024 14:02:52 +0200 Subject: [PATCH 4/4] [PCCS-11868] Support arm --- .github/workflows/release.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 201a8d4..8085a50 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,9 @@ name: Build Artifacts -on: push - -# on: -# release: -# types: -# - created +on: + release: + types: + - created jobs: build: @@ -27,8 +25,7 @@ jobs: id: get_release with: script: | - // const tag = context.ref.replace('refs/tags/', ''); - const tag = 'v1.46.7'; + const tag = context.ref.replace('refs/tags/', ''); const { owner, repo } = context.repo; const { data: { upload_url } } = await github.rest.repos.getReleaseByTag({ owner, repo, tag });