1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-19 02:37:51 +03:00
wezterm/.github/workflows/posix.yml

82 lines
2.1 KiB
YAML

name: posix
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, macos-latest]
rust_toolchain: [stable]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Install System Deps
run: sudo ./get-deps
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust_toolchain }}
override: true
components: rustfmt
- name: Set macOS deployment target
run: |
echo "::set-env name=MACOSX_DEPLOYMENT_TARGET=10.9"
- name: Show versions
run: |
rustc -V
cargo -V
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ matrix.os }}-${{ matrix.rust_toolchain }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ matrix.os }}-${{ matrix.rust_toolchain }}-cargo-index-${{ hashFiles('Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ matrix.os }}-${{ matrix.rust_toolchain }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
- name: Check formatting
run: cargo fmt --all -- --check
- name: Build
run: cargo build --all --release
- name: Test
run: cargo test --all --release
- name: Package
run: bash ci/deploy.sh
- name: Move macOS Package
if: contains(matrix.os, 'macos')
run: |
mkdir pkg_
mv *.zip pkg_
- name: Move Linux Package
if: contains(matrix.os, 'ubuntu')
run: |
mkdir pkg_
mv *.deb pkg_
mv *.xz pkg_
mv *.AppImage pkg_
- uses: actions/upload-artifact@master
if: contains(matrix.os, 'macos')
with:
name: macos
path: pkg_
- uses: actions/upload-artifact@master
if: contains(matrix.os, 'ubuntu')
with:
name: linux
path: pkg_