mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
a0471a5447
And restore skipping of rust install if it hasn't changed.
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- "**"
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
jobs:
|
|
tests:
|
|
name: Tests
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v2
|
|
|
|
# Work around https://github.com/actions/cache/issues/403.
|
|
- name: Use GNU tar
|
|
run: |
|
|
echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
|
|
|
|
- name: Cache artifacts
|
|
id: cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
~/.rustup
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
|
|
|
|
- name: Install Rust
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
target: x86_64-apple-darwin
|
|
profile: minimal
|
|
|
|
- name: Run tests
|
|
run: cargo test --no-fail-fast
|
|
|
|
- name: Create and upload app bundle
|
|
run: script/bundle
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Zed.dmg
|
|
path: target/release/Zed.dmg
|