Use larger runners for Linux CI steps (#11574)

To speed up Linux CI builds, use a set of self-hosted Linux machines and
use them to run all slow CI steps for Linux: "tests", bundling and
nightly builds.

Also adds a set of dev icons as Linux bundling script required them for
`run-bundling`-tagged builds from regular PRs.
Same icons as for Preview were used, but, ideally, something different
could be created.

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2024-05-10 00:44:31 +03:00 committed by GitHub
parent bff1d8b142
commit bca639bda9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 31 deletions

View file

@ -104,23 +104,19 @@ jobs:
# todo(linux): Actually run the tests # todo(linux): Actually run the tests
linux_tests: linux_tests:
name: (Linux) Run Clippy and tests name: (Linux) Run Clippy and tests
runs-on: ubuntu-latest runs-on:
- self-hosted
- deploy
steps: steps:
- name: Add Rust to the PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
clean: false clean: false
submodules: "recursive" submodules: "recursive"
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: configure linux
shell: bash -euxo pipefail {0}
run: script/linux
- name: cargo clippy - name: cargo clippy
run: cargo xtask clippy run: cargo xtask clippy
@ -262,26 +258,25 @@ jobs:
bundle-linux: bundle-linux:
name: Create a Linux bundle name: Create a Linux bundle
runs-on: ubuntu-22.04 # keep the version fixed to avoid libc and dynamic linked library issues runs-on:
- self-hosted
- deploy
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }} if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
needs: [linux_tests] needs: [linux_tests]
env: env:
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }} ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
steps: steps:
- name: Add Rust to the PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
clean: false clean: false
submodules: "recursive" submodules: "recursive"
- name: Cache dependencies - name: Limit target directory size
uses: swatinem/rust-cache@v2 run: script/clear-target-dir-if-larger-than 100
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Configure linux
shell: bash -euxo pipefail {0}
run: script/linux
- name: Determine version and release channel - name: Determine version and release channel
if: ${{ startsWith(github.ref, 'refs/tags/v') }} if: ${{ startsWith(github.ref, 'refs/tags/v') }}

View file

@ -96,7 +96,9 @@ jobs:
bundle-deb: bundle-deb:
name: Create a Linux *.tar.gz bundle name: Create a Linux *.tar.gz bundle
if: github.repository_owner == 'zed-industries' if: github.repository_owner == 'zed-industries'
runs-on: ubuntu-22.04 # keep the version fixed to avoid libc and dynamic linked library issues runs-on:
- self-hosted
- deploy
needs: tests needs: tests
env: env:
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }} DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
@ -109,14 +111,8 @@ jobs:
clean: false clean: false
submodules: "recursive" submodules: "recursive"
- name: Cache dependencies - name: Add Rust to the PATH
uses: swatinem/rust-cache@v2 run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Configure linux
shell: bash -euxo pipefail {0}
run: script/linux
- name: Set release channel to nightly - name: Set release channel to nightly
run: | run: |

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 KiB

View file

@ -1,12 +1,12 @@
#!/usr/bin/bash #!/usr/bin/env bash
set -e set -ex
# Install our submodule dependencies # Install our submodule dependencies
git submodule update --init --recursive git submodule update --init --recursive
# install the wasm toolchain # install the wasm toolchain
rustup target add wasm32-wasi which rustup > /dev/null 2>&1 || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# if sudo is not installed, define an empty alias # if sudo is not installed, define an empty alias
maysudo=$(command -v sudo || command -v doas || true) maysudo=$(command -v sudo || command -v doas || true)