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        if-no-files-found: error
 52    - name: '@actions/upload-artifact zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-macos-x86_64.gz'
 53      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
 54      with:
 55        name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-macos-x86_64.gz
 56        path: target/zed-remote-server-macos-x86_64.gz
 57        if-no-files-found: error
 58    outputs:
 59      zed: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.dmg
 60      remote-server: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-macos-x86_64.gz
 61    timeout-minutes: 60
 62  bundle_mac_arm64:
 63    if: |-
 64      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
 65                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
 66    runs-on: self-mini-macos
 67    env:
 68      MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
 69      MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
 70      APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
 71      APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
 72      APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
 73    steps:
 74    - name: steps::checkout_repo
 75      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
 76      with:
 77        clean: false
 78    - name: steps::setup_node
 79      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
 80      with:
 81        node-version: '20'
 82    - name: steps::setup_sentry
 83      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
 84      with:
 85        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
 86    - name: steps::clear_target_dir_if_large
 87      run: ./script/clear-target-dir-if-larger-than 300
 88      shell: bash -euxo pipefail {0}
 89    - name: run_bundling::bundle_mac
 90      run: ./script/bundle-mac aarch64-apple-darwin
 91      shell: bash -euxo pipefail {0}
 92    - name: '@actions/upload-artifact Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg'
 93      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
 94      with:
 95        name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg
 96        path: target/aarch64-apple-darwin/release/Zed.dmg
 97        if-no-files-found: error
 98    - name: '@actions/upload-artifact zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-macos-aarch64.gz'
 99      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
100      with:
101        name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-macos-aarch64.gz
102        path: target/zed-remote-server-macos-aarch64.gz
103        if-no-files-found: error
104    outputs:
105      zed: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg
106      remote-server: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-macos-aarch64.gz
107    timeout-minutes: 60
108  bundle_linux_x86_64:
109    if: |-
110      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
111                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
112    runs-on: namespace-profile-32x64-ubuntu-2004
113    steps:
114    - name: steps::checkout_repo
115      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
116      with:
117        clean: false
118    - name: steps::setup_sentry
119      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
120      with:
121        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
122    - name: steps::setup_linux
123      run: ./script/linux
124      shell: bash -euxo pipefail {0}
125    - name: steps::install_mold
126      run: ./script/install-mold
127      shell: bash -euxo pipefail {0}
128    - name: ./script/bundle-linux
129      run: ./script/bundle-linux
130      shell: bash -euxo pipefail {0}
131    - name: '@actions/upload-artifact zed-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz'
132      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
133      with:
134        name: zed-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
135        path: target/release/zed-*.tar.gz
136        if-no-files-found: error
137    - name: '@actions/upload-artifact zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz'
138      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
139      with:
140        name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
141        path: target/zed-remote-server-*.gz
142        if-no-files-found: error
143    outputs:
144      zed: zed-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
145      remote-server: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
146    timeout-minutes: 60
147  bundle_linux_arm64:
148    if: |-
149      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
150                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
151    runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
152    steps:
153    - name: steps::checkout_repo
154      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
155      with:
156        clean: false
157    - name: steps::setup_sentry
158      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
159      with:
160        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
161    - name: steps::setup_linux
162      run: ./script/linux
163      shell: bash -euxo pipefail {0}
164    - name: steps::install_mold
165      run: ./script/install-mold
166      shell: bash -euxo pipefail {0}
167    - name: ./script/bundle-linux
168      run: ./script/bundle-linux
169      shell: bash -euxo pipefail {0}
170    - name: '@actions/upload-artifact zed-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz'
171      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
172      with:
173        name: zed-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
174        path: target/release/zed-*.tar.gz
175        if-no-files-found: error
176    - name: '@actions/upload-artifact zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz'
177      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
178      with:
179        name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
180        path: target/zed-remote-server-*.gz
181        if-no-files-found: error
182    outputs:
183      zed: zed-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
184      remote-server: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
185    timeout-minutes: 60
186  bundle_windows_x86_64:
187    if: |-
188      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
189                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
190    runs-on: self-32vcpu-windows-2022
191    env:
192      AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
193      AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
194      AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
195      ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
196      CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
197      ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
198      FILE_DIGEST: SHA256
199      TIMESTAMP_DIGEST: SHA256
200      TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
201    steps:
202    - name: steps::checkout_repo
203      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
204      with:
205        clean: false
206    - name: steps::setup_sentry
207      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
208      with:
209        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
210    - name: run_bundling::bundle_windows
211      run: script/bundle-windows.ps1 -Architecture x86_64
212      shell: pwsh
213      working-directory: ${{ env.ZED_WORKSPACE }}
214    - name: '@actions/upload-artifact Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.exe'
215      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
216      with:
217        name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.exe
218        path: ${{ env.SETUP_PATH }}
219        if-no-files-found: error
220    outputs:
221      zed: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.exe
222    timeout-minutes: 60
223  bundle_windows_arm64:
224    if: |-
225      (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
226                       (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
227    runs-on: self-32vcpu-windows-2022
228    env:
229      AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
230      AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
231      AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
232      ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
233      CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
234      ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
235      FILE_DIGEST: SHA256
236      TIMESTAMP_DIGEST: SHA256
237      TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
238    steps:
239    - name: steps::checkout_repo
240      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
241      with:
242        clean: false
243    - name: steps::setup_sentry
244      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
245      with:
246        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
247    - name: run_bundling::bundle_windows
248      run: script/bundle-windows.ps1 -Architecture aarch64
249      shell: pwsh
250      working-directory: ${{ env.ZED_WORKSPACE }}
251    - name: '@actions/upload-artifact Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.exe'
252      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
253      with:
254        name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.exe
255        path: ${{ env.SETUP_PATH }}
256        if-no-files-found: error
257    outputs:
258      zed: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.exe
259    timeout-minutes: 60
260concurrency:
261  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
262  cancel-in-progress: true