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 target
36 key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
37
38 - name: Install Rust
39 # if: steps.cache.outputs.cache-hit != 'true'
40 uses: actions-rs/toolchain@v1
41 with:
42 toolchain: stable
43 target: x86_64-apple-darwin
44 profile: minimal
45
46 - name: Run tests
47 run: cargo test --no-fail-fast
48
49 - name: Create and upload app bundle
50 run: script/bundle
51 - uses: actions/upload-artifact@v2
52 with:
53 name: Zed.dmg
54 path: target/release/Zed.dmg