ci.yml

 1name: CI
 2
 3on:
 4  push:
 5    branches:
 6      - master
 7  pull_request:
 8    branches:
 9      - "**"
10
11env:
12  CARGO_TERM_COLOR: always
13  CARGO_INCREMENTAL: 0
14
15jobs:
16  tests:
17    name: Tests
18    runs-on: self-hosted
19    steps:
20      - name: Checkout repo
21        uses: actions/checkout@v2
22
23      # Work around https://github.com/actions/cache/issues/403.
24      - name: Use GNU tar
25        run: |
26          echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
27
28      - name: Cache artifacts
29        id: cache
30        uses: actions/cache@v2
31        with:
32          path: |
33            ~/.cargo/registry
34            ~/.cargo/git
35            ~/.rustup
36            target
37          key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
38
39      - name: Install Rust
40        if: steps.cache.outputs.cache-hit != 'true'
41        uses: actions-rs/toolchain@v1
42        with:
43          toolchain: stable
44          target: x86_64-apple-darwin
45          profile: minimal
46
47      - name: Run tests
48        run: cargo test --no-fail-fast
49
50      - name: Create and upload app bundle
51        run: script/bundle
52      - uses: actions/upload-artifact@v2
53        with:
54          name: Zed.dmg
55          path: target/release/Zed.dmg