mirror of
https://github.com/rust-kotlin/ashell.git
synced 2026-09-22 00:00:59 +00:00
65 lines
2.1 KiB
YAML
65 lines
2.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ["main", "master"]
|
|
pull_request:
|
|
branches: ["main", "master"]
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.name }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-2022
|
|
target: x86_64-pc-windows-msvc
|
|
name: windows-x64
|
|
- os: windows-2022
|
|
target: i686-pc-windows-msvc
|
|
name: windows-x86
|
|
- os: windows-2022
|
|
target: aarch64-pc-windows-msvc
|
|
name: windows-arm64
|
|
- os: ubuntu-22.04 # build on the oldest supported runner for broader glibc compatibility
|
|
target: x86_64-unknown-linux-gnu
|
|
name: linux-x86_64
|
|
- os: macos-14 # Apple Silicon
|
|
target: aarch64-apple-darwin
|
|
name: macos-arm64
|
|
- os: macos-14 # Intel (cross-compiled from Apple Silicon to avoid queue delays)
|
|
target: x86_64-apple-darwin
|
|
name: macos-x64
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# GPUI needs these system libs on Linux to compile.
|
|
- name: Install Linux GUI dependencies
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
build-essential pkg-config cmake \
|
|
libfontconfig1-dev libfreetype6-dev \
|
|
libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \
|
|
libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev \
|
|
libgl1-mesa-dev libegl1-mesa-dev libgtk-3-dev \
|
|
libudev-dev
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
|
|
- name: Cache cargo build
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: ${{ matrix.target }}
|
|
|
|
- name: Build (release)
|
|
# We build in release mode so that the release workflow can reuse the exact artifacts
|
|
run: cargo build --release --target ${{ matrix.target }}
|