run_bundling.yml

  1# Generated from xtask::workflows::run_bundling
  2# Rebuild with `cargo xtask workflows`.
  3name: run_bundling
  4env:
  5  CARGO_TERM_COLOR: always
  6  CARGO_INCREMENTAL: '0'
  7  RUST_BACKTRACE: '1'
  8  ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
  9  ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
 10on:
 11  pull_request:
 12    types:
 13    - labeled
 14    - synchronize
 15jobs:
 16  bundle_mac_x86_64:
 17    if: |-
 18      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
 19                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
 20    runs-on: self-mini-macos
 21    env:
 22      MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
 23      MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
 24      APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
 25      APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
 26      APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
 27    steps:
 28    - name: steps::checkout_repo
 29      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
 30      with:
 31        clean: false
 32    - name: steps::setup_node
 33      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
 34      with:
 35        node-version: '20'
 36    - name: steps::setup_sentry
 37      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
 38      with:
 39        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
 40    - name: steps::clear_target_dir_if_large
 41      run: ./script/clear-target-dir-if-larger-than 300
 42      shell: bash -euxo pipefail {0}
 43    - name: run_bundling::bundle_mac
 44      run: ./script/bundle-mac x86_64-apple-darwin
 45      shell: bash -euxo pipefail {0}
 46    - name: '@actions/upload-artifact Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.dmg'
 47      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
 48      with:
 49        name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.dmg
 50        path: target/x86_64-apple-darwin/release/Zed.dmg
 51    - name: '@actions/upload-artifact zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-macos-x86_64.gz'
 52      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
 53      with:
 54        name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-macos-x86_64.gz
 55        path: target/zed-remote-server-macos-x86_64.gz
 56    timeout-minutes: 60
 57  bundle_mac_arm64:
 58    if: |-
 59      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
 60                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
 61    runs-on: self-mini-macos
 62    env:
 63      MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
 64      MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
 65      APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
 66      APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
 67      APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
 68    steps:
 69    - name: steps::checkout_repo
 70      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
 71      with:
 72        clean: false
 73    - name: steps::setup_node
 74      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
 75      with:
 76        node-version: '20'
 77    - name: steps::setup_sentry
 78      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
 79      with:
 80        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
 81    - name: steps::clear_target_dir_if_large
 82      run: ./script/clear-target-dir-if-larger-than 300
 83      shell: bash -euxo pipefail {0}
 84    - name: run_bundling::bundle_mac
 85      run: ./script/bundle-mac aarch64-apple-darwin
 86      shell: bash -euxo pipefail {0}
 87    - name: '@actions/upload-artifact Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg'
 88      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
 89      with:
 90        name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg
 91        path: target/aarch64-apple-darwin/release/Zed.dmg
 92    - name: '@actions/upload-artifact zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-macos-aarch64.gz'
 93      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
 94      with:
 95        name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-macos-aarch64.gz
 96        path: target/zed-remote-server-macos-aarch64.gz
 97    timeout-minutes: 60
 98  bundle_linux_x86_64:
 99    if: |-
100      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
101                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
102    runs-on: namespace-profile-32x64-ubuntu-2004
103    steps:
104    - name: steps::checkout_repo
105      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
106      with:
107        clean: false
108    - name: steps::setup_sentry
109      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
110      with:
111        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
112    - name: steps::setup_linux
113      run: ./script/linux
114      shell: bash -euxo pipefail {0}
115    - name: steps::install_mold
116      run: ./script/install-mold
117      shell: bash -euxo pipefail {0}
118    - name: ./script/bundle-linux
119      run: ./script/bundle-linux
120      shell: bash -euxo pipefail {0}
121    - name: '@actions/upload-artifact zed-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz'
122      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
123      with:
124        name: zed-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
125        path: target/release/zed-*.tar.gz
126    - name: '@actions/upload-artifact zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz'
127      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
128      with:
129        name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
130        path: target/release/zed-remote-server-*.tar.gz
131    timeout-minutes: 60
132  bundle_linux_arm64:
133    if: |-
134      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
135                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
136    runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
137    steps:
138    - name: steps::checkout_repo
139      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
140      with:
141        clean: false
142    - name: steps::setup_sentry
143      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
144      with:
145        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
146    - name: steps::setup_linux
147      run: ./script/linux
148      shell: bash -euxo pipefail {0}
149    - name: steps::install_mold
150      run: ./script/install-mold
151      shell: bash -euxo pipefail {0}
152    - name: ./script/bundle-linux
153      run: ./script/bundle-linux
154      shell: bash -euxo pipefail {0}
155    - name: '@actions/upload-artifact zed-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz'
156      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
157      with:
158        name: zed-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
159        path: target/release/zed-*.tar.gz
160    - name: '@actions/upload-artifact zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz'
161      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
162      with:
163        name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
164        path: target/release/zed-remote-server-*.tar.gz
165    timeout-minutes: 60
166  bundle_windows_x86_64:
167    if: |-
168      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
169                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
170    runs-on: self-32vcpu-windows-2022
171    env:
172      AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
173      AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
174      AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
175      ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
176      CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
177      ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
178      FILE_DIGEST: SHA256
179      TIMESTAMP_DIGEST: SHA256
180      TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
181    steps:
182    - name: steps::checkout_repo
183      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
184      with:
185        clean: false
186    - name: steps::setup_sentry
187      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
188      with:
189        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
190    - name: run_bundling::bundle_windows
191      run: script/bundle-windows.ps1 -Architecture x86_64
192      shell: pwsh
193      working-directory: ${{ env.ZED_WORKSPACE }}
194    - name: '@actions/upload-artifact Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.exe'
195      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
196      with:
197        name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.exe
198        path: ${{ env.SETUP_PATH }}
199    timeout-minutes: 60
200  bundle_windows_arm64:
201    if: |-
202      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
203                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
204    runs-on: self-32vcpu-windows-2022
205    env:
206      AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
207      AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
208      AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
209      ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
210      CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
211      ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
212      FILE_DIGEST: SHA256
213      TIMESTAMP_DIGEST: SHA256
214      TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
215    steps:
216    - name: steps::checkout_repo
217      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
218      with:
219        clean: false
220    - name: steps::setup_sentry
221      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
222      with:
223        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
224    - name: run_bundling::bundle_windows
225      run: script/bundle-windows.ps1 -Architecture aarch64
226      shell: pwsh
227      working-directory: ${{ env.ZED_WORKSPACE }}
228    - name: '@actions/upload-artifact Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.exe'
229      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
230      with:
231        name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.exe
232        path: ${{ env.SETUP_PATH }}
233    timeout-minutes: 60
234concurrency:
235  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
236  cancel-in-progress: true