2021-10-02 12:20:21 +00:00
|
|
|
# Huge thanks to Alacritty, as their configuration served as a starting point for this one!
|
|
|
|
# See: https://github.com/alacritty/alacritty
|
|
|
|
|
|
|
|
name: CI
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest, macos-latest, ubuntu-latest]
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install cargo-make
|
|
|
|
run: |
|
|
|
|
cargo install --force cargo-make
|
2021-10-02 12:35:44 +00:00
|
|
|
- name: Install Linux dependencies
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
|
|
|
run: |
|
|
|
|
sudo apt install libx11-dev libxtst-dev libxkbcommon-dev libdbus-1-dev libwxgtk3.0-gtk3-dev
|
2021-10-02 12:20:21 +00:00
|
|
|
- name: Run test suite
|
|
|
|
run: cargo make test
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cargo make build-binary
|
|
|
|
|
|
|
|
check-wayland:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-10-02 12:35:44 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-10-02 13:04:19 +00:00
|
|
|
sudo apt install libxkbcommon-dev libwxgtk3.0-gtk3-dev libdbus-1-dev
|
2021-10-02 12:20:21 +00:00
|
|
|
- name: Install cargo-make
|
|
|
|
run: |
|
|
|
|
cargo install --force cargo-make
|
2021-10-02 13:04:19 +00:00
|
|
|
- name: Build
|
2021-10-02 12:35:44 +00:00
|
|
|
run: cargo make build-binary --env NO_X11=true
|
2021-10-02 12:20:21 +00:00
|
|
|
|
|
|
|
check-macos-arm:
|
|
|
|
runs-on: macos-11
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install target
|
|
|
|
run: rustup update && rustup target add aarch64-apple-darwin
|
2021-10-02 12:22:12 +00:00
|
|
|
- name: Install cargo-make
|
|
|
|
run: |
|
|
|
|
cargo install --force cargo-make
|
2021-10-03 09:07:56 +00:00
|
|
|
- name: Setup tmate session
|
|
|
|
uses: mxschmitt/action-tmate@v3
|
|
|
|
with:
|
|
|
|
limit-access-to-actor: true
|
2021-10-02 13:04:19 +00:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cargo make build-macos-arm-binary
|
2021-10-03 08:13:09 +00:00
|
|
|
- name: Debug
|
|
|
|
run: |
|
|
|
|
file target/aarch64-apple-darwin/debug/espanso
|
2021-10-02 12:20:21 +00:00
|
|
|
|
|
|
|
# TODO: add clippy check
|