2021-04-02 21:43:30 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-06-25 01:02:08 +00:00
|
|
|
- main
|
2021-05-17 22:47:42 +00:00
|
|
|
tags:
|
|
|
|
- "v*"
|
2021-04-02 21:43:30 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "**"
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
CARGO_INCREMENTAL: 0
|
2021-05-19 12:24:23 +00:00
|
|
|
RUST_BACKTRACE: 1
|
2021-04-02 21:43:30 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-05-18 03:57:07 +00:00
|
|
|
tests:
|
|
|
|
name: Run tests
|
|
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: x86_64-apple-darwin
|
|
|
|
profile: minimal
|
2021-04-02 21:43:30 +00:00
|
|
|
|
2021-05-18 03:57:07 +00:00
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v2
|
2021-05-18 04:46:33 +00:00
|
|
|
with:
|
|
|
|
clean: false
|
2021-05-17 22:48:03 +00:00
|
|
|
|
2021-05-18 03:57:07 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --no-fail-fast
|
2021-04-28 21:04:22 +00:00
|
|
|
|
2021-05-17 22:18:31 +00:00
|
|
|
bundle:
|
|
|
|
name: Bundle app
|
|
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
2021-05-18 00:07:39 +00:00
|
|
|
- name: Install Rust x86_64-apple-darwin target
|
2021-05-17 22:18:31 +00:00
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: x86_64-apple-darwin
|
|
|
|
profile: minimal
|
|
|
|
|
2021-05-18 00:07:39 +00:00
|
|
|
- name: Install Rust aarch64-apple-darwin target
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: aarch64-apple-darwin
|
|
|
|
profile: minimal
|
|
|
|
|
2021-05-17 22:48:03 +00:00
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v2
|
2021-05-18 04:46:33 +00:00
|
|
|
with:
|
|
|
|
clean: false
|
2021-05-17 22:48:03 +00:00
|
|
|
|
2021-05-17 22:18:31 +00:00
|
|
|
- name: Create app bundle
|
2021-05-17 23:57:50 +00:00
|
|
|
run: script/bundle
|
2021-05-17 22:18:31 +00:00
|
|
|
|
2021-06-25 01:02:08 +00:00
|
|
|
- name: Upload app bundle to workflow run if main branch
|
2021-05-17 22:18:31 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
2021-06-25 01:02:08 +00:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
2021-04-28 21:04:22 +00:00
|
|
|
with:
|
2021-04-28 21:42:42 +00:00
|
|
|
name: Zed.dmg
|
2021-05-04 23:18:14 +00:00
|
|
|
path: target/release/Zed.dmg
|
2021-05-17 22:18:31 +00:00
|
|
|
|
2021-05-18 05:39:01 +00:00
|
|
|
- uses: softprops/action-gh-release@v1
|
2021-06-25 01:02:08 +00:00
|
|
|
name: Upload app bundle to release if release tag
|
2021-05-18 03:33:08 +00:00
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
2021-05-17 22:18:31 +00:00
|
|
|
with:
|
2021-05-18 05:39:01 +00:00
|
|
|
draft: true
|
|
|
|
files: target/release/Zed.dmg
|
2021-05-17 22:18:31 +00:00
|
|
|
overwrite: true
|
|
|
|
body: ""
|
2021-05-18 05:39:01 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|