118 lines
2.7 KiB
YAML
118 lines
2.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
branches-ignore:
|
|
- 'master'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
emacs_version: [25.1, 26.3]
|
|
ruby-version: [2.6]
|
|
include:
|
|
- emacs_version: 24.1
|
|
lint_ignore: 1
|
|
- emacs_version: 24.2
|
|
lint_ignore: 1
|
|
env:
|
|
EMACS_LINT_IGNORE: ${{ matrix.lint_ignore }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: purcell/setup-emacs@master
|
|
with:
|
|
version: ${{ matrix.emacs_version }}
|
|
|
|
- uses: dickmao/setup-paths@master
|
|
with:
|
|
paths: local/bin:local/cask/bin:.rbenv/bin
|
|
|
|
- uses: actions/cache@v1
|
|
if: startsWith(runner.os, 'Linux')
|
|
with:
|
|
path: ~/.cache/rubocop_cache
|
|
key: ${{ runner.os }}-rubocop
|
|
|
|
- uses: actions/cache@v1
|
|
if: startsWith(runner.os, 'macOS')
|
|
with:
|
|
path: ~/Library/Caches/rubocop_cache
|
|
key: ${{ runner.os }}-rubocop
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.rbenv
|
|
key: ${{ runner.os }}-rbenv-${{ hashFiles('**/.ruby-version') }}
|
|
restore-keys: |
|
|
{{ runner.os }}-rbenv-
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/local
|
|
key: ${{ runner.os }}-local-000
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.emacs.d
|
|
key: emacs.d
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cask
|
|
key: cask-000
|
|
|
|
- name: macos-rbenv
|
|
if: startsWith(runner.os, 'macOS')
|
|
run: brew list rbenv &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install rbenv
|
|
|
|
- name: linux-rbenv
|
|
if: startsWith(runner.os, 'Linux')
|
|
uses: |
|
|
masa-iwasaki/setup-rbenv@v1
|
|
|
|
- name: ruby
|
|
run: |
|
|
eval "eval $(rbenv init - --no-rehash)"
|
|
rbenv install -s ${{ matrix.ruby-version }}
|
|
|
|
- name: bundler
|
|
run: |
|
|
eval "eval $(rbenv init - --no-rehash)"
|
|
gem install bundler
|
|
|
|
- name: apt-get
|
|
if: startsWith(runner.os, 'Linux')
|
|
run: |
|
|
sudo apt-get -yq update
|
|
DEBIAN_FRONTEND=noninteractive sudo apt-get -yq install gnutls-bin sharutils gnupg2 dirmngr libreadline-dev libcurl4-openssl-dev
|
|
|
|
- name: gnupg
|
|
if: startsWith(runner.os, 'macOS')
|
|
run: brew list gnupg &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install gnupg
|
|
|
|
- name: versions
|
|
run: |
|
|
ruby --version
|
|
rake --version
|
|
bundle --version
|
|
curl --version
|
|
emacs --version
|
|
gpg --version
|
|
|
|
- name: cask
|
|
run: |
|
|
sh tools/install-cask.sh
|
|
cask link list
|
|
|
|
- name: test
|
|
run: |
|
|
eval "eval $(rbenv init - --no-rehash)"
|
|
make test
|